Skip to content

2.2 release planning #21618

Description

@esarp

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.

Activity

  1. self-assigned this
    on Jun 15, 2026
  2. added
    metaIssues tracking a broad area of work
    on Jun 15, 2026
  3. JukkaL commented on Jun 15, 2026

    @JukkaL
    Collaborator
  4. JukkaL commented on Jun 15, 2026

    @JukkaL
    Collaborator

    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.

  5. esarp commented on Jun 22, 2026

    @esarp
    CollaboratorAuthor

    Release branch cut as release-2.2 from 5ef0902

  6. delfick commented on Jun 23, 2026

    @delfick

    I 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 MyQuerySet instead of MyQuerySet[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

  7. ilevkivskyi commented on Jul 1, 2026

    @ilevkivskyi
    Member

    I think dependency bumps #21663 and #21664 should be cherry-picked to release branch.

  8. esarp commented on Jul 1, 2026

    @esarp
    CollaboratorAuthor

    We'll need to include bumps to librt (#21663) and ast (#21664) as well Comment above mentioned these already

  9. ilevkivskyi commented on Jul 1, 2026

    @ilevkivskyi
    Member

    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.
  10. ilevkivskyi commented on Jul 3, 2026

    @ilevkivskyi
    Member

    Note I just merged mypyc/mypy_mypyc-wheels#116, I am also updating the upload script to add the wasm wheels, see #21671

  11. esarp commented on Jul 6, 2026

    @esarp
    CollaboratorAuthor

    Changelog 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.

  12. ilevkivskyi commented on Jul 6, 2026

    @ilevkivskyi
    Member

    @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 TypeForm support 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_workers and not num_workers, etc.

    also cc @JukkaL

  13. ilevkivskyi commented on Jul 6, 2026

    @ilevkivskyi
    Member

    Btw @esarp all changelog updates should be merged in master as well.

  14. esarp commented on Jul 7, 2026

    @esarp
    CollaboratorAuthor

    Put up a PR for the changelog: https://github.com/python/mypy/pull/21691/changes

    • Fleshed out the TypedDict section
    • Added sections on type variable defaults, TypeForm support, 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.

  15. esarp commented on Jul 8, 2026

    @esarp
    CollaboratorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

metaIssues tracking a broad area of work

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions