# What changed in mypy

> 29 changes in mypy 1 to 2 from its official release notes, upgrade guides and advisories: 1 breaking. Each one cited. Sources checked 2026-10-19. HTML: https://unstale.sh/pypi/mypy/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## mypy 2

### Fixes and other changes

- Clears the mypyc coroutine environment when a coroutine completes. (2.3.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-231)
- Fixes mypyc handling of default_factory for inherited dataclasses. (2.3.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-231)
- Fixes a mypyc crash when an Iterator yields twice. (2.3.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-231)
- Fixes a crash when unpacking a return value from an overload. (2.3.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-231)

## mypy 1

### Breaking changes

- Mypy now fails with an explicit error on PyPy. (1.19.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1191)

### Behavior and default changes

- Allows dangerous identity comparisons involving variables typed as Any. (1.20.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1201)
- Sync is always disabled in the SQLite cache. (1.20.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1201)
- This flag is no longer treated as a strict flag. (1.20.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1201)

### Tooling

- Adds initial support for Python 3.15.0a8. (1.20.2) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1202)

### Fixes and other changes

- Fixes a regression related to generic callables. (1.20.2) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1202)
- Fixes an issue with module dunder attributes in mypyc. (1.20.2) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1202)
- Mypy now correctly aggregates narrowing information on parent expressions. (1.20.2) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1202)
- Fixes mypyc match statement semantics for or patterns. (1.20.2) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1202)
- Fixes slicing behavior in non-strict optional mode. (1.20.2) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1202)
- Avoids widening types in some contexts to fix a regression. (1.20.2) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1202)
- Fixes narrowing with chained comparisons. (1.20.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1201)
- The typeshed change to dict.__or__ types is reverted, changing how mypy checks those operations. (1.20.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1201)
- Fixes a regression involving catching an empty tuple in an except clause. (1.20.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1201)
- Fixes reachability analysis for narrowing frozenset and dict views. (1.20.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1201)
- Avoids narrowing to an unreachable type at module level. (1.20.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1201)
- Avoids narrowing type[T] in type calls. (1.20.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1201)
- Fixes narrowing for match cases involving variadic tuples. (1.20.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1201)
- Fixes noncommutative joins involving bounded TypeVars, improving type-checking results. (1.19.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1191)
- Fixes a mypyc generator regression involving an empty tuple. (1.19.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1191)
- Fixes a crash when a type variable with a forward reference is used in another module. (1.19.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1191)
- Cached runs now respect the selected output format by serializing raw errors in cache metadata. (1.19.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1191)
- Fixes a crash when a star import encounters a redefinition. (1.19.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1191)
- Allows types.NoneType in match cases. (1.19.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1191)
- Fixes a crash involving an Unpack-ed TypeVarTuple. (1.19.1) — [release notes](https://github.com/python/mypy/blob/05e50c09918549e86b379684dcf27cfd35f880f2/CHANGELOG.md#mypy-1191)
