abderrahim commented on code in PR #2019:
URL: https://github.com/apache/buildstream/pull/2019#discussion_r2187049798
##########
src/buildstream/_pluginfactory/pluginoriginpip.py:
##########
@@ -72,7 +72,7 @@ def get_plugin_paths(self, kind, plugin_type):
reason="package-not-found",
) from e
- if dist.version not in package.specifier:
+ if not package.specifier.contains(dist.version, prereleases=True):
Review Comment:
Look, I'm not trying to invent a new behaviour. This is how python tools
work, and there is an option in the pypa `packaging` package I'm using that
implements this behaviour. But if you want the spec, here is what PEP 440 says
(emphasis mine):
> Pre-releases of any kind, including developmental releases, are implicitly
excluded from all version specifiers, **unless they are already present on the
system**, explicitly requested by the user, or if the only available version
that satisfies the version specifier is a pre-release.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]