Repository navigation
JPype 1.8.0 fixes a series of memory and reference leaks, among them the leak when Java threads call into Python, and adds Python 3.15. The full list of changes is in the changelog.
Free-threaded Python: JPype no longer claims to be safe without the GIL
Since 1.5.1, JPype declared to free-threaded Python (3.13t, 3.14t) that it can run without the GIL. That was wrong: JPype is not thread safe without the GIL, and using it from several threads at once can crash the process or corrupt data. We are sorry for shipping support that did not work and for the trouble it may have caused.
From 1.8.0 on, importing JPype on a free-threaded Python turns the GIL back on (Python prints a RuntimeWarning), so JPype behaves as on a regular Python. Please don't override this with PYTHON_GIL=0. On older versions, start Python with PYTHON_GIL=1. Working free-threading support is planned for 1.9 (#1515).
Highlights
- Memory: fixed leaks when Java threads call into Python (#1576), in int and float conversions (#1379), in Java-implementing Python proxies and in JVM thread attachments (#1486). Converting a buffer to a multidimensional Java array no longer leaks on JVMs that copy primitive arrays (#1580). Java-triggered Python garbage collections are throttled and synchronized (#1509).
- Python 3.15 wheels for Linux, Windows and macOS. New: Python 3.8 and 3.9 wheels for Linux aarch64 and i686. macOS now gets universal2 wheels only (macOS 11+, Apple Silicon and Intel).
- Deprecations are now visible by default: the new
jpype.JPypeDeprecationWarningderives fromFutureWarning(#1599). Passingbytesfor achar[]parameter is deprecated (#1586). jpype.dbapi2:Connection.isolation_leveland adecimal.Decimaladapter (#1491).- Source distribution: ships
org.jpype.jaragain, as up to 1.6.0, so building from it needs no JDK or Ant.
How this release was built
The release files were built and tested by GitHub Actions for the first time (#1605): every wheel is built from the sdist and passes the full test suite before upload. They are published to PyPI as a Trusted Publisher, and each file carries an attestation (PEP 740) that links it to the workflow run that built it.
The wheel file names carry build tag 0 (for example jpype1-1.8.0-0-cp312-cp312-win_amd64.whl); this has no effect on installation.