abderrahim commented on code in PR #2019:
URL: https://github.com/apache/buildstream/pull/2019#discussion_r2143194017


##########
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:
   I would look at it from a different angle: I consider this a regression 
introduced by 
https://github.com/apache/buildstream/commit/10b45216684a5de8f8770efbf1821f03f16b9e73.
   
   Before that commit (bst 2.3 and earlier) the expression
   
   ```yaml
   plugins:
     origin: pip
     package-name: buildstream-plugins
   ```
   
   would accept any version of buildstream-plugins, but now (2.4 and newer) it 
does not accept prereleases anymore. (This is the reason why 
buildstream-plugins-community testsuite currently fails with buildstream 
master).
   
   Now I would argue that both interpretations of whether or not to accept 
pre-releases are correct. They correspond to what pip would do when passing 
`--pre` or not passing it, respectively.
   
   What I consider to be different between pip and buildstream is that 
buildstream doesn't install these packages. So if the user has already 
installed a prerelease of buildstream-plugins-community, we should let them use 
it rather than tell them, unhelpfully,
   
   ```
   buildstream-plugins-community 2.0.5.dev21+g07c4b9e is installed but 
buildstream_plugins_community is required
   ```
   



-- 
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]

Reply via email to