[Python-Dev] Fwd: Jython Report
michael at voidspace.org.uk
Sat Apr 12 17:56:46 CEST 2014
Below is the Jython "status update" report on Jython I received from Jim Baker and summarised in the Language Summit. It comes with one addendum from Frank:
Jim's list is fantastic - the one bit I'd like to add to the list:
Jython now supports a buffer protocol that parallels CPython's C API buffer protocol. This provided the basis for support of buffer() and memoryview(). The work was done with Jython3 in mind and will be a huge boost to that eventual effort.
Begin forwarded message:
> From: Jim Baker <jbaker at zyasoft.com>
> Subject: Re: Jython Report
> Date: 7 April 2014 06:42:51 BST
> To: Michael Foord <michael at voidspace.org.uk>
> Cc: Frank Wierzbicki <fwierzbicki at gmail.com>
> Recent changes to trunk (last 6 months)
> * Recently tagged a soft beta 2!
> * Java 7 JVM is now the minimum version, which gives a larger base of functionality to work with (such as using Java 7's AutoCloseable to imply corresponding context manager support in using Python code)
> * Enable mixing Python and Java types in the bases of a class when using a metaclass
> * Added support for buffer, memoryview, although not complete yet with respect to Java integration
> * Console and encoding support, such as unicodedata/idna updates
> * Many, many small fixes
> About to be in trunk, to support beta 3
> * socket-reboot reimplements socket/select/ssl on top of Netty 4, a popular event loop networking framework for the JVM (used by a large number of performant projects in Java space and originally part of JBoss). There was no ssl support before, but now socket and especially select semantics are much closer to CPython as well (basically close to the Windows socket model).
> * socket-reboot in turn enables requests and thereby pip. A branch of pip currently works, actually modifying an upstream vendor lib (html5lib) so that it doesn't use isolated UTF-16 surrogates in literals, since this is not actually legal unicode, nor does it work in Jython's UTF-16 based representation. Ironically this usage is to detect such illegal use in input streams.
> * Relative star imports, which seems to impact a number of interesting projects.
> * Performance tuning of sre. Jython has a port of CPython's sre, however our use of UTF-16 requires expansion into an array of codepoints. Currently this is done on demand, which can potentially add another O(n) factor in evaluating regexes. A pull request we will apply memoizes. In the future, we will rewrite the logic in sre so that it does next/prev, much like JRuby currently does for similar encoding issues.
> Related work
> * Other PyPA tooling including virtualenv and wheel needs more diagnosis to see why they currently fail on Jython, but our hope is that this is minor.
> * New project jythontools by a number of Jython developers (including Frank and Jim). This includes a number of projects that will help evolve Jython, but outside the usual release schedule and the usual problem of being in core (such as eventual deprecation):
> - Clamp - precise integration with Java, enabling such capabilities as Java directly importing Python modules without explicitly initializing the Jython runtime or using object factories. Future work will enable Java annotation integration, as decorators. Integrates with setuptools; future integration as well with Maven via Aether.
> - Jiffy - provide a CFFI backend for Jython. Right now it is pure vaporware, but cursory examination of cffi.backend_ctypes suggests that it should be straightforward and of modest effort to provide a similar backend by using JFFI, which Jython and JRuby both use to access native runtime services (such as Posix API) as part of the Java native runtime project.
> * The Patois project has been started to collect examples for cross-implementation support, as seen in surrogate support, but it will be a good question to get that really going, vs just talking about it.
> * JyNI - simply adding this jar to the classpath enables C extension API support. Note that this project has been licensed by its developer (not a Jython committer) under an LGPL license.
> Release schedule
> * Complete beta 2
> * Beta 3 is forthcoming, likely in 2 weeks
> * For beta 4, need to perform a comprehensive bug triage - what will be in, not in for 2.7.0
> * EuroPython sprint to finalize a release candidate for 2.7.0?
> * Mostly around performance, Java integration, and of course the usual bug fixes
> * Python bytecode compiler remains important, including for support targeting Android and removing restriction on getting too large a method for the JVM
> * More hooks for Java integration, including managing generated bytecode
> * Integrating Zippy could provide for PyPy-like performance, but requires Graal JVM
> * Supporting invokedynamic is a more realistic solution, but without the use of annotations (eg turn off Python frames) is going to be limited (maybe 2x?) based on earlier analysis
> Jython 3.x?
> * This comes up periodically, and it would be super nice for us to complete this support. At the very least it would make unicode strings and bytestrings correspond directly to how they are represented in Java, so that will be a nice cleanup.
> * Release schedule: we will get there at some point!
> On Sun, Apr 6, 2014 at 5:20 PM, Jim Baker <jbaker at zyasoft.com> wrote:
> I was thinking about this very topic this morning! Will send you the latest status in the next 24h, specifically our work to support pypa (setuptools, pip, virtualenv, wheel) and related tooling.
> - Jim
> On Sun, Apr 6, 2014 at 11:30 AM, Michael Foord <michael at voidspace.org.uk> wrote:
> Hey guys,
> Would you be able to write up a brief report on the current and future status of Jython, for me to read out at the Python language summit on Wednesday? (Unless someone who works on Jython will be there - but as far as I know that isn't the case.)
> All the best,
> Michael Foord
> May you do good and not evil
> May you find forgiveness for yourself and forgive others
> May you share freely, never taking more than you give.
> -- the sqlite blessing
May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev