findpython icon indicating copy to clipboard operation
findpython copied to clipboard

Support SpecifierSet?

Open henryiii opened this issue 1 year ago • 1 comments

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! :)

henryiii avatar Apr 10 '24 05:04 henryiii

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)

frostming avatar Apr 11 '24 00:04 frostming