Skip to content

Commit

Permalink
Merge pull request #10077 from uranusjr/requires-python-to-debug
Browse files Browse the repository at this point in the history
Move "Link requires a different Python" to verbose
  • Loading branch information
uranusjr committed Jul 12, 2021
2 parents 4cd3255 + 62f4816 commit 32a3a50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/pip/_internal/index/package_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from pip._internal.models.target_python import TargetPython
from pip._internal.models.wheel import Wheel
from pip._internal.req import InstallRequirement
from pip._internal.utils._log import getLogger
from pip._internal.utils.filetypes import WHEEL_EXTENSION
from pip._internal.utils.hashes import Hashes
from pip._internal.utils.logging import indent_log
Expand All @@ -41,7 +42,7 @@
__all__ = ['FormatControl', 'BestCandidateResult', 'PackageFinder']


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

BuildTag = Union[Tuple[()], Tuple[int, str]]
CandidateSortingKey = (
Expand Down Expand Up @@ -77,7 +78,7 @@ def _check_link_requires_python(
if not is_compatible:
version = '.'.join(map(str, version_info))
if not ignore_requires_python:
logger.debug(
logger.verbose(
'Link requires a different Python (%s not in: %r): %s',
version, link.requires_python, link,
)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def check_caplog(caplog, expected_level, expected_message):

@pytest.mark.parametrize('ignore_requires_python, expected', [
(None, (
False, 'DEBUG',
False, 'VERBOSE',
"Link requires a different Python (3.6.5 not in: '== 3.6.4'): "
"https://example.com"
)),
Expand Down

0 comments on commit 32a3a50

Please sign in to comment.