All Versions
17
Latest Version
Avg Release Cycle
128 days
Latest Release
327 days ago

Changelog History
Page 1

  • v1.2.0 Changes

    November 30, 2020

    โž• 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 org.jpype.classloader.DynamicClassLoader.

    ๐Ÿ— 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. boolean
    now properly matched with boxed types.

    ๐Ÿ‘Œ Support for PyInstaller was added.

  • v1.1.2 Changes

    October 23, 2020

    ๐Ÿง 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.

  • v1.1.1 Changes

    October 21, 2020

    ๐Ÿš€ This pull release corrects an issue in the build system resulting in incomplete wheels on linux. No other changes from 1.1.0.

  • v1.1.0 Changes

    October 20, 2020

    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
    interactive shell.

    ๐Ÿ›  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.

    Errors report *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
    instances.

  • v1.0.2 Changes

    July 31, 2020

    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!

  • v1.0.1 Changes

    July 16, 2020

    ๐Ÿš€ 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.
  • v1.0.0 Changes

    July 15, 2020

    ๐Ÿ‘ JChar is supported as a return type, thus rather than returning a string where a JChar is expected. For compatibility JChar is
    derived from str and implements implicit conversion to an int when 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 matmul operator as to allow an easy way to cast an object to a Java type. When a cast to a Java type is required, use [email protected] or (Type)@obj.

    ๐Ÿ›  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 Type[] to 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 @FunctionalInterface can 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 JException as a factory, get_default_jvm_path, jpype.reflect module.

    0๏ธโƒฃ Default for starting JVM is now to return Java strings rather than convert.

    Python deprecated __int__ so implicit conversions between float and integer types will produce a TypeError.

    โœ… Use of JException is discouraged. To catch all exceptions or test if an object is a Java exception type, use java.lang.Throwable.

    ๐Ÿ‘ป Chained Java exception causes are now reflected in the Python stackframes.

    โœ… Use of JString is discouraged. To create a Java string or test if an object is a Java string type, use java.lang.String.

    โšก๏ธ Updated the repr methods on Java classes.

    java.util.List completes the contract for collections.abc.Sequence and collections.abc.MutableSequence.

    java.util.Collection completes the contract for collections.abc.Collection.

    Java classes are closed and will raise TypeError if 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 InterruptedException when 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.

  • v0.7.5 Changes

    May 13, 2020

    ๐Ÿš€ 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
  • v0.7.4 Changes

    April 29, 2020

    ๐Ÿš€ 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
    argument methods.

    โฌ†๏ธ Upgraded diagnostic tracing and JNI checks to prevent future resource leaks.

  • v0.7.3 Changes

    April 21, 2020

    ๐Ÿš€ 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.reflect will be removed in the next release.

    0๏ธโƒฃ jpype.startJVM option convertStrings default 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.

    JFloat properly follows Java rules for conversion from JDouble.
    Floats outside of range map to inf and -inf.

    java.lang.Number converts 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.Object and java.lang.Number box 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 Python int and float types
    thus no change in behavior unless chaining from a Java methods
    which is not allowed in Java without a cast.
    JBoolean and JChar still produce Python types only.

    โž• Add support for direct conversion of multi-dimensional primitive arrays
    with JArray.of(array, [dtype=type])

    java.nio.Buffer derived objects can convert to memoryview if they
    are direct. They can be converted to NumPy arrays with
    numpy.asarray(memoryview(obj)).

    Proxies created with @JImplements properly implement toString,
    hashCode, and equals.

    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=True argument 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.

    @JImplements with keyword argument deferred can be started
    prior to starting the JVM. Methods are checked at first object
    creation.

    ๐Ÿ›  Fix bug that was causing java.lang.Comparable, byte[],
    and char[] to 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
    arguments.

    ๐Ÿ›  Fixed stack overflow crash on iterating ImmutableList

    java.util.Map conforms to Python collections.abc.Mapping API.

    java.lang.ArrayIndexOutOfBoundsException can be caught with
    ๐Ÿ‘ป IndexError for consistency with Python exception usage.

    java.lang.NullPointerException can be caught with ValueError
    ๐Ÿ‘ป 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.Path can be implicitly converted into java.lang.File
    and java.lang.Path.

    datetime.datatime can implicitly convert to java.time.Instant.

    dict and collections.abc.Mapping can convert to java.util.Map
    if all element are convertable to Java. Otherwise, TypeError is
    raised.

    list and collections.abc.Sequence can convert to java.util.Collection
    if all elements are convertable to Java. Otherwise, TypeError is
    raised.