Skip to content
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

Support PEP 621 version? #66

Open
henryiii opened this issue Sep 6, 2023 · 3 comments
Open

Support PEP 621 version? #66

henryiii opened this issue Sep 6, 2023 · 3 comments
Labels
feature-request New feature or request

Comments

@henryiii
Copy link

henryiii commented Sep 6, 2023

Description

I was expecting bump-my-version to be able to read

[project]
version = "1.0.0"

But it did not. If a current_version isn't specified, IMO this should be the fallback location. According to PEP 621, it is the canonical version if specified. All backends except Poetry support this now (and Poetry 2 is supposed to).

What I Did

pipx run bump-my-version
@coordt
Copy link
Member

coordt commented Sep 14, 2023

This is a great point, and I'm kicking myself for not recognizing it before.

@coordt coordt added the feature-request New feature or request label Sep 14, 2023
@ptoews
Copy link

ptoews commented Jul 29, 2024

Any update on this?

In my case I need the field at project.version so that setuptools can install my package. For that, I have to do something like this

[project]
version = "0.1.0" # Do not change this manually; Go to [tool.bumpversion]

and this

[[tool.bumpversion.files]]
filename = "pyproject.toml"
regex = true
search = "^version = \"{current_version}\""
replace = "version = \"{new_version}\""

@coordt
Copy link
Member

coordt commented Jul 30, 2024

#215 has my current answer to this.

The project.version can be dynamic, depending on your needs and build tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants