[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] Minimum Python Version
From: |
Fred Wright |
Subject: |
Re: [gpsd-dev] Minimum Python Version |
Date: |
Wed, 27 Jan 2016 15:58:58 -0800 (PST) |
On Wed, 27 Jan 2016, Mike Frysinger wrote:
> On 27 Jan 2016 15:36, Fred Wright wrote:
> > One of the issues I ran across in getting 3.16 to work on the Mac is that
> > several Python programs changed the shebang lines to specify "python2", in
> > order to defend against Python3 as a default. But OSX has no "python2" by
> > default; it can be set up manually or via the MacPorts python2_select
> > port, but without that all programs specifying "python2" fail.
>
> you should really get the macports to fix their defaults. "python2" is
> covered explicitly in PEP-0394 and by not providing it, life is harder
> for people.
> https://www.python.org/dev/peps/pep-0394/
Aside from MacPorts not wanting to change the OSX behavior by default,
it's also possible that someone might want to use GPSD on a Mac without
using the MacPorts version. So unless someone can get *Apple* to provide
python2 by default, and do so retroactively on all suported OSX versions,
that isn't a very practical approach. :-)
> > The best fix for this (where practical) is to make the code
> > Python3-compatible and go back to the generic "python" in the shebang
> > lines. Since many Python3 features have been backported to 2.6, it's a
> > lot easier to write "Python2/3" code if one can assume that Python2 is at
> > least Python2.6.
>
> i'm pretty sure this statement is incorrect. many features have been
> backported to python 2.7, not 2.6.
And I'm pretty sure that the *relevant* features have been backported to
2.6. I'm certain of this for gpsfake; I didn't look at the other cases as
closely.
> > The Python version specification in build.txt is "Python 2.x, x >= 6", but
> > strictly speaking, that's a *build* requirement, not a *run* requirement.
> > I wasn't able to find any user-level "system requirements" documentation
> > giving a minimum Python version for end users to run the Python programs.
> >
> > It wouldn't necessarily be unreasonable to have a stricter version
> > requirement for regression tests than for normal end-user programns.
>
> <=py2.6 should be killed w/fire
The real question is what the official minimum version is, but Eric just
answered that.
Fred Wright