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

Created on 2019-11-06 03:49 by acue, last changed 2019-11-06 05:38 by acue.

Messages (2)
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
Date User Action Args
2019-11-06 05:38:43acuesetmessages: + msg356097
2019-11-06 03:49:12acuecreate