[lsb-discuss] Python 3
Jeff Licquia
licquia at linuxfoundation.org
Tue Apr 17 21:46:41 UTC 2012
I've been looking at the work needed to include Python 3 as a part of
LSB 5.0. Since the work is essentially the same in all cases, I'm not
going to discuss the process of deprecating Python 2, or deciding
whether Python 3 is trial-use or not.
Adding a runtime language is a little different from adding a C/C++
library, because the work is entirely manual. We can "steal" a lot of
the work from the existing Python 2 spec, which makes this a little easier.
Here's a proposed task list, with notes on time estimates. If I'm
completely crazy on some of the estimates, let's discuss them.
- We need to decide what version of Python 3 should be standardized.
This could be done with a distribution survey; figure out which version
of Python 3 ships with the most common distros, and mandate the oldest
in that set. Since we're targeting more "cutting-edge" distros, we
might want to exclude some of the slower-moving enterprise distros from
this survey. Time: 3 days.
- The biggest difficulty, as I see it, involves figuring out what name
the Python interpreter should be called by. Upstream provides some
guidance here:
http://www.python.org/dev/peps/pep-0394/
It should probably be part of the distro survey to list all the
executables that load the Python 3 interpreter. Time: 1 day (but
possibly with discussion; should be done in parallel with other tasks;
assuming the distro survey above includes what we need here).
- The spec includes a list of required modules which will have to be
different for Python 3. We can use the Python 2 module list as a base,
and refer to upstream's document on module changes here:
http://www.python.org/dev/peps/pep-3108/
Time: 1 day.
- Optional: we do not currently track or test for the actual symbols
present in Python modules, as far as I can tell. This would be a
valuable addition. OTOH, it could take quite a bit of time. I would
recommend it only if we can somehow extract the proper symbol list from
the Python sources or docs in an automated fashion. Time: ?
- Database work, regens of misc-test, etc. to implement all of the
above, plus the inevitable shake-outs of problems encountered. Time: 1
week.
- Porting our adaptation of the Python upstream tests to the Python 3
implementation. Tweaking the Python 2 test build to build against
Python 3 instead should be easy; the difficult part will be to find and
fix all the build errors and other runtime assumptions. Time: 2 weeks.
- Getting lsbappchk-python working with Python 3. We could have a
completely separate lsbappchk-python3, or adapt the current code to
switch modes depending on what the actual script seems to call. Time: 1
week (or is that too optimistic? we'll have the lists of modules from a
previous task)
- Tweak App Checker's direct Python checks to detect and work with
Python 3. This appears to be the "utils/interpreted
languages/analyze_python.py" script. Time: 2 days.
So, total time as estimated here: 4 weeks, 6 days, not counting the
optional task of adding module symbols.
--
Jeff Licquia
The Linux Foundation
+1 (317) 915-7441
licquia at linuxfoundation.org
Linux Foundation Events Schedule: events.linuxfoundation.org
Linux Foundation Training Schedule: training.linuxfoundation.org
More information about the lsb-discuss
mailing list