You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add importlib.metadata as an approach in "Single-sourcing the package version" #616
The current version of "Single-sourcing the package version" has an example using pkg_resources. It would probably make sense to include an item using importlib.metadata since it will be standard in 3.8+ with a backport as importlib_metadata and can serve the same purpose. That may look like
I suggest that we close this out and file a separate issue for improving the option 5 to de-emphasize pkg_resources and prefer importlib.metadata on 3.8+.
Activity
soxofaan commentedon Apr 1, 2022
I think this issue can be closed as it is already handled in 3c7c07f (and followup tweaks)
bhrutledge commentedon Apr 1, 2022
I think the documentation could be improved; looking at option 5 in https://packaging.python.org/en/latest/guides/single-sourcing-package-version/, I don't actually see a complete example of this technique.
pradyunsg commentedon Jun 18, 2022
I suggest that we close this out and file a separate issue for improving the option 5 to de-emphasize
pkg_resourcesand preferimportlib.metadataon 3.8+.ncoghlan commentedon Oct 15, 2024
Resolved in #1612