fix: minor 4.0 issues in Android validation, docs, and docstring#2891
Merged
Conversation
- android: raise a clear FatalError when ANDROID_API_LEVEL is not an integer, instead of an uncaught ValueError deep in localized_vars - docs: note that delvewheel is the default Windows repair-wheel-command since 4.0 and how to skip it for platform-tagged wheels with no extension module; update the now-outdated FAQ wording - venv: fix _parse_pip_constraint_for_virtualenv docstring to say marker-bearing constraints are evaluated against the host's default environment (not skipped) when marker_env is None Assisted-by: ClaudeCode:claude-opus-4.8
mhsmith
reviewed
Jun 2, 2026
Handle ANDROID_API_LEVEL validation via try/except around int() so the original exception message is surfaced, and so non-ASCII Unicode digits (which isdigit() accepts but int() may reject) are handled correctly. Assisted-by: ClaudeCode:claude-opus-4.8
Assisted-by: ClaudeCode:claude-opus-4.8 Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
mhsmith
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
A few small fixes found while reviewing for the 4.0 release.
ANDROID_API_LEVELis consumed viaint(...)inlocalized_vars. If a user sets it to a non-integer through theenvironmentoption, that previously surfaced as an uncaughtValueErrordeep in the build. Nowsetup_envvalidates it right after applying the user environment and raises a clearFatalError.repair-wheel-commandexplaining thatdelvewheelis the default on Windows since 4.0, and that a platform-tagged wheel with no extension module may needrepair-wheel-command = "". Also updated the now-outdated FAQ wording ("if you're using delvewheel" → "uses delvewheel by default since 4.0")._parse_pip_constraint_for_virtualenvdocstring — whenmarker_envisNone, marker-bearing constraints are evaluated against the host's default environment, not skipped.prek -apasses clean.