Change log
5.1.2 (2019-01-19)
- Add
PyObject
primitive conversion methods (toBoolean
, toInt
, etc.).
- Add
PyObject
container view methods (asList
, asMap
and asSet
).
- If
pkg_resources
is installed in your app, its “basic resource access”
functions will now work.
- Remove directory names when converting exception stack traces from Python to Java. This works
around a bug in Google Play which was causing crash reports to be incomplete.
- Change default character encoding from ASCII to UTF-8.
- Make APK build more reproducible.
5.0.0 (2018-11-05)
- The ABI
arm64-v8a
is now supported.
- [BACKWARD INCOMPATIBLE] Each Chaquopy version will now include only one Python version,
so the
python.version
setting is no longer required. Simply remove it to use the current
version, 3.6.5.
- Python 2 is no longer included. However, for existing Python 2 users, Chaquopy 4.x will
continue to be maintained until the end of 2019 (#39).
- [BACKWARD INCOMPATIBLE]
buildPython
must now be at least Python 3.4.
- [BACKWARD INCOMPATIBLE]
minSdkVersion
must now be at least API level 16. This still
covers 99% of active devices.
- Runtime components are now distributed as separate Maven artifacts. This fixes various
intermittent build errors involving
chaquopy_java.jar
(#62).
- If
pkg_resources
is installed in your app, it will now detect all pip-installed packages.
3.3.2 (2018-08-01)
- Fix pip issues involving packages with optional native components (e.g. websockets).
- Work around inability of Android dynamic linker on API 22 and older to load multiple modules
with the same basename (details here).
- Fix
ctypes.pythonapi
and sys.abiflags
, and provide partial implementation of
sysconfig.get_config_vars
.
- Fix native crash in
lrintf
/ feholdexcept
/ fegetenv
(Crystax issue #1369).
- Fix
pkgutil.get_data
when used with extractPackages, and
improve extractPackages performance.
3.3.0 (2018-06-20)
- Add fast conversions between Python
bytes
/bytearray
and Java byte[]
(#41).
- Make pip evaluate environment markers (PEP 508) and
data-requires-python
attributes
(PEP 503) against the target platform rather than the build platform.
- Make pip only prioritize native wheels (not pure-Python wheels) over sdists of a newer
version.
- Fix pip issues when multiple packages provide the same directory or filename.
- Improve pip error messages when packages attempt to build native code.
3.1.0 (2018-05-30)
- Add support for installing pure-Python sdists. This means that all pure-Python packages on
PyPI should now work with Chaquopy, whether they have wheels available or not. If you have
any difficulty installing a package, please report it at our issue tracker.
- Because of this change, the Python major version of buildPython is now
required to be the same as that of the app itself when using pip, and the default value of
buildPython
has been changed accordingly.
- Fix
imp.find_module
and imp.load_module
.
- Implement implicit namespace packages on Python 3 (PEP 420).
- Add partial support for
.pth files
. Only the execution of lines starting with
import
is currently implemented: all other lines are ignored.
- Add message explaining how to show full pip output in Android Studio 3.1’s new Build window.
- Fix “registering invalid inputs” warning in Android Studio 3.1.
3.0.0 (2018-05-15)
- Android Gradle plugin version 3.1 is now supported.
- [BACKWARD INCOMPATIBLE] Android Gradle plugin version 2.2 is no longer supported. If
you’re still using Android Studio 2.2, then we highly recommend that you upgrade to the
current version 3.1. Our testing shows that it builds apps more than twice as fast, whether
you’re using Chaquopy or not.
- Add Python versions 2.7.15 and 3.6.5, and fix a few lesser-used standard library modules.
- Update to pip version 10.0.1.
- Build reliability fixes, including one for over-strict metadata parsing.
- Further build speed improvements.
- Improve app startup speed where a requirement is reinstalled at the same version as before.
2.1.0 (2018-04-26)
- Add ability to load native library dependencies. This is required by the newly-added packages
for PyZMQ and SciPy.
- Improve pip install performance.
2.0.1 (2018-03-22)
- Fix a crash reported on various devices, especially Samsung Galaxy J series phones.
- Fix NumPy dependency on libc functions not present in API level 17 and earlier.
- Remove debugging information from native modules. All native packages benefit from this, but
especially NumPy, which is now smaller by 4 MB per ABI.
- Disable upgrade notification from bundled copy of pip.
2.0.0 (2018-03-15)
- General performance improvements: the Python unit tests now run about 25% faster.
- [BACKWARD INCOMPATIBLE] The import hook now only looks up names in Java if they failed to
import from Python. This significantly speeds up import of large Python packages. However, it
means that importing a name which exists in both languages is no longer reported as an error:
instead, the value from Python will be returned.
- Fix a crash on API level 15 caused by the license notification.
1.4.0 (2018-03-05)
- The Python standard library is now loaded from compiled .pyc files by default (see
documentation). As a result, startup of a minimal app is now 20-30%
faster with Python 2, and 50-60% faster with Python 3. (Python 3 startup is still slower than
Python 2, but only by 15-20%.)
sys.stdin
now returns EOF rather than blocking. If you want to run some code which takes
interactive text input, you may find the console app template useful.
- The
write
method of sys.stdout
and sys.stderr
now returns the character count.
- Very long lines written to
sys.stdout
and sys.stderr
are now split into slightly smaller
fragments, to allow for the shorter Logcat message length limit in recent versions of Android.
- Fix a multi-threading deadlock.
- Apps built with an unlicensed copy of the SDK are now limited to a run-time of 5 minutes.
1.3.1 (2018-01-26)
- Static proxy generator now handles non-ASCII source files correctly (#27).
1.3.0 (2018-01-15)
- The following things now return reasonable values:
sys.argv
, sys.executable
, and
platform.platform()
.
- The following modules now work correctly:
sqlite3
, ssl
(#23), and tempfile
. (Requires python.version
to be 2.7.14 or 3.6.3.)
sys.stdout
and sys.stderr
are now directed to the Android Logcat.
- Add
extractPackages
, and use it by default for certifi.
1.2.0 (2018-01-07)
- Python source directory locations can now be configured in the
sourceSets
block, just like
Java.
getClass
, when called on a Java object, now returns the Java object class rather than the
proxy object class.
- Generated
static_proxy
Java files no longer produce build warnings.
- Ensure pip is re-run if local requirements or wheel file changes.
- Add Python 2.7.14.
- Include
distutils
and doctest
modules (#20). (Requires python.version
to be 2.7.14 or
3.6.3.)
1.1.0 (2017-12-22)
- Add Python 3.6 runtime (#1).
buildPython
can now be Python 2.7 or 3.3+ (#2).
- Support configuration in product flavors (#6).
- Improve startup performance.
0.6.1 (2017-12-11)
- Apps can now use certain native packages, including NumPy (#14), as well as some pure-Python packages which
aren’t available from PyPI in wheel format. To support this, the
build.gradle
syntax for calling
pip install
has been changed: please see the documentation.
- Zero-initialized Java arrays can now be created in Python, by passing an integer to the array
constructor rather than a sequence.
0.5.0 (2017-11-04)
- Support Android Gradle plugin versions 2.2 (#9) and 3.0 (#3).
- Increase minimum API level to 15. This still covers 99% of active devices.
- Fix array store type-checking on old Android versions.
- Add
java.detach
, and fix several multi-threading issues.
0.4.5 (2017-10-26)
- Remove dependency on
six
(#13).
0.4.4 (2017-10-24)
- Fix implicit relative imports (#12).
0.4.3 (2017-09-21)
- Improve startup performance.
0.4.0 (2017-09-11)
- Add dynamic_proxy and static_proxy.
0.3.0 (2017-07-28)
- Reflect Java class hierarchy in Python.
- Represent Java exceptions with their actual classes.
- Support Python unbound method syntax when calling Java methods, i.e.
ClassName.method(instance, args)
.
- Release GIL when calling Java constructors.
0.2.0 (2017-07-04)
- Add import hook.
- Allow nested classes to be accessed as attributes.
- Improve performance.