From a8bc37649d1bd54c7726dd95868979fe13a6d182 Mon Sep 17 00:00:00 2001 From: Malcolm Smith Date: Fri, 20 Sep 2024 01:56:50 +0100 Subject: [PATCH 1/5] Finalize PEP 738, and add Android to PEP 11 --- peps/pep-0011.rst | 2 ++ peps/pep-0738.rst | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/peps/pep-0011.rst b/peps/pep-0011.rst index d8f10329cf7..772edc28fed 100644 --- a/peps/pep-0011.rst +++ b/peps/pep-0011.rst @@ -121,6 +121,7 @@ Tier 3 ================================ =========================== ======== Target Triple Notes Contacts ================================ =========================== ======== +aarch64-linux-android Russell Keith-Magee, Petr Viktorin aarch64-pc-windows-msvc Steve Dower arm64-apple-ios iOS on device Russell Keith-Magee, Ned Deily arm64-apple-ios-simulator iOS on M1 macOS simulator Russell Keith-Magee, Ned Deily @@ -129,6 +130,7 @@ powerpc64le-unknown-linux-gnu glibc, clang Victor Stinner glibc, gcc Victor Stinner s390x-unknown-linux-gnu glibc, gcc Victor Stinner +x86_64-linux-android Russell Keith-Magee, Petr Viktorin x86_64-unknown-freebsd BSD libc, clang Victor Stinner ================================ =========================== ======== diff --git a/peps/pep-0738.rst b/peps/pep-0738.rst index aa47c47b1fb..783e7c382c8 100644 --- a/peps/pep-0738.rst +++ b/peps/pep-0738.rst @@ -3,12 +3,14 @@ Title: Adding Android as a supported platform Author: Malcolm Smith Sponsor: Petr Viktorin Discussions-To: https://discuss.python.org/t/pep-738-adding-android-as-a-supported-platform/40975 -Status: Accepted +Status: Final Type: Standards Track Created: 12-Dec-2023 Python-Version: 3.13 Resolution: https://discuss.python.org/t/pep-738-adding-android-as-a-supported-platform/40975/23 +.. canonical-doc:: :ref:`py3.13:using-android` + Abstract ======== @@ -289,8 +291,6 @@ namedtuple containing the following: * ``release`` - Android version of the device, as a string (e.g. ``"14"``) * ``api_level`` - :ref:`API level <738-os-versions>` of the device, as an integer (e.g. ``34``) -* ``min_api_level`` - Minimum API level this build of Python can run on, as - an integer (e.g. ``23``). This is the same as ``sys.getandroidapilevel``. * ``manufacturer`` - `manufacturer `__ of the device, as a string (e.g. ``"Google"``) @@ -300,6 +300,8 @@ namedtuple containing the following: * ``device`` - `device name `__ of the device, as a string (e.g. ``"panther"``) +* ``is_simulator`` - ``True`` if the device is an emulator; ``False`` if it’s a + physical device. Which one of ``model`` and ``device`` is more likely to be unique, and which one is more likely to resemble the marketing name, varies between different From 3e692477edc1ab5b75d189cb509dc6c2ceb5e719 Mon Sep 17 00:00:00 2001 From: Malcolm Smith Date: Sat, 21 Sep 2024 13:09:23 +0100 Subject: [PATCH 2/5] Change canonical-doc target to py3.14 --- peps/pep-0738.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peps/pep-0738.rst b/peps/pep-0738.rst index 783e7c382c8..391f5885c6e 100644 --- a/peps/pep-0738.rst +++ b/peps/pep-0738.rst @@ -9,7 +9,7 @@ Created: 12-Dec-2023 Python-Version: 3.13 Resolution: https://discuss.python.org/t/pep-738-adding-android-as-a-supported-platform/40975/23 -.. canonical-doc:: :ref:`py3.13:using-android` +.. canonical-doc:: :ref:`py3.14:using-android` Abstract From 0a2e704552a45b42c521b546f59e0be22cde99de Mon Sep 17 00:00:00 2001 From: Malcolm Smith Date: Sat, 21 Sep 2024 13:18:30 +0100 Subject: [PATCH 3/5] Explain changes to specification of platform.android_ver --- peps/pep-0738.rst | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/peps/pep-0738.rst b/peps/pep-0738.rst index 391f5885c6e..e0d96cfcb0c 100644 --- a/peps/pep-0738.rst +++ b/peps/pep-0738.rst @@ -300,7 +300,7 @@ namedtuple containing the following: * ``device`` - `device name `__ of the device, as a string (e.g. ``"panther"``) -* ``is_simulator`` - ``True`` if the device is an emulator; ``False`` if it’s a +* ``is_emulator`` - ``True`` if the device is an emulator; ``False`` if it’s a physical device. Which one of ``model`` and ``device`` is more likely to be unique, and which one @@ -439,6 +439,20 @@ example of a test suite that is executed on the Android emulator using GitHub Actions. +Rejected Ideas +============== + +The following changes were made to the original specification of +``platform.android_ver()``: + +* The ``min_api_level`` field was removed, because unlike all the other fields, + it isn't a property of the current device. This information is still available + from the pre-existing function ``sys.getandroidapilevel()``. + +* The ``is_emulator`` field was added, since experience during testing showed + that some issues were emulator-specific. + + Copyright ========= From 9f05d8317acae67b1496d400fd02626030245375 Mon Sep 17 00:00:00 2001 From: Malcolm Smith Date: Mon, 23 Sep 2024 18:42:03 +0100 Subject: [PATCH 4/5] Change canonical-doc target to `python:using-android` --- peps/pep-0738.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peps/pep-0738.rst b/peps/pep-0738.rst index e0d96cfcb0c..ede9aeeb1d6 100644 --- a/peps/pep-0738.rst +++ b/peps/pep-0738.rst @@ -9,7 +9,7 @@ Created: 12-Dec-2023 Python-Version: 3.13 Resolution: https://discuss.python.org/t/pep-738-adding-android-as-a-supported-platform/40975/23 -.. canonical-doc:: :ref:`py3.14:using-android` +.. canonical-doc:: :ref:`python:using-android` Abstract From a3ffa3a0ac68615adfc709b1a59486357ac3fff8 Mon Sep 17 00:00:00 2001 From: Malcolm Smith Date: Mon, 23 Sep 2024 18:42:24 +0100 Subject: [PATCH 5/5] Revert PEP 11 changes --- peps/pep-0011.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/peps/pep-0011.rst b/peps/pep-0011.rst index 772edc28fed..d8f10329cf7 100644 --- a/peps/pep-0011.rst +++ b/peps/pep-0011.rst @@ -121,7 +121,6 @@ Tier 3 ================================ =========================== ======== Target Triple Notes Contacts ================================ =========================== ======== -aarch64-linux-android Russell Keith-Magee, Petr Viktorin aarch64-pc-windows-msvc Steve Dower arm64-apple-ios iOS on device Russell Keith-Magee, Ned Deily arm64-apple-ios-simulator iOS on M1 macOS simulator Russell Keith-Magee, Ned Deily @@ -130,7 +129,6 @@ powerpc64le-unknown-linux-gnu glibc, clang Victor Stinner glibc, gcc Victor Stinner s390x-unknown-linux-gnu glibc, gcc Victor Stinner -x86_64-linux-android Russell Keith-Magee, Petr Viktorin x86_64-unknown-freebsd BSD libc, clang Victor Stinner ================================ =========================== ========