Skip to content

Commit

Permalink
Remove outdated "single sourcing package version" advice.
Browse files Browse the repository at this point in the history
Now that Python 3.7 is EOL and importlib.metadata is available in all non-EOL Python versions, it is no longer advisable to keep a __version__ attribute in the source code. Use importlib.metadata.version() to retrieve a version string from package metadata if necessary.
  • Loading branch information
wimglenn committed Jul 23, 2024
1 parent 08c54d4 commit 6cad57c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 176 deletions.
1 change: 0 additions & 1 deletion source/guides/section-build-and-publish.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Building and Publishing

writing-pyproject-toml
distributing-packages-using-setuptools
single-sourcing-package-version
dropping-older-python-versions
packaging-binary-extensions
packaging-namespace-packages
Expand Down
173 changes: 0 additions & 173 deletions source/guides/single-sourcing-package-version.rst

This file was deleted.

3 changes: 1 addition & 2 deletions source/guides/writing-pyproject-toml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ This field is required, although it is often marked as dynamic using
dynamic = ["version"]
This allows use cases such as filling the version from a ``__version__``
attribute or a Git tag. Consult :ref:`Single sourcing the version` for more
details.
attribute or a Git tag.


Dependencies and requirements
Expand Down

0 comments on commit 6cad57c

Please sign in to comment.