Skip to content

Commit 9ca2240

Browse files
committed
More clarification on the name
1 parent 65ffd33 commit 9ca2240

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/pip/_internal/resolution/resolvelib/candidates.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ def __init__(self, py_version_info):
218218
@property
219219
def name(self):
220220
# type: () -> str
221-
return "<Python>" # Avoid conflicting with the PyPI package "Python".
221+
# Avoid conflicting with the PyPI package "Python".
222+
return "<Python fom Requires-Python>"
222223

223224
@property
224225
def version(self):

src/pip/_internal/resolution/resolvelib/requirements.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ def is_satisfied_by(self, candidate):
3535

3636
class NoMatchRequirement(Requirement):
3737
"""A requirement that never matches anything.
38+
39+
Note: Similar to ExplicitRequirement, the caller should handle name
40+
canonicalisation; this class does not perform it.
3841
"""
3942
def __init__(self, name):
4043
# type: (str) -> None
41-
self._name = canonicalize_name(name)
44+
self._name = name
4245

4346
@property
4447
def name(self):

0 commit comments

Comments
 (0)