8000 gh-71042: Add `platform.android_ver` by mhsmith · Pull Request #116674 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-71042: Add platform.android_ver #116674

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clarify model and device name documentation
  • Loading branch information
mhsmith committed Mar 25, 2024
commit 4108dfc6a6236dd124b626b2a11c2cbd90984ac2
21 changes: 6 additions & 15 deletions Doc/library/platform.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,19 +142,12 @@ Cross Platform
Returns the system's release, e.g. ``'2.2.0'`` or ``'NT'``. An empty string is
returned if the value cannot be determined.

.. versionchanged:: 3.13
On Android, this now returns the Android version rather than the Linux
kernel version.


.. function:: system()

Returns the system/OS name, such as ``'Linux'``, ``'Darwin'``, ``'Java'``,
``'Windows'``. An empty string is returned if the value cannot be determined.

.. versionchanged:: 3.13
On Android, this now returns ``'Android'`` rather than ``'Linux'``.


.. function:: system_alias(system, release, version)

Expand Down Expand Up @@ -329,18 +322,16 @@ Android Platform

* ``manufacturer`` - `manufacturer name
<https://developer.android.com/reference/android/os/Build#MANUFACTURER>`__
(e.g. ``"Google"``)

* ``model`` - `model name
<https://developer.android.com/reference/android/os/Build#MODEL>`__
(e.g. ``"Pixel 7"``)
<https://developer.android.com/reference/android/os/Build#MODEL>`__
typically the marketing name or model number

* ``device`` - `device name
<https://developer.android.com/reference/android/os/Build#DEVICE>`__
(e.g. ``"panther"``)
<https://developer.android.com/reference/android/os/Build#DEVICE>`__
typically the model number or a codename

Which one of ``model`` and ``device`` is more likely to distinguish different
device variants, and which one is more likely to resemble the marketing name,
varies between different manufacturers.
For a list of known model and device names, see `here
<https://storage.googleapis.com/play_public/supported_devices.html>`__.

.. versionadded:: 3.13
0