This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: distutils - setuptools - alias command removes comments from setup.cfg
Type: behavior Stage: resolved
Components: Distutils Versions: Python 3.8, Python 3.7, Python 3.6, Python 3.5, Python 2.7
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: acue, dstufft, eric.araujo, steve.dower
Priority: normal Keywords:

Created on 2019-11-06 03:49 by acue, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
msg356088 - (view) Author: Arno-Can Uestuensoez (acue) Date: 2019-11-06 03:49
The command 'alias' rewrites the configuration file completely when a new alias is added. The default file is 'setup.cfg'. All comments of the original file are stripped off before, though the new 'setup.cfg' does not contain any comments.

The comments should be kept literally, just the section '[aliases]' should be modified.

The comments in the section '[aliases]' should be basically kept, even though a manual modification by the user could cause problems e.g. in case of deleting an alias by the ' alias' command.

Anyhow, at least the only section modified should - must - be the '[aliases]' section.

Even though this involves 'setuptools', I write this issue here because of the tight coupling of 'distutils' and 'setuptools' e.g. by the passed 'self' parameter.

I have tested 3.8.0, but as far as I can see this is the case for all releases.
msg356097 - (view) Author: Arno-Can Uestuensoez (acue) Date: 2019-11-06 05:38
Current related issues are:

issue 38714
issue 38711
issue 38709
msg386254 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-02-03 18:07
Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils.

If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at
Date User Action Args
2022-04-11 14:59:22adminsetgithub: 82890
2021-02-03 18:07:50steve.dowersetstatus: open -> closed

nosy: + steve.dower
messages: + msg386254

resolution: out of date
stage: resolved
2019-11-06 05:38:43acuesetmessages: + msg356097
2019-11-06 03:49:12acuecreate