summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Schubert <bschubert15@bloomberg.net>2020-12-04 17:51:12 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2020-12-07 12:16:17 +0000
commit6f3ec53db2a57135f53980f5cd575dae2aa3d0cb (patch)
tree9c74313c8c3a4aac70be46fce4ae4b6454ba1c03 /src
parent5f68adb3f80b1d84edf900fde8cf40c84c297f91 (diff)
downloadbuildstream-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')
-rw-r--r--src/buildstream/_pluginfactory/pluginoriginpip.py7
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