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

remove dynamic metadata #60

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

remove dynamic metadata #60

wants to merge 1 commit into from

Conversation

chris48s
Copy link
Owner

This PR would switch from using dynamic = ["version"] and __version__ as the source of truth to using importlib.metadata.version and pyproject.toml as the source of truth.

Some notes:

  • importlib is available in python >=3.10. For older versions you have to require importlib-metadata. That isn't a problem for this library because I'm already doing that and using importlib for other things. For other libraries it would be quite annoying to pull in a whole library for the sake of a version number. I'd be inclined to only do this more widely if I'm dropping python < 3.10
  • Flit doesn't have a command for bumping the version number and is unlikely to gain one. We can make a little utility for this, but python doesn't have a library that can write toml files in the standard library. In >= 3.11, there is a toml reader the standard lib but no writer. So we have to pull in a toml library to do this. It only has to be a dev dependency, but it is another package. You could avoid this by either switching to another build tool (e.g: hatch) or doing the version bump by hand.

Other places to update/account for this:

Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
pypi/[email protected] filesystem, shell, unsafe Transitive: environment, eval, network +764 7.56 GB neersighted

View full report↗︎

@chris48s chris48s changed the title remove static metadata remove dynamic metadata Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant