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. -
jpype.startJVMoptionconvertStringsdefault will become False
in the next release. -
Undocumented feature of using a Python type in
JObject(obj, type=tp)
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 fromJDouble.
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.Objectandjava.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
will. -
Returns for number type primitives will retain their return type
information. These are derived from Pythonintandfloattypes
thus no change in behavior unless chaining from a Java methods
which is not allowed in Java without a cast.
JBooleanandJCharstill produce Python types only. -
Add support for direct conversion of multi-dimensional primitive arrays
withJArray.of(array, [dtype=type]) -
java.nio.Bufferderived objects can convert to memoryview if they
are direct. They can be converted to NumPy arrays with
numpy.asarray(memoryview(obj)). -
Proxies created with
@JImplementsproperly implementtoString,
hashCode, andequals. -
Proxies pass Python exceptions properly rather converting to
java.lang.RuntimeException -
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 argumentdeferredcan be started
prior to starting the JVM. Methods are checked at first object
creation. -
Fix bug that was causing
java.lang.Comparable,byte[],
andchar[]to be unhashable. -
Fix bug causing segfault when throwing Exceptions which lack a
default constructor. -
Fixed segfault when methods called by proxy have incorrect number of
arguments. -
Fixed stack overflow crash on iterating ImmutableList
-
java.util.Mapconforms to Pythoncollections.abc.MappingAPI. -
java.lang.ArrayIndexOutOfBoundsExceptioncan be caught with
IndexErrorfor consistency with Python exception usage. -
java.lang.NullPointerExceptioncan be caught withValueError
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
@JConversion
decorator on Python function taking Java class and Python object.
Converter function must produce a Java class instance. -
pathlib.Pathcan be implicitly converted intojava.lang.File
andjava.lang.Path. -
datetime.datatimecan implicitly convert tojava.time.Instant. -
dictandcollections.abc.Mappingcan convert tojava.util.Map
if all element are convertable to Java. Otherwise,TypeErroris
raised. -
listandcollections.abc.Sequencecan convert tojava.util.Collection
if all elements are convertable to Java. Otherwise,TypeErroris
raised.