diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2020-06-15 17:45:10 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-06-15 17:45:10 -0400 |
| commit | 09df3c7adba9a1e687151805b61aec72f6c8b13f (patch) | |
| tree | b7b29530ed73f63f2122cef3b6367e209c9b36c3 /pkg_resources | |
| parent | eba78d63e3a4b181153a011caec2a3e50eecfee0 (diff) | |
| download | python-setuptools-git-09df3c7adba9a1e687151805b61aec72f6c8b13f.tar.gz | |
Add a compatibility wrapper, so downstream consumers trapping a RequirementParseError will now trap an InvalidRequirement, allowing transition to only trapping an InvalidRequirement.
Diffstat (limited to 'pkg_resources')
| -rw-r--r-- | pkg_resources/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 56be3c22..1433409a 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -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()!""" |
