Skip to content

Commit 6a0c813

Browse files
oschwaldclaude
andcommitted
Use single source of truth for version from pyproject.toml
The version is now retrieved from package metadata at runtime using importlib.metadata. This reduces the chance of version inconsistencies during releases. πŸ€– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent fa61263 commit 6a0c813

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

β€ŽHISTORY.rstβ€Ž

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
History
44
-------
55

6+
3.3.0
7+
++++++++++++++++++
8+
9+
* The version is now retrieved from package metadata at runtime using
10+
``importlib.metadata``. This reduces the chance of version inconsistencies
11+
during releases.
12+
613
3.2.0 (2025-11-20)
714
++++++++++++++++++
815

β€Ždev-bin/release.shβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ if [ -n "$(git status --porcelain)" ]; then
4141
exit 1
4242
fi
4343

44-
perl -pi -e "s/(?<=__version__ = \").+?(?=\")/$version/g" src/minfraud/version.py
4544
perl -pi -e "s/(?<=^version = \").+?(?=\")/$version/gsm" pyproject.toml
4645

4746
echo $"Test results:"

β€Žsrc/minfraud/__init__.pyβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,3 @@
1010
)
1111
from .version import __version__
1212
from .webservice import AsyncClient, Client
13-
14-
__author__ = "Gregory Oschwald"

β€Žsrc/minfraud/version.pyβ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
"""Internal module for version (to prevent cyclic imports)."""
22

3-
__version__ = "3.2.0"
3+
from importlib.metadata import version
4+
5+
__version__ = version("minfraud")

0 commit comments

Comments
Β (0)