Closed EvaSDK closed 1 year ago
The relevant test should be test_versions
, but I tried adding ('pkg~=1.0', ['1.0', '1.1']),
to the parametrize
list and that didn't make it fail. Maybe you could come up with a variant that does fail without your fix? I also wondered a bit why devpi list
works, but that is using the json output and that uses get_versions_filter_iter
which isn't affected.
Thanks for the hint, I think I got it covered now.
Thanks for the follow up. I cherry-picked your commits and changed the test to use BeautifulSoup, the URL class from devpi-common and comparing the whole list of expected versions at once.
Following the release of version 2.0, I was checking if everything was working as intended. While
devpi list
filtering works as documented in the README, actual usage with pip still does not filter according to constraints correctly.To test this, I created the constrained index following documentation, then added the following constraint:
devpi list works as expected:
but running pip install returned the following unexpected result:
Removing the
break
fixes the issue as it allowsConstrainedStage
to filter all versions.I think the issue came from my PR keeping this break while it was not necessary with
SimpleLinkMeta
since it was addressed at the loop trying to find the proper version split in the tuple-based link info.I could not find a way to quickly add a test case in the test suite as I am not familiar with Pyramid but if you point me at which function I can use to see the links the same way pip does, I can work on adding it.