Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading Jython from 2.2.1 version to 2.5.2, possible risks

We want to upgrade our version of Jython to 2.5.2. After reading documentation and testing, it seems like the only thing we have to do is to add the encoding magic comment in the beginning of each python file, i.e. #encoding=utf-8

It seems too easy but I am afraid of possible errors appearing in the future.

Has anyone gone through this? Any backward compatibilities?

Thanks!

like image 579
juankysmith Avatar asked Aug 13 '12 14:08

juankysmith


People also ask

What is the latest version of Jython?

The most recent release is Jython 2.7. 2. It was released on 21 March 2020 and is compatible with Python 2.7.

Is Jython supported?

Yes. Jython is an implementation of the Python language in Java. We strive to ensure that Jython remains as compatible with CPython as possible. The latest Jython release (2.2) implements the same language as CPython 2.2 and many of the CPython standard library modules.

Is Jython free?

Jython implementations are freely available for both commercial and non-commercial use.


1 Answers

Jython 2.5.2 should have the functionality of Python 2.5.2.

Doing a quick scan of the long list of release notes for Python 2.5.2, nothing immediately jumps out at me suggesting backwards compatibility is broken. Unless your code relies on the erratic behavior of one of the fixed bugs in the release notes, you should be fine.

My organization recently made the same upgrade (Jython 2.2.1 --> Jython 2.5.2) with no issues.

Some things I noticed while we were upgrading, that are peculiar to Jython:

  • os.chdir now works on Windows.
  • One of our Java packages started (properly) subclassing its Exceptions as java.lang.Exceptions in Jython.

If you upgraded the Java runtime your Jython runs under, you should check its release notes as well, especially if your code makes extensive use of the built-in Java packages.

like image 77
Robbie Rosati Avatar answered Sep 18 '22 08:09

Robbie Rosati