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

#432 Use importlib.metadata.version to get the version #502

Merged
merged 22 commits into from
May 22, 2024
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c933cbb
#432 An initial attempt
agriyakhetarpal Apr 29, 2023
89c3232
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 29, 2023
d8e281f
Merge branch 'trunk' into 432-poetry-version
agriyakhetarpal May 2, 2023
3aff9fb
Merge branch 'trunk' into 432-poetry-version
adiroiban Jun 4, 2023
ff05eed
Merge branch 'trunk' into 432-poetry-version
adiroiban Jul 17, 2023
69b197a
Merge branch 'trunk' into 432-poetry-version
adiroiban Apr 28, 2024
c2a23df
Get metadata version from packages_distributions
SmileyChris May 7, 2024
2af8e80
Fix dependency format
SmileyChris May 21, 2024
6b85972
Safer check in _get_metadata_version
SmileyChris May 21, 2024
819d160
Update test to match new "no version found" exception text
SmileyChris May 21, 2024
7f1d8ce
logic style nitpick
SmileyChris May 21, 2024
1f28954
Mypy fixes
SmileyChris May 21, 2024
770eb48
Fix incremental test
SmileyChris May 21, 2024
9bbcb70
Add test to check version from metadata
SmileyChris May 22, 2024
85a769e
Remove a redundant try/except
SmileyChris May 22, 2024
30fe7ed
Looser pin for importlib-metadata
SmileyChris May 22, 2024
6ec518d
Use a pyupgrade compatible format for the importlib_metadata fallback…
SmileyChris May 22, 2024
d5e0a60
Improve comments for the version-related methods
SmileyChris May 22, 2024
f02a26a
Small tweak to the version error message
SmileyChris May 22, 2024
8050a0b
Revert missing version name change in test
SmileyChris May 22, 2024
5bee9d4
Add a newsfragment
SmileyChris May 22, 2024
783e122
Merge branch 'trunk' into 432-poetry-version
SmileyChris May 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a newsfragment
SmileyChris committed May 22, 2024
commit 5bee9d4e1a0ce22bfad44dd8f16a9de0f70f1522
1 change: 1 addition & 0 deletions src/towncrier/newsfragments/432.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Inferring the version of a Python package now tries to use the metadata of the installed package before importing the package explicitly (which only looks for ``[package].__version__``).