The EOL date for Python 2.7 support is rapidly closing! After December 31st, 2019, Python 2.7 is officially no longer supported by the Python team. Many Python packages and tools have also pledged to stop support or even stop working after that date.
Panda3D 1.10 already has great support for Python 3, and the dev team is also looking forward to the day that we no longer need to worry about Python 2. It is an increasingly significant maintenance burden to keep supporting it, and a lot of effort goes into it that should be going into more important features, like improving the rendering engine, mobile support, etc.
I’ve created this thread to try and understand if there are still people using Python 2, and if so, why. If there are any roadblocks we can help alleviate, that would be good to know. Please share your thoughts!
- Yes, of course I’m on Python 3 already!
- Almost—I’m working on it!
- Soon—I have plans to upgrade before EOL
- No, and I have not thought about upgrading yet
I’m heavily in favor of phasing out Python 2.7 support in Panda3D asap. Reducing the scope and complexity should be a main goal and supporting Python 2.7 definitely adds a lot of overhead to keep everything running smoothly and eats away resources that could be otherwise spent on sensible features instead!
I’ve moved to py3 around the time 3.6 came out, before that 3.x had some performance hiccups but now 3.7 is the fastest python.
One reason to use python 2.7 is for WindowsXP, but it’s 2019 even my 70 years old Dad gave up on XP and moved to Lubuntu after complaining that Windows 10 have no drivers for his old scanner.
If someone is afraid that much code needs to be changed to convert from py2 to py3 - fear not, 95% of the changes needed are very simple:
xrange, the occasional conversion from unicode to bytes, and
except SomeError as error
A few years ago my hesitation for moving to python 3 was that it didn’t yet have the module/library ecosystem available that python 2 had. But in the past couple years everything that I’ve looked for and use is available for python 3. Most of my python 2 code has ported easily by simply putting parens around my print statements.
My hybrid python/C++ project needed quite a few tweaks to port to python3 due to changes in the C api and the use of wide strings, but all of this is transparent to native python code projects.
Hopefully most people still on python 2 will be able to easily port their code to v3.
I’ve switched over; and indeed, aside from some stumbling blocks related to the changes to strings, I found it to be a fairly painless experience–far more so than I feared, as I recall!
Given that Python 2 is nearing its end-of-life, and given the overhead of supporting both Python 2 and Python 3, I think that it sounds like a good idea to drop support for Python 2.
My app is compatible with both Python2 and Python3, but it’s only because I don’t rely on features that have drastically changed between the two versions (And this is only for convenience as I have older platform that still have Python2 by default and I’m too lazy to install P3 ), so for me Python2 support can be dropped at any time.
I would suggest to keep Python2 support in 1.10 as is and only perform critical bugfixes or changes that help migration to python3 (like support for new division https://github.com/panda3d/panda3d/issues/529) to avoid that people have incentives to keep using Python2.