Updating Jython from version 2.2.1 to version 2.5.2, possible risks

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

It seems too easy, but I'm afraid of possible errors that appear in the future.

Has anyone gone through this? Any backward compatibility?

Thanks!

+7
source share
1 answer

Jython 2.5.2 must have Python 2.5.2 functionality.

When performing a quick scan of a long list of release notes for Python 2.5.2 , nothing immediately jumps at me, suggesting backward compatibility is broken. If your code does not depend on the intermittent behavior of one of the fixed bugs in the release notes, you should be in okay.

My organization recently made the same update (Jython 2.2.1 -> Jython 2.5.2) without any problems.

Some things that I noticed during the upgrade that are specific to Jython:

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

If you updated the Java runtime that Jython is running in, you should also check out its release notes, especially if your code makes extensive use of Java's built-in packages.

+6
source

All Articles