findpython
findpython copied to clipboard
Support SpecifierSet?
I'm wondering, would it make sense to support a SpecifierSet, such as >=3.10, and select the best version of Python available based on that? I think it might be interesting for supporting requires-python inside PEP 723, for example. I think you could detect the =>< chars which are not currently used. CC https://github.com/wntrblm/nox/issues/814.
Just a thought, feel free to close if it's not a good idea! :)
That's indeed a good idea, while you can achieve this now by:
next(version for version in finder.find_all() if version.version in specifier)