Jython 何时支持 Python 3?

根据 Jython 的文档:

Jython 是 Java 平台的 Python 语言。 Jython 2.5实现了相同的功能 语言作为 CPython 2.5,并且几乎 所有的核心 Python 标准 库模块(CPython 是 C Python 的实现 ) Jython 2.5使用相同的 作为 CPython 的回归测试套件,具有 做了一些小小的修改。

是否有计划支持 Python3? 如果有,计划什么时候发布?

49421 次浏览

Jython roadmap is definitely outdated.
However, on Frank Wierzbicki's Weblog (one of Jython's main developers) you can get an update, telling that Python 3 is definitely on the radar.

Unfortunately, it is not yet clear when, as it is stated in a comment in that same blog from 2010:

Jython will reach 2.6 and later a 3.x, but it's hard to give a solid time frame. I'm hoping to get a 2.6 out in a few months.

In an interview in 2017, Wierzbicki stated that Python 3 is desirable but difficult.

Langfristig wollen wir eine 3.x-Version veröffentlichen, aber das ist ein langwieriger Prozess, weil es eine große Menge an Veränderungen in der 3.x-Serie gab.

English:

We want to publish a version 3.x in the long run, but that is a drawn-out process, because there were a lot of changes in the 3.x series.

Jython – Python in der Java-Welt [Pirates of the JVM], JAXenter, 2017-04-12.

Another update: an August 2020 commit clarified that the repository to look at is not the Jython3 one but the main Jython repo. Anyway "The latest version of Jython remains 2.7.x. A Jython 3.x should appear, but exploratory work towards it is not stable at the time of writing. Please watch the jython-dev mailing list for developements."


Update: 9 years after the question has been originally asked the answer now seems to be not in the near future. Most recent commit is now more than two years old (July 18, 2017), and developers say that the 3.x branch is "resting".


My original answer:

5 years after the question has been asked, the answer is still "it will come, but the time frame for an initial release is not clear yet".

What we can say is that now there is a jython3 repository targetting Python 3.5. README.md, dated 28 May 2015, says:

This repo is in the very early stages of development of a release of Jython 3.5. Planned goals are language and runtime compatibility with CPython 3.5, along with continued substantial support of the Python ecosystem.

Jython FAQ page states that:

Jython 3.x development is in progress.

I suggest looking elsewhere for a Python 3 interpreter on the JVM.

The GraalPython project (https://github.com/graalvm/graalpython) looks promissing. There is good rationale behind its existence, essentially it says "Let's support scientific computing and data analysis in Python, which means e.g. numpy, including native-code modules, and let's make it fast and interoperable".

Jython, not so much, at this point.

Probably the most up to date info on the Jython Website https://www.jython.org/jython-3-roadmap but without timescales.