0
$\begingroup$

Rosanswers logo

I was wondering whether using Python 3 was the right choice to package Indigo on Arch Linux. Indeed, Python 3 has been the default Python version on Arch Linux for nearly 4 years, so this is a question worth asking. According to REP 3:

Indigo Igloo (May 2014)

Ubuntu Saucy (13.10)
Ubuntu Trusty (14.04 LTS)
C++03
Boost 1.53
Lisp SBCL 1.0.x
Python 2.7 (Additional testing against Python 3.3 recommended)
CMake 2.8.11

And:

Python

Our intent with Python is to track the minimum version provided in the supported Ubuntu platforms, as well as survey other commonly used OS platforms that support ROS to determine a reasonable minimum target.

Ubuntu has announced plans to release 14.04 in April 2014 with Python 3 as its default interpreter. Some ROS infrastructure and core scripts already work with Python 3 since Groovy. But, it remains difficult to set up a test environment so ROS package developers can also port to Python 3.

The preferred migration strategy is to support both Python 2.7 and Python >= 3.2 in each source script. Supporting any version earlier than 2.6 makes that task harder. Python 3.0 and 3.1 will probably never be supported explicitly, although some things may work.

Also in the Wiki:

Python 3 support

While Indigo Debian packages will still use Python 2 by default all packages should aim to make their Python code work with both Python 2.7 as well as Python 3.3. Please see a list of common changes necessary: How to make your Python code compatible with version 2.7 and 3.3

Background research can be found here: http://lists.ros.org/pipermail/ros-release/2013-December/004327.html

So would it really be wise to move to Python 3 for Indigo on Arch Linux? Or is that clearly too soon if even Debian/Ubuntu stick with Python 2 for now anyway? I already upgraded the script we use to generate our PKGBUILDs to work with both versions, so this is just a matter of "how stable/reliable will it be with Python 3".

Also note that the current Python version on Arch is 3.4.1, not 3.3. Moreover, since Arch Linux is a rolling release, this is a choice that would matter until the end of Indigo support on Arch, since switching from Python 2 to Python 3 in a few months would certainly be a nightmare for the users.


Originally posted by bchr on ROS Answers with karma: 596 on 2014-06-05

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

If you want a set of packages that work, stick with Python 2. While many core ROS components have been tested with Python 3, very few other packages have.

If you want to break new ground in supporting Python 3, by all means give it a try. Please open bug issues for all components that fail.


Originally posted by joq with karma: 25443 on 2014-06-05

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by bchr on 2014-06-05:
So Indigo is a "transitional" distribution, and I can expect the next one to be Python 3 ready?

Comment by joq on 2014-06-05:
I don't know if it will be or not, but Indigo is definitely not.

Comment by bchr on 2014-06-06:
Ok, thanks!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.