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

add RichPipStreamHandler as allowed handler in repositories/pypi.py #1565

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions piptools/repositories/pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from pip._internal.req import InstallRequirement, RequirementSet
from pip._internal.req.req_tracker import get_requirement_tracker
from pip._internal.utils.hashes import FAVORITE_HASH
from pip._internal.utils.logging import indent_log, setup_logging
from pip._internal.utils.logging import RichPipStreamHandler, indent_log, setup_logging
nicoa marked this conversation as resolved.
Show resolved Hide resolved
from pip._internal.utils.misc import normalize_path
from pip._internal.utils.temp_dir import TempDirectory, global_tempdir_manager
from pip._internal.utils.urls import path_to_url, url_to_path
Expand Down Expand Up @@ -452,7 +452,9 @@ def _setup_logging(self) -> None:
logger = logging.getLogger()
for handler in logger.handlers:
if handler.name == "console": # pragma: no branch
assert isinstance(handler, logging.StreamHandler)
assert isinstance(
handler, (logging.StreamHandler, RichPipStreamHandler)
)
handler.stream = log.stream
break
else: # pragma: no cover
Expand Down