Skip to content
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

pip > 10 & pip.get_installed_distributions() #9

Closed
nomadigital opened this issue Dec 27, 2021 · 1 comment
Closed

pip > 10 & pip.get_installed_distributions() #9

nomadigital opened this issue Dec 27, 2021 · 1 comment

Comments

@nomadigital
Copy link

From pypa/pip#5243

See https://pip.pypa.io/en/latest/user_guide/#using-pip-from-your-program - importing functions from pip is not supported. In this case, setuptools (specifically pkg_resources) probably has the functionality you need.

That's explicitly not the right thing to do. Please don't do this, we will not support such usage.

This is really an issue as we must stick with old pip version < 10 to still be able to use djaodjin-deployutils.

As far as we can see, this is only user for logging purpose in file https://github.com/djaodjin/djaodjin-deployutils/blob/master/deployutils/apps/django/logging.py

Maybe the proposed alternative in the link above can work :

import pkg_resources

dists = [d for d in pkg_resources.working_set]
# Filter out distributions you don't care about and use.
@smirolo
Copy link
Contributor

smirolo commented Dec 28, 2021

commit 18f487c and commit 2b0f8f3 should take care of this issue - at least for pip <= 21.3.1.

@smirolo smirolo closed this as completed Dec 28, 2021
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

No branches or pull requests

2 participants