➕ Added builds for Python 3.9. Python 3.9 on Windows is currently failing
due to issue in Python.
🛠 Fixed bug when importing from multi-release jars. The directory was
being truncated to only those classes in the overlay.
➕ addClassPath can add jar files after the JVM is started. The default
loader for JPype class is
🏗 Build support of z/OS added.
🐛 Bug causing ambiguity between primitives and variadic arguments in method
resolution was corrected.
Boolean was inadvertently left out of method resolution.
now properly matched with boxed types.
👌 Support for PyInstaller was added.
🐧 Linux binaries are now stripped for size.
➕ Add importlib.util to address instability in Python importlib boot process.
Certain versions of Python such as 3.9 appear to not properly load this
module resulting in unexpected errors during startJVM.
🚀 This pull release corrects an issue in the build system resulting in incomplete wheels on linux. No other changes from 1.1.0.
linux distribution were incomplete. Please use 1.1.1 release.
Correct bug resulting in reporting ambiguous overloads when resolving
methods with variadic arguments.
Ctrl+C behavior is switchable with interrupt flag to startJVM.
If True, process will halt on Ctrl-C. If False, the process
will transfer control to Python rather than halting. If
not specified JPype will assume false if Python is started as an
🛠 Fixed crash with Ctrl+C when multiple exceptions were generated.
✂ Removed extraneous exception when calling Ctrl+C before Java code is
executed for methods and fields.
🛠 Fixed memory leak with string cache.
🛠 Fixed crash when manually creating wrappers for anonymous classes.
🛠 Fixed reference count problem in stackframes used for exceptions.
*static*when the matching with a static method
so that it is clear when a member method was called statically.
java.lang.String slices function like Python string slice.
📦 Java packages now operate as normal Python modules. Removed restrictions
📦 regarding setattr. All package instances for the same package name are
shared so that functionality added to one instance is shared wiht all
The wrapper for Throwable was getting the wrapper for Object rather than
the expected wrapper resulting in odd conversions from Python classes.
✏️ Typos within the import system resulting in "jname" not found corrected.
C propagates to a KeyboardInterrupt properly.
➕ Added cache to the method dispatch to bypass resolution of overloads.
This reduces the cost of method resolution significantly especially if
the same overload is hit repeatedly such as during loop operations.
👌 Improved speed on transfer of lists, tuples, buffers to arrays of Java
primitives by a factor of 4 to 100 depending on the data type. The
⚡️ conversion uses optimized path for memory buffers, rather than the
Sequence API. When a Python buffer is encountered only the
first element is checked for conversion as Python buffers are homogeneous.
Corrected symbol problem with Python 3.5.3. PySlice_Unpack was introduced
🚀 in a later patch release and should not have been used.
shutdown The behavior log entry for changes on shutdown were lost in
🚀 the 1.0 release. JPype now calls the JVM shutdown routine which tries to
gracefully exit when shutdown is called. This results in several changes
in behavior. Non daemon threads can now hold open the JVM until they have
completed. Proxy calls will hold the shutdown until the call is completed
but will receive an interrupt message. Files now close properly and will
👻 flush if the threads properly handle the exception. Resource clean up
hooks and finalizers are executed. AtExit hooks in the JVM are called as
spawned threads. Automatic attachment of threads by use of the JVM from
Python are done as daemon but can be reattached as user threads on demand.
🐛 Buggy code that fails to properly handle thread clean up will likely hang
📚 on shutdown. Additional documentation is located in the user guide.
A bug was reported with numpy.linalg.inv resulting in crashes. This was
traced to an interaction with threading between the JVM and some compilations
↪ of numpy. The workaround appears to be calling numpy.linalg.inv prior to
starting the JVM.
special note To all our friends on opennet.ru, please blame not the translator. Translating my mangled English diction and word order is torture enough. Dyslexics of the world untie!
🚀 This is a single issue patch release for compatibility with Python 3.8.4.
- Workarounds for Python 3.8.4 release. Python altered logic regarding the use of
__setattr__for object and type, preventing it from being used to alter derived classes. Also the checking for errors was delegated from the
__setattr__method so exception types on some sanity checks needed to be updated accordingly.
- Workarounds for Python 3.8.4 release. Python altered logic regarding the use of
JCharis supported as a return type, thus rather than returning a string where a
JCharis expected. For compatibility
strand implements implicit conversion to an
intwhen used in numeric operations. Therefore, it passes the return, argument, and field contracts. But that means it is no longer considered a numerical type to Python and thus
isinstance(c, int)is False. This is consistent with the Java type conversion rules.
👍 Introduced Python operator for Java casting. In Java to cast to a type you would use
(Type) obj, but Python does not support anything similar. Therefore, we are enlisting the rarely used
matmuloperator as to allow an easy way to cast an object to a Java type. When a cast to a Java type is required, use
🛠 Introduced array notation to create Java arrays. In earlier versions, JArray factory was required to make a new array type. But this is tedious to read. In Java the notation would be
Typeto declare a type or
new Type[sz]to make a new array. Python does not directly support this notation, but it does allow for unspecified array sizes using a slice. All Java class types support
Type[sz]to create an array of a fixed size and
Type[:]to create an array type which can be instantiated later. This call be applied to multiple dimensions to create fixed sized arrays
Type[s1][s2][s3]to declare multi-dimension array types
Type[:][:][:]or to create a new multi dimensional array with unspecified dimensions
Type[sz][:][:]. Applying a slice with limits to a class is unsupported.
Java classes annotated with
@FunctionalInterfacecan be converted from any Python object that implements
__call__. This allows functions, lambdas, and class constructors to be used whereever Java accepts a lambda.
0️⃣ Deprecated class and functions were removed.
JIterator, use of
JExceptionas a factory,
0️⃣ Default for starting JVM is now to return Java strings rather than convert.
__int__so implicit conversions between float and integer types will produce a
✅ Use of
JExceptionis discouraged. To catch all exceptions or test if an object is a Java exception type, use
👻 Chained Java exception causes are now reflected in the Python stackframes.
✅ Use of
JStringis discouraged. To create a Java string or test if an object is a Java string type, use
⚡️ Updated the repr methods on Java classes.
java.util.Listcompletes the contract for
java.util.Collectioncompletes the contract for
Java classes are closed and will raise
TypeErrorif extended in Python.
🚦 Handles Control-C gracefully. Previous versions crash whenever Java handles the Control-C signal as they would shutdown Java during a call. Now JPype will produce a
InterruptedExceptionwhen returning from Java. Control-C will not break out of large Java procedures as currently implemented as Java does not have a specific provision for this.
🚀 This release is to fix an issue in which the development release was accidentally published as the source release on PyPi. v0.7.4 built from source from PyPi and on the Anaconda distributions should be replaced with this version. Changes in this release include
- 📚 Updated documentation
- 🚀 A revised release and testing process which should prevent similar issues in the future
🚀 This is a quick fix release to deal with a memory leak in array handling which allowed arrays to escape garbage collection when created from Python or as part of variable argument methods.
Corrected a resource leak in arrays that affects array initialization, and variable
⬆️ Upgraded diagnostic tracing and JNI checks to prevent future resource leaks.
🚀 This is a maintenance release correcting a number of issues from NumPy removal. Yet another stepping stone on the way to 1.0.
Replaced type management system , memory management for internal
classes is now completely in Java to allow enhancements for
👍 buffer support and revised type conversion system.
🚀 Python module
jpype.reflectwill be removed in the next release.
convertStringsdefault will become False
🚀 in the next release.
👷 Undocumented feature of using a Python type in
🗄 is deprecated to support casting to Python wrapper types in Java in a
🚀 future release.
⬇️ Dropped support for Cygwin platform.
JFloatproperly follows Java rules for conversion from
Floats outside of range map to inf and -inf.
java.lang.Numberconverts automatically from Python and Java numbers.
Java primitive types will cast to their proper box type when passed
to methods and fields taking Number.
java.lang.Numberbox signed, sized numpy types
(int8, int16, int32, int64, float32, float64) to the Java boxed type
with the same size automatically. Architecture dependent numpy
types map to Long or Double like other Python types.
Explicit casting using primitives such as JInt will not produce an
OverflowError. Implicit casting from Python types such as int or float
Returns for number type primitives will retain their return type
information. These are derived from Python
thus no change in behavior unless chaining from a Java methods
which is not allowed in Java without a cast.
JCharstill produce Python types only.
➕ Add support for direct conversion of multi-dimensional primitive arrays
java.nio.Bufferderived objects can convert to memoryview if they
are direct. They can be converted to NumPy arrays with
Proxies created with
Proxies pass Python exceptions properly rather converting to
JProxy.unwrap()will return the original instance object for proxies
created with JProxy. Otherwise will return the proxy.
JProxy instances created with the
convert=Trueargument will automatic
unwrap when passed from Java to Python.
JProxy only creates one copy of the invocation handler per
garbage collection rather than once per use. Thus proxy objects
placed in memory containers will have the same object id so long
as Java holds on to it.
@JImplementswith keyword argument
deferredcan be started
prior to starting the JVM. Methods are checked at first object
🛠 Fix bug that was causing
charto be unhashable.
🛠 Fix bug causing segfault when throwing Exceptions which lack a
0️⃣ default constructor.
🛠 Fixed segfault when methods called by proxy have incorrect number of
🛠 Fixed stack overflow crash on iterating ImmutableList
java.util.Mapconforms to Python
java.lang.ArrayIndexOutOfBoundsExceptioncan be caught with
IndexErrorfor consistency with Python exception usage.
java.lang.NullPointerExceptioncan be caught with
👻 for consistency with Python exception usage.
Replaced type conversion system , type conversions test conversion
once per type improving speed and increasing flexiblity.
👉 User defined implicit conversions can be created with
decorator on Python function taking Java class and Python object.
Converter function must produce a Java class instance.
pathlib.Pathcan be implicitly converted into
datetime.datatimecan implicitly convert to
collections.abc.Mappingcan convert to
if all element are convertable to Java. Otherwise,
collections.abc.Sequencecan convert to
if all elements are convertable to Java. Otherwise,