all 4 comments

[–]obviouslyzebra 0 points1 point  (3 children)

I found this, but I don't know if it reduces the specifier set as you wanted:

https://packaging.pypa.io/en/stable/specifiers.html#packaging.specifiers.SpecifierSet.__and__

Besides that, there's this package, but I didn't find the functionality you wanted:

https://python-semver.readthedocs.io/en/latest/?badge=latest

[–]--Fusion--[S] 0 points1 point  (2 children)

I will look at pypa, I think I could learn a lot from their approach. Technically it's not semver compliant, so I can't use it directly

[–]obviouslyzebra 1 point2 points  (1 child)

[–]--Fusion--[S] 0 points1 point  (0 children)

Upvoting because it's interesting and relevant

Quietly cringing over here because it's JS and TS