Skip to content

Support for Jpype1==0.7 (maintaining compatibility with 0.6 in the same codebase)

Philip Elson requested to merge pelson/pyjapc:jpype_0p7 into master

Note: A change needs to be made to cmmndep_build_manager to remove the following warning: (done in cmmnbuild-dep-manager!18 (merged))

/opt/conda/envs/py36/lib/python3.6/site-packages/jpype/_core.py:210
  /opt/conda/envs/py36/lib/python3.6/site-packages/jpype/_core.py:210: UserWarning: 
  -------------------------------------------------------------------------------
  Deprecated: convertStrings was not specified when starting the JVM. The default
  behavior in JPype will be False starting in JPype 0.8. The recommended setting
  for new code is convertStrings=False.  The legacy value of True was assumed for
  this session. If you are a user of an application that reported this warning,
  please file a ticket with the developer.

Thankfully that isn't a blocker to this being merged though.

For the record, the main changes (ref CHANGELOG) that impacted this MR:

  • there are no longer implicit properties generated for getters and setters. Apparently this was undocumented:

    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.

  • _JWrapper, and its very concept, was removed. Luckily the usage was limited to checking for base-type isinstance, which could be replaced directly with jpype._jtypes._JPrimitiveClass (another undocumented, private, base-class).

  • There was use of a magic property generation for IncaConfigurator.isConfigured in Jpype 0.6. This has been changed to use the public method instead.

This MR also adds a parallel test to ensure that the fix remains fixed for ongoing versions of 0.6 and 0.7 of Jpype. I propose that PyJapc attempts to support at most two concurrent versions of Jpype.

**NOTE: ** I have not inspected every single line of PyJapc. This migration is based on the test coverage alone. Further usage is likely to lead to other cases emerging. If such cases emerge, we gain new test coverage.

Edited by Philip Elson

Merge request reports