Chaquopy version 17.0.0

Posted on

Features

  • Improved compatibility with various ways of bundling non-Python libraries in a wheel. (#892#1383)
  • Update to pip version 25.3. (#981)
  • Improved detection of changes to buildPython. (#991)
  • Devices with 16 KB pages are now supported. However, any Android wheels built before October 2024 will still fail to load on 16 KB devices. For best compatibility with these devices, use Python 3.13 or later. (#1171)
  • Python version 3.14 is now supported. (#1350)
  • Update runtime Python versions to 3.10.19, 3.11.14, 3.12.12, 3.13.9 and 3.14.0. (#1352)
  • Update CA bundle to certifi 2025.8.3. (#1353)
  • Improved compatibility with various ways of tagging a wheel as Android-specific. (#1374)
  • Improved error messages when buildPython is not found. (#1411)
  • Added the wildcard * to extractPackages to extract all packages at startup. (#1424)

Deprecations and Removals

  • Pip now uses the --only-binary option, so it will no longer install sdists from PyPI or other indexes. Installing a local path to an sdist or source directory is still possible, as long as it’s a pure-Python package. (#981)
  • Pip’s --extra-index-url option no longer accepts local paths. Use --find-links instead, but note that this option expects wheels to be directly under the given directory, not in subdirectories named after each package. (#981)
  • buildPython must now have the same Python major and minor versions as the app. (#991)
  • The default Python version is now 3.10, and Python 3.8 and 3.9 are no longer supported. Some packages are not available yet for Python 3.10 or later. If you need any of those packages, please remain on the previous version of Chaquopy for now. (#1039)
  • Android Gradle plugin versions 7.0 to 7.2 are no longer supported. (#1373)
  • buildPython commands with multiple arguments must now be passed as multiple strings, not as a single space-separated string. (#1411)
  • Pip no longer prefers older Android wheels over newer pure-Python wheels. (#1417)

Bugfixes

  • Handle the Chaquopy and Android plugins being declared in the top-level plugins block of settings.gradle, as Flutter does. (#1289)
  • The importer now matches the standard behavior of preferring an .so file over a .py file of the same name. (#1431)

Chaquopy version 16.1.0

Posted on

Features

  • The “may have fewer packages available” warning has been removed, since the default Python version no longer has a clear advantage in its package selection. (#1272)
  • The _chaquopy stub libraries for OpenSSL and SQLite are now linked in 16 KB mode. (#1324)
  • Android Gradle plugin version 8.9 is now supported. (#1340)

Bugfixes

  • .pth files are now processed after sys.path is fully initialized. (#1338)
  • The importer now recognizes libraries with an SOABI suffix such as .cpython-313-aarch64-linux-android.so. (#1370)

Chaquopy version 16.0.0

Posted on

Features

  • Update CA bundle to certifi 2024.8.30. (#1169)
  • Python version 3.13 is now supported. (#1210#1212)
  • Update runtime Python versions to 3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.7 and 3.13.0. (#1211)
  • Android Gradle plugin versions 8.6 to 8.7 are now supported. (#1224#1245)

Deprecations and Removals

Bugfixes

  • When exceptions are thrown during an import, the traceback now contains only a single copy of import_override, rather than one for every import level. (#889)
  • sys.stdin is no longer overridden, so it has all the standard attributes including buffer. (#1083)

Chaquopy version 15.0.1

Posted on

Features

  • Kotlin build.gradle.kts files are now supported. (#231)
  • A new Gradle DSL has been added, with a top-level chaquopy block. Kotlin build.gradle.kts files must use the new DSL; Groovy build.gradle files may use either the new or the old one. (#231)
  • All Android wheels are now downloaded from https://chaquo.com/pypi-13.1/ – the old pypi-7.0 URL is no longer used. (#808)
  • os.get_terminal_size now returns ENOTTY rather than EPERM, which was causing avc log spam when stdio is redirected. (#886)
  • Update CA bundle to certifi 2023.11.17. (#893)
  • Android Gradle plugin versions 8.1 and 8.2 are now supported. (#908#1003)
  • Python version 3.12 is now supported. (#931#967)
  • Update runtime Python versions to 3.8.18, 3.9.18, 3.10.13, 3.11.6, and 3.12.1. (#932)
  • The importlib.resources.files API is now supported in Python 3.9 and later. (#977)
  • Update pkg_resources from setuptools version 68.2.2.

Deprecations and Removals

  • The 32-bit ABIs armeabi-v7a and x86 will no longer be supported on Python 3.12 and later. (#709)
  • Android Gradle plugin versions 4.1 and 4.2 are no longer supported. (#787#840)

Bugfixes

  • Fix “AttributeError: “‘AssetFinder’ object has no attribute ‘extract_packages’” when AssetFinder subdirectories are on sys.path. (#820)
  • Unsupported socket functions such as if_nametoindex now throw OSError as documented, rather than AttributeError. (#870)
  • Fix FileNotFoundError when pkgutil.iter_modules is called with a nonexistent path. (#917)
  • ZIP files using BZ2 or LZMA compression are now supported. (#953)

Chaquopy version 14.0.2

Posted on

Features

  • sys.stdout and sys.stderr are now line-buffered by default. (#654#746#757)
  • Add option to redirect native stdout and stderr to Logcat. (#725)
  • Update to Python version 3.8.16 and OpenSSL version 1.1.1s. This fixes the Google Play warning “Your app uses a defective version of the OpenSSL library”. (#727)
  • Update CA bundle to certifi 2022.12.7. (#747)
  • Add python executable as a final fallback when searching for buildPython. (#752)
  • Restore the extractPackages setting, for code that requires its modules to exist as separate .py files. (#754)
  • Android Gradle plugin version 7.4 is now supported. (#756)
  • Update to pip version 20.1.

Deprecations and Removals

Bugfixes

  • Enable PEP 517 builds in pip. (#715)
  • Show correct error message when buildPython autodetection fails. (#733)
  • Fix error when calling entry_points with an unreadable directory on sys.path. (#755)
  • Fix “Could not find an activated virtualenv” error when PIP_REQUIRE_VIRTUALENV environment variable is set. (#777)

Chaquopy version 13.0.0

Posted on

Changes:

  • Android Gradle plugin version 7.3 is now supported (#663).
  • [BACKWARD INCOMPATIBLEminSdkVersion must now be at least API level 21. This still covers 98% of active devices.
  • Python versions 3.9, 3.10 and 3.11 are now supported (#661).
  • Detect changes to files or directories listed in requirements files (#660).
  • Projects are no longer required to have a local.properties file, as long as the ANDROID_HOME or ANDROID_SDK_ROOT environment variable is set (#672).
  • Enable all warnings, including DeprecationWarningPendingDeprecationWarningImportWarning and ResourceWarning.
  • Update to pkg_resources version 56.2.0.
  • Update to SQLite version 3.39.2.
  • Update Python 3.9 and later to OpenSSL version 3.0.5.

The following packages have been updated since the previous version:

  • scikit-image

Chaquopy is now open-source

Posted on

I’m delighted to announce that, thanks to support from Anaconda, Chaquopy is now free and open-source. The SDK’s full source code is available on GitHub under the MIT license.

The first open-source version is 12.0.1, which was released today. Apart from removing the license restrictions, it’s identical to version 12.0.0.

If you’re using an older version of Chaquopy, see here for advice.

Chaquopy version 12.0.0

Posted on

Changes:

  • Android Gradle plugin version 7.2 is now supported (#613), and version 4.0 is no longer supported.
  • Update to Python version 3.8.13 (see its changelog for details).
  • Update CA bundle to certifi 2021.10.8.
  • Fix signal.valid_signals on 32-bit ABIs (#600).
  • Allow buildscript configuration to be in a subproject (#615).

The following packages have been added to the repository since the previous version:

  • zstandard

And the following packages have been updated:

  • cryptography

Chaquopy version 11.0.0

Posted on

Changes:

  • Android Gradle plugin version 7.1 is now supported, and version 3.6 is no longer supported.
  • Remove warning about untested Android Gradle plugin versions, as they are usually backward compatible.
  • Gradle pluginManagement and plugins syntax is now supported.
  • Java arrays now support the copy.copy function in Python.
  • Passing an unsupported Java object to copy.copycopy.deepcopy or pickle now fails with a clearer error message.

The following packages have been added to the repository since the previous version:

  • aiohttp
  • frozenlist
  • pyzbar
  • rawpy
  • spectrum

And the following packages have been updated:

  • numpy
  • pillow
  • pynacl
  • regex
  • tokenizers

Chaquopy version 10.0.1

Posted on

Changes:

  • Android Gradle plugin versions 4.2 and 7.0 are now supported, and versions 3.4 and 3.5 are no longer supported.
  • The version setting is no longer supported. Simply remove it to use the current version of Python.
  • Update to Python version 3.8.11 (see its changelog for details).
  • Update to pip version 19.2.3 (see its changelog for details).
  • Update CA bundle to certifi 2021.5.30.
  • Add a buffer attribute to stdout and stderr for bytes output (#464#516).
  • Java arrays now support the index and count methods in Python. In order to support code with hasattr checks, they also now implement the methods __contains____iter__ and __reversed__, rather than relying on the fallback to __getitem__ (#306).
  • Fix “truth value of an array with more than one element is ambiguous” error when passing a NumPy array to a method which takes a Java array (#526).
  • NumPy integer scalars, and anything else which implements the __index__ method, can now be used as a Java array index (#495).
  • Add workaround to help conda Python on Windows find its SSL libraries (#450).
  • Fix “invalid literal for int” error in pip_install when project path includes a symlink (#468).
  • Fix crash caused by empty files in the APK on Android 7 (Electron Cash #2136).
  • importlib.util.spec_from_file_location now works for paths loaded from the APK.

The following packages have been added to the repository since the previous version:

  • argon2-cffi
  • backports.zoneinfo
  • bitarray
  • google-crc32c
  • pycurl
  • ruamel.yaml.clib
  • sentencepiece
  • tflite-runtime
  • tokenizers
  • wordcloud

And the following packages have been updated:

  • cryptography
  • grpcio
  • lxml
  • multidict
  • opencv-python
  • pandas
  • scikit-learn
  • torch
  • torchvision