question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 8 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
perituscommented, Nov 9, 2015

A workaround might be to use a .bumpversion.cfg will without comments that bumpversion is allowed to mess with and keep your well-commented setup.cfg just for all things that are not about bumpversion.

0reactions
schuderercommented, Jul 19, 2019

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found