Repository navigation
2.2 release planning #21618
Description
Activity
- addedmetaIssues tracking a broad area of workIssues tracking a broad area of work
on Jun 15, 2026 This is an important fix:
I will hopefully prepare at least one native parser fix (these are still not ready for PRs). These can be cherry-picked to the release branch, so they don't need to block release branch creation.
Reacted by esarpRelease branch cut as
release-2.2from 5ef0902Reacted by Stephen Moore and Ellis BreenI tried out the release branch on my codebase at work and something about #21491 breaks the way defaults on type vars work and I start to get mypy doing defer assertion errors on my django querysets in a situation where they appear without a specified type var (as in
MyQuerySetinstead ofMyQuerySet[MyModel]) (though tbf it's complicated) and if I change them to always have a value I start to get mypy failing to serialize placeholder types. I'm still investigating, but thought I'd mention that.edit. ah, I found the problem, this seems to fix it but it breaks the unit tests, am still looking
From 84140edcb76aaf4b6bf3a2fd1f6a5ffc80277810 Mon Sep 17 00:00:00 2001 From: Stephen Moore <stephen.moore@kraken.tech> Date: Wed, 24 Jun 2026 10:13:32 +1000 Subject: [PATCH] WIP: this makes a difference --- mypy/semanal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy/semanal.py b/mypy/semanal.py index e010273b0..324910809 100644 --- a/mypy/semanal.py +++ b/mypy/semanal.py @@ -2009,7 +2009,7 @@ class SemanticAnalyzer( # re-analyze this class. Note we force progress to handle cases like # class C[T = C], this matches logic in process_typevar_parameters() # for "old style" type variables. - self.defer(force_progress=tvar_defs != defn.type_vars) + self.mark_incomplete(defn.name, defn) self.analyze_class_keywords(defn) bases_result = self.analyze_base_classes(defn.name, bases) -- 2.50.1 (Apple Git-155)
edit2: it seems understanding this enough is a bit beyond me, I've created #21640
FYI mypyc/mypy_mypyc-wheels#116 adds Web Assembly wheels for mypy. Note however:
- We only build it for Python 3.14
- Emscripten doesn't support subprocesses, so parallel checking will not work.
Reacted by esarpNote I just merged mypyc/mypy_mypyc-wheels#116, I am also updating the upload script to add the wasm wheels, see #21671
Reacted by esarpChangelog is viewable here: https://github.com/esarp/mypy/blob/release-2.2/CHANGELOG.md
Release branch should include all the mentioned changes. If nothing else comes up, I'll plan on finishing up the release later today.
@esarp There are some issues with changelog:
- Section on closed TypedDicts is way too terse. It should have at least a basic example of usage.
- Classes nested in functions is mostly an internal thing (although it does fix some user-facing issues as a side-effect). It should be either last in the sections, or maybe even not have a dedicated section at all.
- We should probably have a (short) dedicated section announcing that type variable defaults support is now complete. IIUC we finally support all major features in the PEP/spec. That said, I think we are still missing the docs section for this (but I may be wrong). If this is the case, the docs should be added before the release is out.
- IIUC
TypeFormsupport is no longer experimental (this was merged in master before 2.1, but was reverted in 2.1 release branch because of a performance regression that is now partially mitigated). I think it is worth having a short section highlighting it is no longer experimental. - In the section about
__new__()it is probably worth mentioning that mypy still gives an error at definition site if the explicit annotation is not a subtype of the current class (since this is technically not type-safe). - I think it is worth highlighting that we are now shipping experimental WASM wheel for Python 3.14.
- There are a bunch of formatting problems: things that are conceptually "code", should be formatted as such, for example, write
Union[TypedDict, dict[K, V]], and not Union[TypedDict, dict[K, V]],num_workersand not num_workers, etc.
also cc @JukkaL
Reacted by esarpBtw @esarp all changelog updates should be merged in master as well.
Put up a PR for the changelog: https://github.com/python/mypy/pull/21691/changes
- Fleshed out the
TypedDictsection - Added sections on type variable defaults,
TypeFormsupport, and WASM wheels - Removed the nested classes section since we added a bunch more
- Took an initial pass on code formatting
Would appreciate more eyes on the code samples to make sure those are good. I'll do another pass on formatting here in a bit but feel free to point any of those out as well.
- Fleshed out the
Version 2.2 is released: https://mypy-lang.blogspot.com/2026/07/mypy-22-released.html
Regressions:
Patches for a bug release:
(feel free to edit)
Release tracker for 2.2, which should be released before the end of the month.
If there are any PRs you would like to ensure are included, please link them here.