From 536190b7c5dfc0ec7a46e73e6f652e053f0a13ce Mon Sep 17 00:00:00 2001 From: stonebig Date: Sun, 26 Sep 2021 17:37:46 +0200 Subject: [PATCH] pip-21.3 deprecates get_installed_distributions move to same method --- winpython/__init__.py | 2 +- winpython/wppm.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/winpython/__init__.py b/winpython/__init__.py index 288b0e30..d320f4dc 100644 --- a/winpython/__init__.py +++ b/winpython/__init__.py @@ -28,6 +28,6 @@ OTHER DEALINGS IN THE SOFTWARE. """ -__version__ = '4.5.20210918' +__version__ = '4.5.20210926' __license__ = __doc__ __project_url__ = 'http://winpython.github.io/' diff --git a/winpython/wppm.py b/winpython/wppm.py index 61afe41e..4e080bac 100644 --- a/winpython/wppm.py +++ b/winpython/wppm.py @@ -380,7 +380,7 @@ def get_installed_packages(self, update=False): cmdx = [ utils.get_python_executable(self.target), # PyPy ! '-c', - "import pip;from pip._internal.utils.misc import get_installed_distributions as pip_get_installed_distributions ;print('+!+'.join(['%s@+@%s@+@' % (i.key,i.version) for i in pip_get_installed_distributions()]))", + "import pkg_resources, importlib;importlib.reload(pkg_resources);print('+!+'.join(['%s@+@%s@+@' % (i.key, i.version) for i in pkg_resources.working_set]))", ] p = subprocess.Popen( cmdx,