Skip to content

gh-145524: Update comment for TypeVar S in typing.rst - #145525

Merged
JelleZijlstra merged 3 commits into
python:mainfrom
hyperkai:hyperkai-patch-2
Nov 28, 2026
Merged

JelleZijlstra merged 3 commits into
python:mainfrom
hyperkai:hyperkai-patch-2

Conversation

@hyperkai

@hyperkai hyperkai commented Mar 5, 2026 •

Copy link
Copy Markdown
Contributor

Clarified the comment for type variable S to specify it can be str or any subtype of str.

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The existing text is correct, since str is a subtype of str -- "any subtype of str" includes str itself. But I agree that not all users will necessarily be aware of that, so the edit does seem to make things clearer to me

Comment thread Doc/library/typing.rst Resolved
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.15 bugs and security fixes label May 30, 2026
@read-the-docs-community

read-the-docs-community Bot commented Jun 3, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #32972593 | 📁 Comparing 1fdc331 against main (6453065)

  🔍 Preview build  

1 file changed
± library/typing.html

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 90 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Nov 28, 2026
@JelleZijlstra
JelleZijlstra merged commit af047f2 into python:main Nov 28, 2026
30 checks passed
@miss-islington-app

Copy link
Copy Markdown

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

@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Nov 28, 2026
@bedevere-app

bedevere-app Bot commented Nov 28, 2026

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Nov 28, 2026
@bedevere-app

bedevere-app Bot commented Nov 28, 2026

Copy link
Copy Markdown

GH-162789 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 Nov 28, 2026
@bedevere-app

bedevere-app Bot commented Nov 28, 2026

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Nov 28, 2026
@JelleZijlstra JelleZijlstra added the needs backport to 3.15 bugs and security fixes label Nov 28, 2026
@miss-islington-app

Copy link
Copy Markdown

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 28, 2026
…-145525)

(cherry picked from commit af047f2)

Co-authored-by: Kai (Kazuya Ito) <kazya.ito.dream@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
@miss-islington-app

Copy link
Copy Markdown

Sorry @hyperkai and @JelleZijlstra, I had trouble completing the backport.

Please retry by removing and re-adding the "needs backport to 3.15" label.
If that does not work, please backport manually with cherry_picker, see the devguide for more information.

cherry_picker af047f2fc5c4f330931f99dfab3345597ba372c5 3.15

JelleZijlstra added a commit that referenced this pull request Nov 28, 2026
…) (#162789)

gh-145524: Update comment for TypeVar S in typing.rst (GH-145525)
(cherry picked from commit af047f2)

Co-authored-by: Kai (Kazuya Ito) <kazya.ito.dream@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir needs backport to 3.15 bugs and security fixes skip news stale Stale PR or inactive for long period of time.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

What type bound parameter of typing.TypeVar accepts should be explained more clearly

5 participants