ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Arch Linux: is it too soon to migrate to Python 3?

asked 2014-06-05 05:01:03 -0500

bchr gravatar image

updated 2014-06-05 05:23:18 -0500

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-re...

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-06-05 10:22:41 -0500

joq gravatar image

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.

edit flag offensive delete link more

Comments

So Indigo is a "transitional" distribution, and I can expect the next one to be Python 3 ready?

bchr gravatar image bchr  ( 2014-06-05 18:17:48 -0500 )edit

I don't know if it will be or not, but Indigo is definitely not.

joq gravatar image joq  ( 2014-06-05 22:31:17 -0500 )edit

Ok, thanks!

bchr gravatar image bchr  ( 2014-06-06 04:37:53 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-06-05 05:01:03 -0500

Seen: 553 times

Last updated: Jun 05 '14