diff --git a/news/875.bugfix.md b/news/875.bugfix.md new file mode 100644 index 0000000000..7586bc8781 --- /dev/null +++ b/news/875.bugfix.md @@ -0,0 +1 @@ +Fix the compatibility issue with `pip>=22.0`. diff --git a/pdm/models/pip_shims.py b/pdm/models/pip_shims.py index 65a0137b6e..929a211ea3 100644 --- a/pdm/models/pip_shims.py +++ b/pdm/models/pip_shims.py @@ -7,6 +7,7 @@ import atexit import inspect +from functools import partial from typing import TYPE_CHECKING, Any, Optional, Tuple from pip._internal.cache import WheelCache @@ -41,6 +42,10 @@ from optparse import Values +if "verbosity" in inspect.getfullargspec(unpack_url).args: + unpack_url = partial(unpack_url, verbosity=0) + + class InstallCommand(_InstallCommand): def __init__(self) -> None: super().__init__(name="InstallCommand", summary="Install packages.")