summaryrefslogtreecommitdiff
path: root/src/buildstream
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 19:52:59 +0000
commit60fd8c3cad12f2a119ecb6e8f348c1344de34fde (patch)
tree54d5022b1eb4bf171b44885247685aa16687e177 /src/buildstream
parent7f69411f213271e9efdbb1a0726f144ccef9f0a6 (diff)
downloadbuildstream-60fd8c3cad12f2a119ecb6e8f348c1344de34fde.tar.gz
requirements: Update all requirements
* .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')
-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