Major changes:
- Added a cache to method calls to avoid overload resolution, greatly reducing the performance impact of method resolution, especially if the same overload is called many times, as in loops.
- From 4 to 100 times, depending on the type of data, the transfer of lists, tuples and buffers to arrays of Java primitives is accelerated. The transformation uses optimized in-memory buffer handling instead of the Sequence API. When a Python buffer is encountered, only the first element is checked for conversion, since these buffers are homogeneous.
- Handling shutdown operations (implemented in JPype 1.0.0, but skipped when preparing the changelog). JPype now calls the JVM's shutdown procedure, which tries to gracefully exit. This results in several behavioral changes. Non-background threads (proxy calls) can now keep the JVM open until they are terminated. Proxy calls will process shutdown until the call is completed, but will receive an abort message. Files are now closed properly and flushed to disk if the threads handle the exception properly. Resource cleanup hooks and finalizers are executed. When threads are spawned, AtExit hooks are called. Through the daemon, automatic thread attachment is implemented when using the JVM from Python. The erroneous code that fails to properly handle thread cleanup is likely to hang on shutdown. Additional documentation is in the user guide.
- The wrapper for Throwable was getting a wrapper for Object instead of the expected result, leading to strange conversions from Python classes.
- Fixed typos in the import system that resulted in a '"jname" not found' error.
- Ensured correct promotion of "^C" in KeyboardInterrupt.
- Fixed character issue with Python 3.5.3. PySlice_Unpack was introduced in a subsequent patch release (3.5.4) and should not have been used.
- Fixed a crash with numpy.linalg.inv. The issue has been traced back to thread interaction between the JVM and some variants of numpy. The suggested solution is to call numpy.linalg.inv before starting the JVM.
Source: opennet.ru