Skip to content

Replace pkg_resources with importlib.metadata for version retrieval #153

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Egorrko
Copy link

@Egorrko Egorrko commented Mar 1, 2025

I ran into a problem when executing the command tg-archive --build:
ModuleNotFoundError: No module named 'pkg_resources'
From python 3.12 module pkg_resources isn't available by default.

Recommended method instead deprecated pkg_resources is importlib.metadata
It was added in python3.8, so there shouldn't be any compatibility issues.

https://docs.python.org/3/whatsnew/3.12.html

gh-95299: Do not pre-install setuptools in virtual environments created with venv. This means that distutils, setuptools, pkg_resources, and easy_install will no longer available by default; to access these run pip install setuptools in the activated virtual environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant