Since there isn't a way to do this in any fashion I never really thought
about it. I think most people either set the shebang to the version of
Python they want it to work with, have pip install the entry point which
will also set the entry point, or assume that e.g. python3 is new enough to
work.

But even setting a minimum is potentially troublesome if there's an
incompatibility, e.g. you used 'async' as a variable name and suddenly you
installed Python 3.7. :) So I don't know if the desire/utility of having a
minimum is worth the added complexity.

On Wed, 26 Sep 2018 at 10:54, Yury Selivanov <yselivanov...@gmail.com>
wrote:

> On Wed, Sep 26, 2018 at 1:25 PM Paul Moore <p.f.mo...@gmail.com> wrote:
> [..]
> > but I don't know how
> > useful it would be in practice - can you give some examples of use
> > cases?)
>
> It's hard to give a real life example as "py" doesn't support this,
> but I can imagine the following scenario: if I have a script that uses
> some new 3.6 feature I could probably run it from other scripts with
> 'py --min=3.6 myscript.py'.  That way I wouldn't need to write more
> code or use other tools to check if the target system has a Python
> 3.6+ interpreter.
>
> Yury
>
_______________________________________________
python-committers mailing list
python-committers@python.org
https://mail.python.org/mailman/listinfo/python-committers
Code of Conduct: https://www.python.org/psf/codeofconduct/

Reply via email to