Skip to content

gh-145521: Add 'infer_variance' parameter to ParamSpec class#145522

Merged
JelleZijlstra merged 2 commits intopython:mainfrom
hyperkai:hyperkai-patch-1
May 3, 2026
Merged

gh-145521: Add 'infer_variance' parameter to ParamSpec class#145522
JelleZijlstra merged 2 commits intopython:mainfrom
hyperkai:hyperkai-patch-1

Conversation

@hyperkai
Copy link
Copy Markdown
Contributor

@hyperkai hyperkai commented Mar 5, 2026

@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news awaiting review labels Mar 5, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Mar 5, 2026
@hyperkai hyperkai changed the title Add 'infer_variance' parameter to ParamSpec class gh-145521: Add 'infer_variance' parameter to ParamSpec class Mar 5, 2026
@AlexWaygood AlexWaygood added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Mar 5, 2026
@inventshah
Copy link
Copy Markdown
Contributor

Should we add some text about the version this changed (e.g. 3.12)?

@AlexWaygood
Copy link
Copy Markdown
Member

Should we add some text about the version this changed (e.g. 3.12)?

We can do. But we shouldn't devote too much space to this, because ParamSpecs are always invariant. It's a bit confusing that they have this parameter; type checkers will just ignore it.

@JelleZijlstra JelleZijlstra enabled auto-merge (squash) May 3, 2026 23:00
@read-the-docs-community
Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #32518599 | 📁 Comparing eb0b7ab against main (4144062)

  🔍 Preview build  

1 file changed
± library/typing.html

@JelleZijlstra JelleZijlstra merged commit 2e94f14 into python:main May 3, 2026
30 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs May 3, 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.13, 3.14.
🐍🍒⛏🤖

@miss-islington-app
Copy link
Copy Markdown

Sorry, @hyperkai and @JelleZijlstra, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 2e94f14310e8ab62f41dd01276f2c69cb3d36da2 3.14

@miss-islington-app
Copy link
Copy Markdown

Sorry, @hyperkai and @JelleZijlstra, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 2e94f14310e8ab62f41dd01276f2c69cb3d36da2 3.13

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.13 bugs and security fixes needs backport to 3.14 bugs and security fixes skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

The docs should also say infer_variance parameter with typing.ParamSpec explanation

4 participants