We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c6835f commit 335f9e4Copy full SHA for 335f9e4
src/pip/_internal/metadata/importlib/_dists.py
@@ -218,7 +218,9 @@ def is_extra_provided(self, extra: str) -> bool:
218
def iter_dependencies(self, extras: Collection[str] = ()) -> Iterable[Requirement]:
219
contexts: Sequence[Dict[str, str]] = [{"extra": e} for e in extras]
220
for req_string in self.metadata.get_all("Requires-Dist", []):
221
- req = Requirement(req_string)
+ # strip() because email.message.Message.get_all() may return a leading \n
222
+ # in case a long header was wrapped.
223
+ req = Requirement(req_string.strip())
224
if not req.marker:
225
yield req
226
elif not extras and req.marker.evaluate({"extra": ""}):
0 commit comments