From 91f906dba43bd4186a50aaaeb05a64875284d849 Mon Sep 17 00:00:00 2001 From: Malcolm Smith Date: Sun, 29 Jan 2023 09:40:07 +0000 Subject: [PATCH] Update documentation --- product/runtime/docs/sphinx/changelog.rst | 49 +++++++++++++++++++ .../sphinx/changes/+pip-update.feature.rst | 1 - .../docs/sphinx/changes/654.feature.rst | 1 - .../docs/sphinx/changes/713.removal.rst | 1 - .../docs/sphinx/changes/715.bugfix.rst | 1 - .../docs/sphinx/changes/725.feature.rst | 1 - .../docs/sphinx/changes/727.feature.rst | 1 - .../docs/sphinx/changes/733.bugfix.rst | 1 - .../docs/sphinx/changes/746.feature.rst | 1 - .../docs/sphinx/changes/747.feature.rst | 1 - .../docs/sphinx/changes/752.feature.rst | 1 - .../docs/sphinx/changes/754.feature.rst | 1 - .../docs/sphinx/changes/755.bugfix.rst | 1 - .../docs/sphinx/changes/756.feature.rst | 1 - .../docs/sphinx/changes/757.feature.rst | 1 - .../docs/sphinx/changes/777.bugfix.rst | 1 - product/runtime/docs/sphinx/conf.py | 2 +- product/runtime/docs/sphinx/versions.rst | 2 + release/README.md | 30 +++++++----- release/release_public.sh | 5 +- 20 files changed, 73 insertions(+), 30 deletions(-) delete mode 100644 product/runtime/docs/sphinx/changes/+pip-update.feature.rst delete mode 100644 product/runtime/docs/sphinx/changes/654.feature.rst delete mode 100644 product/runtime/docs/sphinx/changes/713.removal.rst delete mode 100644 product/runtime/docs/sphinx/changes/715.bugfix.rst delete mode 100644 product/runtime/docs/sphinx/changes/725.feature.rst delete mode 100644 product/runtime/docs/sphinx/changes/727.feature.rst delete mode 100644 product/runtime/docs/sphinx/changes/733.bugfix.rst delete mode 100644 product/runtime/docs/sphinx/changes/746.feature.rst delete mode 100644 product/runtime/docs/sphinx/changes/747.feature.rst delete mode 100644 product/runtime/docs/sphinx/changes/752.feature.rst delete mode 100644 product/runtime/docs/sphinx/changes/754.feature.rst delete mode 100644 product/runtime/docs/sphinx/changes/755.bugfix.rst delete mode 100644 product/runtime/docs/sphinx/changes/756.feature.rst delete mode 100644 product/runtime/docs/sphinx/changes/757.feature.rst delete mode 100644 product/runtime/docs/sphinx/changes/777.bugfix.rst diff --git a/product/runtime/docs/sphinx/changelog.rst b/product/runtime/docs/sphinx/changelog.rst index d07a36af6d..2d22788d5f 100644 --- a/product/runtime/docs/sphinx/changelog.rst +++ b/product/runtime/docs/sphinx/changelog.rst @@ -5,6 +5,55 @@ Change log .. towncrier release notes start +14.0.2 (2023-01-29) +=================== + +Backward incompatible +--------------------- + +- :ref:`buildPython` must now be at least Python 3.7. (`#713 + `__) + + +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. + + +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 + `__) + + 13.0.0 (2022-11-06) =================== diff --git a/product/runtime/docs/sphinx/changes/+pip-update.feature.rst b/product/runtime/docs/sphinx/changes/+pip-update.feature.rst deleted file mode 100644 index 50d1ac4fca..0000000000 --- a/product/runtime/docs/sphinx/changes/+pip-update.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Update to pip version 20.1. \ No newline at end of file diff --git a/product/runtime/docs/sphinx/changes/654.feature.rst b/product/runtime/docs/sphinx/changes/654.feature.rst deleted file mode 100644 index 3a13c074b6..0000000000 --- a/product/runtime/docs/sphinx/changes/654.feature.rst +++ /dev/null @@ -1 +0,0 @@ -`sys.stdout` and `sys.stderr` are now line-buffered by default. \ No newline at end of file diff --git a/product/runtime/docs/sphinx/changes/713.removal.rst b/product/runtime/docs/sphinx/changes/713.removal.rst deleted file mode 100644 index e640fa471c..0000000000 --- a/product/runtime/docs/sphinx/changes/713.removal.rst +++ /dev/null @@ -1 +0,0 @@ -:ref:`buildPython` must now be at least Python 3.7. \ No newline at end of file diff --git a/product/runtime/docs/sphinx/changes/715.bugfix.rst b/product/runtime/docs/sphinx/changes/715.bugfix.rst deleted file mode 100644 index 46f9feccc8..0000000000 --- a/product/runtime/docs/sphinx/changes/715.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Enable PEP 517 builds in pip. \ No newline at end of file diff --git a/product/runtime/docs/sphinx/changes/725.feature.rst b/product/runtime/docs/sphinx/changes/725.feature.rst deleted file mode 100644 index c07404217f..0000000000 --- a/product/runtime/docs/sphinx/changes/725.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Add option to `redirect native stdout and stderr to Logcat `__. \ No newline at end of file diff --git a/product/runtime/docs/sphinx/changes/727.feature.rst b/product/runtime/docs/sphinx/changes/727.feature.rst deleted file mode 100644 index 228b6bce4e..0000000000 --- a/product/runtime/docs/sphinx/changes/727.feature.rst +++ /dev/null @@ -1 +0,0 @@ -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". \ No newline at end of file diff --git a/product/runtime/docs/sphinx/changes/733.bugfix.rst b/product/runtime/docs/sphinx/changes/733.bugfix.rst deleted file mode 100644 index 980195b854..0000000000 --- a/product/runtime/docs/sphinx/changes/733.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Show correct error message when buildPython autodetection fails. \ No newline at end of file diff --git a/product/runtime/docs/sphinx/changes/746.feature.rst b/product/runtime/docs/sphinx/changes/746.feature.rst deleted file mode 100644 index 3a13c074b6..0000000000 --- a/product/runtime/docs/sphinx/changes/746.feature.rst +++ /dev/null @@ -1 +0,0 @@ -`sys.stdout` and `sys.stderr` are now line-buffered by default. \ No newline at end of file diff --git a/product/runtime/docs/sphinx/changes/747.feature.rst b/product/runtime/docs/sphinx/changes/747.feature.rst deleted file mode 100644 index ab70f3e071..0000000000 --- a/product/runtime/docs/sphinx/changes/747.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Update CA bundle to certifi 2022.12.7. \ No newline at end of file diff --git a/product/runtime/docs/sphinx/changes/752.feature.rst b/product/runtime/docs/sphinx/changes/752.feature.rst deleted file mode 100644 index e6cbd9b8c5..0000000000 --- a/product/runtime/docs/sphinx/changes/752.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Add `python` executable as a final fallback when searching for buildPython. \ No newline at end of file diff --git a/product/runtime/docs/sphinx/changes/754.feature.rst b/product/runtime/docs/sphinx/changes/754.feature.rst deleted file mode 100644 index 08ec32a09a..0000000000 --- a/product/runtime/docs/sphinx/changes/754.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Restore the `extractPackages` setting, for code that requires its modules to exist as separate .py files. \ No newline at end of file diff --git a/product/runtime/docs/sphinx/changes/755.bugfix.rst b/product/runtime/docs/sphinx/changes/755.bugfix.rst deleted file mode 100644 index 1c941a86ce..0000000000 --- a/product/runtime/docs/sphinx/changes/755.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix error when calling `entry_points` with an unreadable directory on `sys.path`. \ No newline at end of file diff --git a/product/runtime/docs/sphinx/changes/756.feature.rst b/product/runtime/docs/sphinx/changes/756.feature.rst deleted file mode 100644 index 9524fd8e24..0000000000 --- a/product/runtime/docs/sphinx/changes/756.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Android Gradle plugin version 7.4 is now supported. \ No newline at end of file diff --git a/product/runtime/docs/sphinx/changes/757.feature.rst b/product/runtime/docs/sphinx/changes/757.feature.rst deleted file mode 100644 index 3a13c074b6..0000000000 --- a/product/runtime/docs/sphinx/changes/757.feature.rst +++ /dev/null @@ -1 +0,0 @@ -`sys.stdout` and `sys.stderr` are now line-buffered by default. \ No newline at end of file diff --git a/product/runtime/docs/sphinx/changes/777.bugfix.rst b/product/runtime/docs/sphinx/changes/777.bugfix.rst deleted file mode 100644 index f7ae7d3fec..0000000000 --- a/product/runtime/docs/sphinx/changes/777.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix "Could not find an activated virtualenv" error when `PIP_REQUIRE_VIRTUALENV` environment variable is set. \ No newline at end of file diff --git a/product/runtime/docs/sphinx/conf.py b/product/runtime/docs/sphinx/conf.py index f31741968f..370e325e25 100644 --- a/product/runtime/docs/sphinx/conf.py +++ b/product/runtime/docs/sphinx/conf.py @@ -62,7 +62,7 @@ # # Chaquopy: this is no longer auto-generated from VERSION.txt, because that made it awkward to # release documentation updates between versions. -release = "13.0.0" +release = "14.0.2" # The short X.Y version. version = release.rpartition(".")[0] diff --git a/product/runtime/docs/sphinx/versions.rst b/product/runtime/docs/sphinx/versions.rst index 2caecf1dc5..a47980e5ad 100644 --- a/product/runtime/docs/sphinx/versions.rst +++ b/product/runtime/docs/sphinx/versions.rst @@ -9,6 +9,8 @@ Version summary | | |Gradle plugin |level | | | |versions | | +===================+===================+===================+===================+ +|14.0 | |4.1 - 7.4 | | ++-------------------+ +-------------------+ + |13.0 |3.8 - 3.11 |4.1 - 7.3 |21 | +-------------------+-------------------+-------------------+-------------------+ |12.0 | |4.1 - 7.2 | | diff --git a/release/README.md b/release/README.md index ad97db86da..3d6669da0a 100644 --- a/release/README.md +++ b/release/README.md @@ -19,6 +19,7 @@ conditions: could prevent users importing classes in the Python console). * Change back to "debug" variant, and test a single-ABI build by temporarily changing abiFilters. +* Re-enable all ABIs. Run Build > Generate Signed APK with the "release" variant. Save a copy of this APK, because we'll be releasing it on Google Play later. @@ -43,13 +44,14 @@ Test all the non-default Python versions on the same devices. ## Gradle plugin -On one test machine, run `gradlew -P cmakeBuildType=Release publish`. Then copy `gradle`, -`runtime` and (if necessary) `target` to the other machines. On those other machines, to make -sure the artifacts are not overwritten, temporarily disable the `dependsOn publish` line in -`gradle-plugin/build.gradle`. +On one test machine, run `gradlew -P cmakeBuildType=Release publish`. Then, on each test +machine: -On each test machine, pull the current version of this repository, then run `gradlew --continue --P cmakeBuildType=Release gradle:check`. +* Copy `gradle`, `runtime` and (if necessary) `target` from the first test machine. +* Pull the current version of this repository. +* To make sure the artifacts are not overwritten, temporarily disable the `dependsOn + publish` line in `gradle-plugin/build.gradle`. +* Run `gradlew --continue -P cmakeBuildType=Release gradle:check`. ## Package tests @@ -61,7 +63,8 @@ install it while running the next build. This is why we test the slowest devices Temporarily edit pkgtest/app/build.gradle to replace the empty list in the `addPackages` line with `PACKAGE_GROUPS[1]`. -Set `abiFilters` to each of the following values, and test on a corresponding device: +Set `abiFilters` to each of the following values (this tests the single-ABI case), and +test on a corresponding device: * armeabi-v7a (use a 32-bit device) * arm64-v8a @@ -99,12 +102,9 @@ repository from which the public repositories were last updated. If the script reports any files which require manual merging (e.g. build.gradle), examine them and update all the public repositories as necessary. -* The public apps should use the newest Android Gradle plugin version which is at least one - year old. Not newer, because new versions of AGP are incompatible with old versions of - Android Studio +* The public apps should use an Android Gradle plugin version which is at least one year + old, because new versions of AGP are incompatible with old versions of Android Studio (https://android-developers.googleblog.com/2020/12/announcing-android-gradle-plugin.html). - And not older, otherwise it'll be impossible to use the webserver logs to determine when it's - safe to remove support for it. * If updating the AGP version, also update to the corresponding versions of these things (see the integration tests): * Gradle @@ -122,8 +122,12 @@ Set reminder to check for Google Play crash reports regularly over the next mont ## Documentation +Add news fragments as necessary, and check the release notes by running `towncrier build +--version VERSION --draft`. Once happy, save the fragments in a separate commit, because +they'll be deleted when running `towncrier` in non-draft mode. + Update: -* `changelog.rst` +* `changelog.rst`, by running the above `towncrier` command without `--draft`. * `versions.rst` * `release` in `conf.py` diff --git a/release/release_public.sh b/release/release_public.sh index e6383703e3..d9a49eb2d5 100755 --- a/release/release_public.sh +++ b/release/release_public.sh @@ -10,7 +10,10 @@ new_ver=${2:?"$usage"} private_src_dir="demo/app/src" update_version() { - sed -i -E "s/(com.chaquo.python.+version ')[0-9.]+/\1${new_ver}/" "$1" + # We can't use `sed -i` with no argument, because macOS and Linux handle that in + # incompatible ways. + sed -i.original -E "s/(com.chaquo.python.+version ')[0-9.]+/\1${new_ver}/" "$1" + rm "$1.original" }