Closed mgorny closed 4 months ago
Thanks for the bug report. I haven't heard of a debundled pip before, but this would be a simple enough fix.
I did read into debundled pip docs, and one question I have is why doesn't pip._vendor
exist? According to these docs, it should exist in your environment; I guess this is needed so that they can use their vendor aliasing feature. They do have a vendor alias to packaging.version
(see here).
We're following a different approach, since the "official" approach is broken (and doesn't seem well supported).
Well pip only supports the official way, anything else is unsupported and you're out of luck.
Well pip only supports the official way, anything else is unsupported and you're out of luck.
Do you want bug reports for it then? I presumed it's only semi-supported.
This is a pip bug at best, but I believe it is just purely unsupported by them.
Importing pip as a python library rather than executing it via runpy / subprocess.run([sys.executable, '-m', 'pip'])
is much more unsupported than people patching pip.
Which I guess leads me to: why is this being imported from pip._vendor
at all, given that pipdeptree already depends on the packaging module and therefore shouldn't need to import a vendored copy from pip?
What pipdeptree version are you using?
2.23.1
Are you running pipdeptree in a virtual environment?
No
Describe the problem
pipdeptree
directly imports Python packages vendored withinpip
. As a result, it doesn't import whenpip
is debundled and uses system packages:I'm guessing this is done to workaround the
isinstance()
problem that is inflicted by multiple packages vendoringpackaging
. However, can we have a fallback to systempackaging
when the one inpip
doesn't import (indicating it's been debundled)?