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

Fix support for pip>=22.1 #1618

Merged
merged 1 commit into from May 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion piptools/repositories/pypi.py
Expand Up @@ -20,7 +20,6 @@

from click import progressbar
from pip._internal.cache import WheelCache
from pip._internal.cli.progress_bars import BAR_TYPES
from pip._internal.commands import create_command
from pip._internal.commands.install import InstallCommand
from pip._internal.index.package_finder import PackageFinder
Expand Down Expand Up @@ -473,6 +472,9 @@ def _setup_logging(self) -> None:
# refactored-out logging config.
log.warning("Couldn't find a 'console' logging handler")

# This import will fail with pip 22.1, but here we're pip<22.0
from pip._internal.cli.progress_bars import BAR_TYPES

# Sync pip's progress bars stream with LogContext.stream
for bar_cls in itertools.chain(*BAR_TYPES.values()):
bar_cls.file = log.stream
Expand Down