Skip to content

JPype 0.7

Compare
Choose a tag to compare
@marscher marscher released this 24 Jun 23:40
· 1739 commits to master since this release
217b4e0
  • Doc strings are generated for classes and methods.

  • Complete rewrite of the core module code to deal unattached threads,
    improved hardening, and member management. Massive number of internal
    bugs were identified during the rewrite and corrected.
    See the :doc:ChangeLog-0.7 for details of all changes.

  • API breakage:

    • Java strings conversion behavior has changed. The previous behavior was
      switchable, but only the default convert to Python was working.
      Converting to automatically lead to problems in which is was impossible
      to work with classes like StringBuilder in Java. To convert a Java
      string use str(). Therefore, string conversion is currently selected
      by a switch at the start of the JVM. The default shall be False
      starting in JPype 0.8. New code is encouraged to use the future default
      of False. For the transition period the default will be True with a
      warning if not policy was selected to encourage developers to pick the
      string conversion policy that best applies to their application.

    • Java exceptions are now derived from Python exception. The old wrapper
      types have been removed. Catch the exception with the actual Java
      exception type rather than JException.

    • Undocumented exceptions issued from within JPype have been mapped to the
      corresponding Python exception types such as TypeError and
      ValueError appropriately. Code catching exceptions from previous
      versions should be checked to make sure all exception paths are being
      handled.

    • Undocumented property import of Java bean pattern get/set accessors was
      removed as the default. It is available with import jpype.beans, but
      its use is discouraged.

  • API rework:

    • JPype factory methods now act as base classes for dynamic
      class trees.
    • Static fields and methods are now available in object
      instances.
    • Inner classes are now imported with the parent class.
    • jpype.imports works with Python 2.7.
    • Proxies and customizers now use decorators rather than
      exposing internal classes. Existing JProxy code
      still works.
    • Decorator style proxies use @JImplements and @JOverload
      to create proxies from regular classes.
    • Decorator style customizers use @JImplementionFor
    • Module jpype.types was introduced containing only
      the Java type wrappers. Use from jpype.types import * to
      pull in this subset of JPype.
  • synchronized using the Python with statement now works
    for locking of Java objects.

  • Previous bug in initialization of arrays from list has been
    corrected.

  • Added extra verbiage to the to the raised exception when an overloaded
    method could not be matched. It now prints a list of all possible method
    signatures.

  • The following is now DEPRECATED

    • jpype.reflect.* - All class information is available with .class_
    • Unnecessary JException from string now issues a warning.
  • The following is now REMOVED

    • Python thread option for JPypeReferenceQueue. References are always handled with
      with the Java cleanup routine. The undocumented setUsePythonThreadForDaemon()
      has been removed.
    • Undocumented switch to change strings from automatic to manual
      conversion has been removed.
    • Artifical base classes JavaClass and JavaObject have been removed.
    • Undocumented old style customizers have been removed.
    • Many internal jpype symbols have been removed from the namespace to
      prevent leakage of symbols on imports.
  • promoted --install-option to a --global-option as it applies to the build as well
    as install.

  • Added --enable-tracing to setup.py to allow for compiling with tracing
    for debugging.

  • Ant is required to build jpype from source, use --ant= with setup.py
    to direct to a specific ant.