c4urself / bump2version

Version-bump your software with a single command
https://pypi.python.org/pypi/bump2version
MIT License
1.06k stars 134 forks source link

bump2version deletes comments/commented out lines when using setup.cfg #37

Closed mfcabrera closed 5 years ago

mfcabrera commented 6 years ago

if using setup.cfg and setting up the version configuration, once I use bump2version part the version gets updated but all the comments are removed.

Is this the expected behaviour?

mfcabrera commented 6 years ago

Apparently this is impossible to do with standard ConfigParser. https://stackoverflow.com/questions/21476554/update-ini-file-without-removing-comments

So either another library is used or move the configuration fromsetup.cfg to .bumpversion.cfg

luzfcb commented 5 years ago

same problem here. thanks @mfcabrera, for showing me the workaround:

move the configuration from setup.cfg to .bumpversion.cfg

c4urself commented 5 years ago

Closing as it looks like a workaround has been found. Thanks @mfcabrera.

andreoliwa commented 3 years ago

FYI: this package can update .INI files and preserve comments: pyscaffold/configupdater: 🌴 Parser like ConfigParser but for updating configuration files