Skip to content

Commit 53193cd

Browse files
update message for MetadataIncohsistent to allow use with PEP 658 metadata
1 parent fc9bcdd commit 53193cd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/pip/_internal/exceptions.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ class MetadataInconsistent(InstallationError):
335335
"""Built metadata contains inconsistent information.
336336
337337
This is raised when the metadata contains values (e.g. name and version)
338-
that do not match the information previously obtained from sdist filename
339-
or user-supplied ``#egg=`` value.
338+
that do not match the information previously obtained from sdist filename,
339+
user-supplied ``#egg=`` value, or an install requirement name.
340340
"""
341341

342342
def __init__(
@@ -349,8 +349,7 @@ def __init__(
349349

350350
def __str__(self) -> str:
351351
template = (
352-
"Requested {} has inconsistent {}: "
353-
"filename has {!r}, but metadata has {!r}"
352+
"Requested {} has inconsistent {}: expected {!r}, but metadata has {!r}"
354353
)
355354
return template.format(self.ireq, self.field, self.f_val, self.m_val)
356355

0 commit comments

Comments
 (0)