Skip to content

Commit 62f4816

Browse files
committed
Move "Link requires a different Python" to verbose
1 parent 7c3abcc commit 62f4816

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/pip/_internal/index/package_finder.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from pip._internal.models.target_python import TargetPython
3131
from pip._internal.models.wheel import Wheel
3232
from pip._internal.req import InstallRequirement
33+
from pip._internal.utils._log import getLogger
3334
from pip._internal.utils.filetypes import WHEEL_EXTENSION
3435
from pip._internal.utils.hashes import Hashes
3536
from pip._internal.utils.logging import indent_log
@@ -41,7 +42,7 @@
4142
__all__ = ['FormatControl', 'BestCandidateResult', 'PackageFinder']
4243

4344

44-
logger = logging.getLogger(__name__)
45+
logger = getLogger(__name__)
4546

4647
BuildTag = Union[Tuple[()], Tuple[int, str]]
4748
CandidateSortingKey = (
@@ -77,7 +78,7 @@ def _check_link_requires_python(
7778
if not is_compatible:
7879
version = '.'.join(map(str, version_info))
7980
if not ignore_requires_python:
80-
logger.debug(
81+
logger.verbose(
8182
'Link requires a different Python (%s not in: %r): %s',
8283
version, link.requires_python, link,
8384
)

tests/unit/test_index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def check_caplog(caplog, expected_level, expected_message):
4848

4949
@pytest.mark.parametrize('ignore_requires_python, expected', [
5050
(None, (
51-
False, 'DEBUG',
51+
False, 'VERBOSE',
5252
"Link requires a different Python (3.6.5 not in: '== 3.6.4'): "
5353
"https://example.com"
5454
)),

0 commit comments

Comments
 (0)