Commit 09df3c7a authored by Jason R. Coombs's avatar Jason R. Coombs

Add a compatibility wrapper, so downstream consumers trapping a...

Add a compatibility wrapper, so downstream consumers trapping a RequirementParseError will now trap an InvalidRequirement, allowing transition to only trapping an InvalidRequirement.
parent eba78d63
......@@ -3090,6 +3090,10 @@ def parse_requirements(strs):
yield Requirement(line)
class RequirementParseError(packaging.requirements.InvalidRequirement):
"Compatibility wrapper for InvalidRequirement"
class Requirement(packaging.requirements.Requirement):
def __init__(self, requirement_string):
"""DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment