unstale

pypi / mypy

mypy

What changed in mypy 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.

1 breaking3 behavior and defaults1 tooling24 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.0 on npm

mypy 24 changes

Fixes and other changes 4

  • Clears the mypyc coroutine environment when a coroutine completes.

    2.3.1release notes

  • Fixes mypyc handling of default_factory for inherited dataclasses.

    2.3.1release notes

  • Fixes a mypyc crash when an Iterator yields twice.

    2.3.1release notes

  • Fixes a crash when unpacking a return value from an overload.

    2.3.1release notes

mypy 125 changes

Breaking changes 1

  • Mypy now fails with an explicit error on PyPy.

    1.19.1release notes

Behavior and default changes 3

  • Allows dangerous identity comparisons involving variables typed as Any.

    1.20.1release notes

  • Sync is always disabled in the SQLite cache.

    1.20.1release notes

  • This flag is no longer treated as a strict flag.

    1.20.1release notes

Tooling 1

Fixes and other changes 20

  • Fixes a regression related to generic callables.

    1.20.2release notes

  • Fixes an issue with module dunder attributes in mypyc.

    1.20.2release notes

  • Mypy now correctly aggregates narrowing information on parent expressions.

    1.20.2release notes

  • Fixes mypyc match statement semantics for or patterns.

    1.20.2release notes

  • Fixes slicing behavior in non-strict optional mode.

    1.20.2release notes

  • Avoids widening types in some contexts to fix a regression.

    1.20.2release notes

  • Fixes narrowing with chained comparisons.

    1.20.1release notes

  • The typeshed change to dict.__or__ types is reverted, changing how mypy checks those operations.

    1.20.1release notes

  • Fixes a regression involving catching an empty tuple in an except clause.

    1.20.1release notes

  • Fixes reachability analysis for narrowing frozenset and dict views.

    1.20.1release notes

  • Avoids narrowing to an unreachable type at module level.

    1.20.1release notes

  • Avoids narrowing type[T] in type calls.

    1.20.1release notes

  • Fixes narrowing for match cases involving variadic tuples.

    1.20.1release notes

  • Fixes noncommutative joins involving bounded TypeVars, improving type-checking results.

    1.19.1release notes

  • Fixes a mypyc generator regression involving an empty tuple.

    1.19.1release notes

  • Fixes a crash when a type variable with a forward reference is used in another module.

    1.19.1release notes

  • Cached runs now respect the selected output format by serializing raw errors in cache metadata.

    1.19.1release notes

  • Fixes a crash when a star import encounters a redefinition.

    1.19.1release notes

  • Allows types.NoneType in match cases.

    1.19.1release notes

  • Fixes a crash involving an Unpack-ed TypeVarTuple.

    1.19.1release notes