Replies: 1 comment
-
This is a Python issue rather than specific to Hatch, package metadata is not dynamic but is saved at the time of installation |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I work on a project with hatch and increase it's version number, Python code seems to never pick up this change until the environment is removed/purged. I used the default with the
dev-mode = true
first, but changingdev-mode = false
seems to not change this.Is this expected or am I missing something?
Here's a minimal Example:
I created a new project…
But changed the generate
pyproject.toml
to use a static version:Checking the version once is fine:
% hatch run python -c 'import importlib.metadata; print(importlib.metadata.version("foobar"))' 1.6.1
But after incrementing my version (manually in
pyproject.toml
), I still getthe same results.
If I ask hatch directly about it, it's recent though:
Maybe, when I set it:
BTW: is this expected behavior?
When I use a dynamic version instead, getting and setting it with hatch went fine alright, but I still only ever get the first version from
importlib.…
.Running
hatch env prune
after setting a version seems to work tough.Beta Was this translation helpful? Give feedback.
All reactions