diff options
author | Benjamin Schubert <bschubert15@bloomberg.net> | 2020-12-04 17:51:12 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2020-12-07 12:16:17 +0000 |
commit | 6f3ec53db2a57135f53980f5cd575dae2aa3d0cb (patch) | |
tree | 9c74313c8c3a4aac70be46fce4ae4b6454ba1c03 /src/buildstream/_pluginfactory/pluginoriginpip.py | |
parent | 5f68adb3f80b1d84edf900fde8cf40c84c297f91 (diff) | |
download | buildstream-bschubert/coverage.tar.gz |
requirements: Update all requirementsbschubert/coverage
* .pylintrc: Disable new `raise-missing-from` check. We might want to
enable that later, but it fails in many places. Let's not merge both
changes here.
* pluginoriginpip.py: Catch the newer thrown exception from
pkg_resources. The previous one still exists, so we should be good
keeping the same compatibility as before
Diffstat (limited to 'src/buildstream/_pluginfactory/pluginoriginpip.py')
-rw-r--r-- | src/buildstream/_pluginfactory/pluginoriginpip.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/buildstream/_pluginfactory/pluginoriginpip.py b/src/buildstream/_pluginfactory/pluginoriginpip.py index 59b5d5251..0db091fd9 100644 --- a/src/buildstream/_pluginfactory/pluginoriginpip.py +++ b/src/buildstream/_pluginfactory/pluginoriginpip.py @@ -63,7 +63,12 @@ class PluginOriginPip(PluginOrigin): detail=e.report(), reason="package-version-conflict", ) from e - except pkg_resources.RequirementParseError as e: + except ( + # For setuptools < 49.0.0 + pkg_resources.RequirementParseError, + # For setuptools >= 49.0.0 + pkg_resources.extern.packaging.requirements.InvalidRequirement, + ) as e: raise PluginError( "{}: Malformed package-name '{}' encountered: {}".format( self.provenance_node.get_provenance(), self._package_name, e |