Skip to content

Android fixes - #154895

Merged
freakboy3742 merged 3 commits into
python:mainfrom
mhsmith:android-2026-07
Jul 30, 2026
Merged

Android fixes#154895
freakboy3742 merged 3 commits into
python:mainfrom
mhsmith:android-2026-07

Conversation

@mhsmith

@mhsmith mhsmith commented Jul 29, 2026

Copy link
Copy Markdown
Member
  • Clarify that the user-facing Android and iOS versions can be found in platform.release, not platform.version, which is a kernel build number that's much less likely to be useful.

  • Don't capture stderr from android-env.py. This allows it to display the message "Installing NDK - this may take several minutes", which is quite important, otherwise the user will probably think the script has hung.

  • Previously the NDK was detected only by checking for the existence of its directory, which will be left in an unusable state by interrupted installations. Fixed by checking for the package.xml file, which sdkmanager creates after installation is complete.

  • Fix a couple of warnings found by linters: use of an undefined payload variable in Android/__main__.py, and defining an unused it variable in MainActivity.kt.

@picnixz

picnixz commented Jul 29, 2026

Copy link
Copy Markdown
Member

Can you have a better title? it does not really say what it does

@mhsmith mhsmith added skip issue skip news needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jul 29, 2026
@mhsmith

mhsmith commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

Sorry, description updated. There isn't really a better title, since the only thing these bugs have in common is Android, but since they're all very small, I thought it was better to put them all in the same PR to avoid multiplying the backports.

@mhsmith
mhsmith marked this pull request as ready for review July 29, 2026 20:05
@mhsmith
mhsmith requested a review from freakboy3742 as a code owner July 29, 2026 20:05
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33823187 | 📁 Comparing be81655 against main (11d0da5)

  🔍 Preview build  

2 files changed
± library/os.html
± library/platform.html

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All makes sense to me. 👍

@freakboy3742
freakboy3742 merged commit f4b1d3e into python:main Jul 30, 2026
66 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @mhsmith for the PR, and @freakboy3742 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jul 30, 2026

Copy link
Copy Markdown

GH-154905 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 30, 2026
@bedevere-app

bedevere-app Bot commented Jul 30, 2026

Copy link
Copy Markdown

GH-154906 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 30, 2026
@bedevere-app

bedevere-app Bot commented Jul 30, 2026

Copy link
Copy Markdown

GH-154907 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jul 30, 2026
freakboy3742 pushed a commit that referenced this pull request Jul 30, 2026
A collection of small cleanups for Android support:

* Clarifies the documentation around version number handling for iOS and
  Android in os.uname and platform.release
* Ensures that automated NDK installs surface messages written to stderr
* Makes the Android NDK check more robust for incomplete downloads
* Corrects some linting errors in Android build scripts
(cherry picked from commit f4b1d3e)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
freakboy3742 pushed a commit that referenced this pull request Jul 30, 2026
A collection of small cleanups for Android support:

* Clarifies the documentation around version number handling for iOS and
  Android in os.uname and platform.release
* Ensures that automated NDK installs surface messages written to stderr
* Makes the Android NDK check more robust for incomplete downloads
* Corrects some linting errors in Android build scripts
(cherry picked from commit f4b1d3e)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
freakboy3742 pushed a commit that referenced this pull request Jul 30, 2026
A collection of small cleanups for Android support:

* Clarifies the documentation around version number handling for iOS and
  Android in os.uname and platform.release
* Ensures that automated NDK installs surface messages written to stderr
* Makes the Android NDK check more robust for incomplete downloads
* Corrects some linting errors in Android build scripts
(cherry picked from commit f4b1d3e)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants