Skip to content

gh-146444: Make Platforms/Apple/ compatible with Python 3.9#146624

Merged
vstinner merged 2 commits intopython:mainfrom
vstinner:apply_union
Mar 30, 2026
Merged

gh-146444: Make Platforms/Apple/ compatible with Python 3.9#146624
vstinner merged 2 commits intopython:mainfrom
vstinner:apply_union

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented Mar 30, 2026

Replace "str | None" with typing.Union[str, None].

Replace "str | None" with typing.Union[str, None].
@vstinner
Copy link
Copy Markdown
Member Author

The iOS buildbot worker uses Python 3.9 which doesn't support str | None: python/buildmaster-config#691. This change adds Python 3.9 support.

@vstinner vstinner added the needs backport to 3.14 bugs and security fixes label Mar 30, 2026
@vstinner
Copy link
Copy Markdown
Member Author

Oh, the Lint CI fails because Run # Running prek Run Ruff (lint) on Platforms/Apple/ undoes this change, it replaces Union[str, None] with str | None.

@vstinner vstinner enabled auto-merge (squash) March 30, 2026 09:17
@vstinner vstinner merged commit 382c043 into python:main Mar 30, 2026
46 checks passed
@vstinner vstinner deleted the apply_union branch March 30, 2026 09:25
@miss-islington-app
Copy link
Copy Markdown

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 30, 2026
…thonGH-146624)

Replace "str | None" with typing.Union[str, None].
(cherry picked from commit 382c04308d7c3638fc0402116ce8654b80b4b776)

Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Mar 30, 2026

GH-146627 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 Mar 30, 2026
@freakboy3742
Copy link
Copy Markdown
Contributor

@vstinner Thanks for that cleanup.

Copy link
Copy Markdown
Contributor

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

After the fact, but 👍

vstinner added a commit that referenced this pull request Mar 30, 2026
…H-146624) (#146627)

gh-146444: Make Platforms/Apple/ compatible with Python 3.9 (GH-146624)

Replace "str | None" with typing.Union[str, None].
(cherry picked from commit 382c043)

Co-authored-by: Victor Stinner <vstinner@python.org>
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.

2 participants