bumpversion removes comments from setup.cfg
See original GitHub issue ❯ cat setup.cfg
[egg_info]
#tag_build = dev
[easy_install]
index_url = http://myserver/pypi
[bumpversion]
current_version = 1.1.3
[bumpversion:file:setup.py]
❯ bumpversion patch --allow-dirty
❯ cat setup.cfg
[bumpversion]
current_version = 1.1.4
[egg_info]
[easy_install]
index_url = http://myserver/pypi
[bumpversion:file:setup.py]
That comment is used by my CI tool – on pull requests, it uncomments it to build a dev package. If bumpversion deletes it, it breaks the process.
For now, I’m switching back to using bumpversion.cfg
, but I was hoping to consolidate this in setup.cfg
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
bump2version to increment pre-release while removing post ...
With the config below, you can use bumpversion pre to go from 1.0.0.a2.post0 to 1.0.0.a3 . Explanation: Since pre and post each have...
Read more >bumpversion - PyPI
If no .bumpversion.cfg exists, bumpversion will also look into setup.cfg for ... however deprecates two uses that will be removed in a future...
Read more >Versions and Tag Management · Wiki · ecs / ELT SW Docs
The .bumpversion.cfg file contains the configuration for the ... do not put there comments, as they will be removed at the next ececution....
Read more >bump2version Changelog - PyUp.io
0.3.0. - **BREAKING CHANGE** The `--bump` argument was removed, this is now the first positional argument. If you used `bumpversion --bump major` before ......
Read more >zest.releaser Documentation
Using the version number in setup.py or setup.cfg as __version__ . ... bumpversion: do not release, only bump the version.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A workaround might be to use a
.bumpversion.cfg
will without comments that bumpversion is allowed to mess with and keep your well-commentedsetup.cfg
just for all things that are not about bumpversion.Thanks for posting the workaround. I was also trying to consolidate the many test/build/deploy-related files in my repository a bit.
I see that
bumpversion
wants to stick to using ConfigParser, and that’s cool. Though when I look at it,bumpversion
right now is using different mechanisms for updating the version string in the config file vs. in source code files (ConfigParser for one, the parsing mechanism for the other).I for one wouldn’t blame the maintainers as introducing any inconsistencies 😉 (rather remove one!) if
bumpversion
would use ConfigParser only for reading its own config, and would use the same parsing mechanism for updating the version string in all files. Opinions?