Skip to content

Commit

Permalink
Merge pull request #509 from Thrameos/caller_sensitive
Browse files Browse the repository at this point in the history
Caller sensitive
  • Loading branch information
marscher committed Aug 4, 2019
2 parents 9548fd7 + b6b3fd9 commit bf6f8b6
Show file tree
Hide file tree
Showing 50 changed files with 745 additions and 154 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Expand Up @@ -32,7 +32,6 @@ matrix:
- python: nightly
- python: pypy
- python: pypy3
- os: osx

include:
- name: "Python 2.7 on Xenial Linux (w/o NUMPY)"
Expand Down Expand Up @@ -82,8 +81,6 @@ matrix:
- PIP=pip3
- JPYPE_STR_CONVERSION=False

## This pattern is good, but something is broken in openJDK 12
## Deal with in another pull
- name: "Python 2.7 on macOS"
os: osx
osx_image: xcode10.2
Expand Down
10 changes: 5 additions & 5 deletions appveyor.yml
Expand Up @@ -42,6 +42,11 @@ environment:
# ARCH: x86_64
# CYGSH: C:\Cygwin64\bin\bash -c

- PYTHON: "python3.7"
CYGWIN: "C:\\cygwin64"
ARCH: x86_64
CYGSH: C:\Cygwin64\bin\bash -c

- PYTHON: "C:\\Miniconda"
ARCH: x86
CONDA_PY: "2-latest"
Expand All @@ -50,11 +55,6 @@ environment:
ARCH: x86_64
CONDA_PY: "2-latest"

- PYTHON: "python3"
CYGWIN: "C:\\cygwin64"
ARCH: x86_64
CYGSH: C:\Cygwin64\bin\bash -c

- PYTHON: "C:\\Miniconda3"
ARCH: x86
CONDA_PY: "3-latest"
Expand Down
20 changes: 8 additions & 12 deletions appveyor/install.sh
Expand Up @@ -14,35 +14,31 @@ if [ ! -d "$JAVA_HOME" ]; then
exit -1
fi


# Make sure the jvm.dll is where it should be
find "$JAVA_HOME" -name "jvm.dll"

# Define programs
SETUP=/setup-$ARCH
if [ $PYTHON = "python3" ]; then
PIP=pip3
EASYINSTALL=easy_install-3.6
else
PIP=pip
EASYINSTALL=easy_install-2.7
fi

# Install prereqs
echo "==== update gcc"
$SETUP -q -P gcc-core,gcc-g++,libcrypt-devel
echo "==== update python"
$SETUP -q -P $PYTHON,$PYTHON-numpy,$PYTHON-devel,$PYTHON,$PYTHON-setuptools
if [ $PYTHON = "python3.7" ]; then
$SETUP -q -P python37,python37-numpy,python37-devel
fi
echo "==== get modules"
$EASYINSTALL pip
$EASYINSTALL mock
#$PIP install mock
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$PYTHON get-pip.py
$PYTHON -m pip install setuptools
$PYTHON -m pip install mock
git clone --depth=1 https://github.com/pypa/setuptools.git
cd setuptools
$PYTHON ./bootstrap.py
$PYTHON -m pip install ./
cd ..
rm -r ./setuptools

git clone --depth=1 https://github.com/pypa/wheel.git
git clone --depth=1 https://github.com/pypa/pip.git
git clone --depth=1 https://github.com/pypa/setuptools_scm.git
Expand Down
14 changes: 12 additions & 2 deletions doc/CHANGELOG.rst
Expand Up @@ -4,12 +4,22 @@ Changelog
This changelog *only* contains changes from the *first* pypi release (0.5.4.3) onwards.

- **Next version - unreleased**

- Updated getJVMVersion to work with JDK 9+.

- Added support for pickling of Java objects using optional module
``jpype.pickle``

- Fixed incorrect string conversion on exceptions.
- Fixed incorrect string conversion on exceptions. `str()` was
incorrectly returning `getMessage` rather than `toString`.

- Fixed an issue with JDK 12 regarding calling methods with reflection.

- Corrected segfault when converting null elements while accessing a slice
- Removed limitations having to do with CallerSensitive methods. Methods
affected are listed in :doc:`caller-sensitive`. Caller sensitive
methods now receive an internal JPype class as the desut

- Fixed segfault when converting null elements while accessing a slice
from a Java object array.

- PyJPMethod now supports the FunctionType API.
Expand Down
96 changes: 96 additions & 0 deletions doc/caller_sensitive.rst
@@ -0,0 +1,96 @@
The following methods use the caller sensitive (as of JDK 12):

- ``java.io.ObjectStreamClass.forClass``
- ``java.io.ObjectStreamField.getType``
- ``java.lang.Class.forName``
- ``java.lang.Class.newInstance``
- ``java.lang.Class.getClassLoader``
- ``java.lang.Class.getEnclosingMethod``
- ``java.lang.Class.getEnclosingConstructor``
- ``java.lang.Class.getDeclaringClass``
- ``java.lang.Class.getEnclosingClass``
- ``java.lang.Class.getClasses``
- ``java.lang.Class.getFields``
- ``java.lang.Class.getMethods``
- ``java.lang.Class.getConstructor``
- ``java.lang.Class.getConstructors``
- ``java.lang.Class.getField``
- ``java.lang.Class.getMethod``
- ``java.lang.Class.getDeclaredClasses``
- ``java.lang.Class.getDeclaredField``
- ``java.lang.Class.getDeclaredFields``
- ``java.lang.Class.getDeclaredMethod``
- ``java.lang.Class.getDeclaredMethods``
- ``java.lang.Class.getDeclaredConstructor``
- ``java.lang.Class.getDeclaredConstructors``
- ``java.lang.Class.getResource``
- ``java.lang.Class.getResourceAsStream``
- ``java.lang.Class.getNestHost``
- ``java.lang.Class.getNestMembers``
- ``java.lang.ClassLoader.getParent``
- ``java.lang.ClassLoader.getPlatformClassLoader``
- ``java.lang.invoke,MethodHandleProxies.asInterfaceInstance``
- ``java.lang.invoke.MethodHandles.lookup``
- ``java.lang.Module.addReads``
- ``java.lang.Module.addExports``
- ``java.lang.Module.addOpens``
- ``java.lang.Module.addUses``
- ``java.lang.Module.getResourceAsStream``
- ``java.lang.Package.getPackage``
- ``java.lang.Package.getPackages``
- ``java.lang.reflect.AccessibleObject.setAccessible``
- ``java.lang.reflect.AccessibleObject.setAccessible``
- ``java.lang.reflect.AccessibleObject.trySetAccessible``
- ``java.lang.reflect.AccessibleObject.canAccess``
- ``java.lang.reflect.Constructor.setAccessible``
- ``java.lang.reflect.Constructor.newInstance``
- ``java.lang.reflect.Field.setAccessible``
- ``java.lang.reflect.Field.get``
- ``java.lang.reflect.Field.getBoolean``
- ``java.lang.reflect.Field.getByte``
- ``java.lang.reflect.Field.getChar``
- ``java.lang.reflect.Field.getShort``
- ``java.lang.reflect.Field.getInt``
- ``java.lang.reflect.Field.getLong``
- ``java.lang.reflect.Field.getFloat``
- ``java.lang.reflect.Field.getDouble``
- ``java.lang.reflect.Field.set``
- ``java.lang.reflect.Field.setBoolean``
- ``java.lang.reflect.Field.setByte``
- ``java.lang.reflect.Field.setChar``
- ``java.lang.reflect.Field.setShort``
- ``java.lang.reflect.Field.setInt``
- ``java.lang.reflect.Field.setLong``
- ``java.lang.reflect.Field.setFloat``
- ``java.lang.reflect.Field.setDouble``
- ``java.lang.reflect.Method.setAccessible``
- ``java.lang.reflect.Method.invoke``
- ``java.lang.reflect.Proxy.getProxyClass``
- ``java.lang.reflect.Proxy.newProxyInstance``
- ``java.lang.reflect.Proxy.getInvocationHandler``
- ``java.lang.Runtime.load``
- ``java.lang.Runtime.loadLibrary``
- ``java.lang.StackWalker.walk``
- ``java.lang.StackWalker.forEach``
- ``java.lang.StackWalker.getCallerClass``
- ``java.lang.System.getLogger``
- ``java.lang.System.getLogger``
- ``java.lang.System.load``
- ``java.lang.System.loadLibrary``
- ``java.lang.Thread.getContextClassLoader``
- ``java.security.AccessController.doPrivileged``
- ``java.security.AccessController.doPrivilegedWithCombiner``
- ``java.util.concurrent.atomic.AtomicIntegerFieldUpdater.newUpdater``
- ``java.util.concurrent.atomic.AtomicLongFieldUpdater.newUpdater``
- ``java.util.concurrent.atomic.AtomicReferenceFieldUpdater.newUpdater``
- ``java.util.ResourceBundle.getBundle``
- ``java.util.ResourceBundle.clearCache``
- ``java.util.ServiceLoader.load``
- ``java.util.ServiceLoader.loadInstalled``
- ``java.util.logging.Logger.getLogger``
- ``java.util.logging.Logger.getLogger``
- ``java.util.logging.Logger.getAnonymousLogger``
- ``java.sql.DriverManager.getConnection``
- ``java.sql.DriverManager.getDriver``
- ``java.sql.DriverManager.deregisterDriver``
- ``java.sql.DriverManager.getDrivers``

0 comments on commit bf6f8b6

Please sign in to comment.