8000 Import pkg_resources directly by foarsitter · Pull Request #1782 · django-extensions/django-extensions · GitHub
[go: up one dir, main page]

Skip to content

Import pkg_resources directly #1782

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

Merged
merged 1 commit into from
Dec 25, 2022

Conversation

foarsitter
Copy link
Contributor
@foarsitter foarsitter commented Dec 13, 2022

pipdeptree encountered the same issue as pipchecker #1778 / tox-dev/pipdeptree#164

They solved the issue in tox-dev/pipdeptree#173

For pipchecker and python 3.11 this solution is also sufficient.

pip._internal.metadata.select_backend decides if it should use importlib or pips internal pkg_resources. By importing pkg_resources directly importlib is of the table and the attribute project_name is always available.

@foarsitter foarsitter closed this Dec 13, 2022
@foarsitter foarsitter reopened this Dec 13, 2022
@foarsitter foarsitter changed the title feat: force pip to use pkg_resources as backend for resolving distrib… Import pkg_resources directly Dec 13, 2022
@trbs trbs merged commit c27377c into django-extensions:main Dec 25, 2022
@foarsitter foarsitter deleted the bypass_importlib branch November 21, 2023 19:21
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.

2 participants
0