Skip to content

Commit 1c27351

Browse files
committed
Python 3.10-3.13 passing unit tests on 16 KB devices, both arm64 and x86_64 (closes #1171)
1 parent dbadf64 commit 1c27351

File tree

6 files changed

+16
-10
lines changed

6 files changed

+16
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ including:
55

66
* Full integration with Android Studio's standard Gradle build system.
77
* Simple APIs for calling Python code from Java/Kotlin, and vice versa.
8-
* A wide range of third-party Python packages, including SciPy, OpenCV, TensorFlow and many
8+
* A wide range of third-party Python packages, including SciPy, Pandas, Pillow, and many
99
more.
1010

1111
To get started, see the [documentation](https://chaquo.com/chaquopy/doc/current/).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
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 until they publish Android wheels on PyPI.
1+
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.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
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.

product/runtime/src/test/python/chaquopy/test/android/test_import.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ def test_metadata(self):
10471047
self.assertEqual(dist.version, dist.metadata["Version"])
10481048
self.assertIsNone(dist.files)
10491049
self.assertEqual("Matthew Honnibal", dist.metadata["Author"])
1050-
self.assertEqual(["chaquopy-libcxx (>=11000)"], dist.requires)
1050+
self.assertIn("chaquopy-libcxx", [req.split()[0] for req in dist.requires])
10511051

10521052
# Distribution objects don't implement __eq__.
10531053
def dist_attrs(dist):

release/README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ device being each of the following:
3131
* A physical device (on all ABIs if possible)
3232
* minSdk (on all ABIs if possible)
3333
* targetSdk
34+
* 16 KB pages
3435
* A clean install
3536
* An upgrade from the previous public release, with the tests already run
3637

@@ -55,16 +56,18 @@ changed.
5556
Open the pkgtest app in Android Studio, and temporarily edit the top-level build.gradle
5657
file to use the local Chaquopy version.
5758

58-
Temporarily edit the app/build.gradle file to set `PACKAGES` to the top 40 recipes,
59-
ordered by number of PyPI downloads, excluding TensorFlow (#1209):
59+
Temporarily edit the app/build.gradle file to set `PACKAGES` to the top 40 recipes for
60+
the default Python version, ordered by number of PyPI downloads:
6061

61-
* Get the PyPI statistics as described in server/pypi/README-internal.md.
62-
* `cd server/pypi/packages`
63-
* `cat pypi-downloads.csv | cut -d, -f1 | while read name; do if [ -e $name ] && [ $name != tensorflow ]; then echo $name; fi; done | head -n40 | tr '\n' ' '`
62+
* Get the [PyPI statistics in CSV format](https://hugovk.github.io/top-pypi-packages/).
63+
* `cd /var/www/chaquo/pypi-13.1`
64+
* `cat path/to/top-pypi-packages.csv | cut -d, -f2 | tr -d '"' | while read name; do if ls $name/*cp310* &>/dev/null; then echo $name; fi; done | head -n40 | tr '\n' ' '`
65+
* TODO: once the default version is 3.13 or later, also include data from
66+
https://beeware.org/mobile-wheels.
6467

65-
As of 2023-12, this is:
68+
As of 2025-11, this is:
6669

67-
numpy cryptography cffi pandas aiohttp yarl greenlet frozenlist grpcio lxml psutil multidict pillow scipy bcrypt matplotlib pynacl scikit-learn kiwisolver regex ruamel-yaml-clib google-crc32c pycryptodomex contourpy pyzmq pycryptodome zope-interface h5py tokenizers torch shapely numba llvmlite xgboost scikit-image statsmodels sentencepiece opencv-python torchvision brotli
70+
numpy cryptography cffi pandas aiohttp yarl multidict frozenlist greenlet pillow grpcio psutil scipy lxml regex pynacl scikit-learn bcrypt matplotlib zstandard google-crc32c kiwisolver contourpy ruamel-yaml-clib pyzmq shapely pycryptodome brotli lz4 zope-interface pycryptodomex argon2-cffi sentencepiece opencv-python gevent ujson statsmodels scikit-image spacy bitarray
6871

6972
Search the package test scripts for the word "Android", and consider adding any packages
7073
which test Chaquopy (as opposed to the package itself) in a way that isn't covered by
@@ -76,6 +79,7 @@ case), and test on those ABIs, with at least one device being each of the follow
7679
* A physical device (on all ABIs if possible)
7780
* minSdk (on all ABIs if possible)
7881
* targetSdk
82+
* TODO: once the default version is 3.13 or later, include a device with 16 KB pages.
7983
* A clean install
8084

8185
Set `abiFilters` to `"x86", "x86_64"` (this tests the multi-ABI case), and test on those

server/pypi/README-internal.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ being each of the following:
2828
* A physical device (on all ABIs if possible)
2929
* minSdk (on all ABIs if possible)
3030
* targetSdk
31+
* 16 KB pages
3132
* A clean install
3233

3334
Repeat the build and test on all other Python versions.

0 commit comments

Comments
 (0)