-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump2version fails with the new black code formatter #145
Comments
It looks like your bump2version configuration does not match properly with the version string. This causes an incorrect search/replace, like described in #127. Can you share your |
|
Am I reading it correct that black formats it using |
I am having this same issue. Not that its unsolveable, but it does make the use of autoformatters a bit more involved. |
Hi all, [bumpversion]
current_version = 0.1.0
commit = False
tag = True
[bumpversion:file:setup.py]
search = version="{current_version}"
replace = version="{new_version}"
[bumpversion:file:enterpylink/__init__.py]
search = __version__ = "{current_version}"
replace = __version__ = "{new_version}" init.py has: after running "bump2version minor" (major performs similarly), the results are as expected: However, if I run "bump2version micro", the below is what I see: |
@aaronsmith1234 I didn't know |
@s-weigand yes, patch works fine. Don't know where I got micro from, will use patch going forward! |
Seems like this is all working as it should. #127 will prevent syntax errors like the original poster encountered. |
Hi,
Bump2version does not work when the new black formatter is on.
It formats all single quotes
'
as double quotes"
, which in turn causes the formatter to do this:which in turn causes the egg files to become: (Travis logs below)
which causes the Travis build to fail:
HTTPError: 400 Client Error: 'version-0.1.7-' is an invalid value for Version. Error: Start and end with a letter or numeral containing only ASCII numeric and '.', '_' and '-'. See https://packaging.python.org/specifications/core-metadata for url: https://upload.pypi.org/legacy/
.The solution for now is to wrap setup.py code in
however we would prefer a fix from bump2version
The text was updated successfully, but these errors were encountered: