Skip to content

Commit

Permalink
Merge pull request #12188 from uranusjr/cleaner-metadata-log
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr authored Jul 31, 2023
2 parents b69ed81 + e4a0df1 commit 3dc5ac5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions news/12155.process.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
The metadata-fetching log message is moved to the VERBOSE level and now hidden
by default. The more significant information in this message to most users are
already available in surrounding logs (the package name and version of the
metadata being fetched), while the URL to the exact metadata file is generally
too long and clutters the output. The message can be brought back with
``--verbose``.
6 changes: 3 additions & 3 deletions src/pip/_internal/operations/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

import logging
import mimetypes
import os
import shutil
Expand Down Expand Up @@ -37,6 +36,7 @@
from pip._internal.network.session import PipSession
from pip._internal.operations.build.build_tracker import BuildTracker
from pip._internal.req.req_install import InstallRequirement
from pip._internal.utils._log import getLogger
from pip._internal.utils.direct_url_helpers import (
direct_url_for_editable,
direct_url_from_link,
Expand All @@ -53,7 +53,7 @@
from pip._internal.utils.unpacking import unpack_file
from pip._internal.vcs import vcs

logger = logging.getLogger(__name__)
logger = getLogger(__name__)


def _get_prepared_distribution(
Expand Down Expand Up @@ -394,7 +394,7 @@ def _fetch_metadata_using_link_data_attr(
if metadata_link is None:
return None
assert req.req is not None
logger.info(
logger.verbose(
"Obtaining dependency information for %s from %s",
req.req,
metadata_link,
Expand Down

0 comments on commit 3dc5ac5

Please sign in to comment.