Python2.0vsPython3.0

Hello everyone
We are reading that Python 2.0 will be in EOL (End Of Life) status.
Are you considering that for the future versions of Ignition?

Ignition doesn’t use Python, but Jython (same language specification, different implementation).

Jython is a bit behind on features compared to Python. Jython still doesn’t have a 3.* version, and the final 2.7 version was only released 2 years ago. Ignition did upgrade to the latest version with Ignition 8.

So no, Ignition won’t be using Jython 3 anytime soon. but Jython 2 also isn’t officially EOL. It’s still possible to get bugfixes into the language.

1 Like

Also, the two biggest problems (IMNSHO) with Python 2.x don’t apply to Jython:

  1. Python2 plays fast and loose with character encodings, with strings implemented with 8-bit bytes. Python2 uses byte arrays as strings and vice versa throughout the implementation, with much associated grief for file and pipe access when trying to handle internationalization. Python3 separates byte arrays from strings throughout. Jython’s strings are Java strings, which are implemented with 16-bit short integer code points. Jython already has separation between byte arrays and strings, particularly when leveraging Java classes directly.

  2. Python, both 2.x and 3.x, suffers from poor threading performance, due to the existence of the global interpreter lock. Python3 works around this architectural problem with the widespread adoption of async/await event-driven functional structures. It doesn’t help computationally intensive threading tasks, but is astonishingly effective for I/O-bound tasks. Jython’s threads simply wrap Java threads, and the Java implementation of Jython’s core python data types makes use of concurrent base types and synchronization to avoid the need for the global interpreter lock. Jython is fully multithreaded in a way that Python2 will never be, and Python3 isn’t yet (and maybe never).

That said, Python3 has a number of language improvements that would be wonderful to have in Jython.

1 Like