Open keimlink opened 9 years ago
Bumpversion uses ConfigParser underneath to read and write the configuration (both .bumpversion.cfg
and setup.cfg
). While I certainly have some influence on how the files are read and written (as in #75), your request might be too difficult for that.
I'm still researching whether I can tell ConfigParser to write the file in the same manner it was read.
While I don't like software re-indenting and/or replacing tabs with spaces myself, what is the problem this causes with other software then reading setup.cfg
?
I'm not sure if I understood your question the right way. If the configuration of bumpversion consists of several sections in setup.cfg
and you bump the version, the sections are no longer at the same place as before. Furthermore trailing spaces added and leading spaces are converted to tabs. This creates a commit that looks awful.
Therefore we use a separate .bumpversion.cfg
file so that setup.cfg
is not messed up.
Yes, ConfigParser rewrites the whole file and I don't know if there's a way around that.
After that initial "awful looking" rewriting commit, is there a "real" (you know I hate tabs and trailing whitespace more than any other person, but if we let's set that aside for a moment) problem with other software also reading/writing setup.cfg
(as was in #75) ?
7 years later and I get bitten by this
Yes, ConfigParser rewrites the whole file and I don't know if there's a way around that.
As mentioned in a similar issue in setuptools, maybe do it like this:
diff -w
or an equivalent Python library.
bumpversion uses trailing spaces and tabs if it updates it's own configuration. As long as the configuration is kept in a separate
.bumpversion
file this is just a cosmetic issue.But since release 0.5.1 bumpversion allows users to configure it by using
setup.cfg
. Unfortunatelysetup.cfg
will be messed up by bumpversion by replacing spaces with tabs for indentation and by adding trailing spaces to equal signs.The optimal solution would be if bumpversion could respect the indentation style that is used and add no trailing spaces at all.