You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix a few inconsistencies in protocol/type object interactions (Ivan Levkivskyi, PR [19267](https://github.com/python/mypy/pull/19267))
48
+
* Refactor/unify access to static attributes (Ivan Levkivskyi, PR [19254](https://github.com/python/mypy/pull/19254))
49
+
* Remove inconsistencies in operator handling (Ivan Levkivskyi, PR [19250](https://github.com/python/mypy/pull/19250))
50
+
* Make protocol subtyping more consistent (Ivan Levkivskyi, PR [18943](https://github.com/python/mypy/pull/18943))
51
+
52
+
### Fixes to Nondeterministic Type Checking
53
+
54
+
Previous mypy versions could infer different types for certain expressions
55
+
across different runs (typically depending on which order certain types
56
+
were processed, and this order was nondeterministic). This release includes
57
+
fixes to several such issues.
58
+
59
+
* Fix nondeterministic type checking by making join with explicit Protocol and type promotion commute (Shantanu, PR [18402](https://github.com/python/mypy/pull/18402))
60
+
* Fix nondeterministic type checking caused by nonassociative of None joins (Shantanu, PR [19158](https://github.com/python/mypy/pull/19158))
61
+
* Fix nondeterministic type checking caused by nonassociativity of joins (Shantanu, PR [19147](https://github.com/python/mypy/pull/19147))
62
+
* Fix nondeterministic type checking by making join between `type` and TypeVar commute (Shantanu, PR [19149](https://github.com/python/mypy/pull/19149))
63
+
64
+
### Remove Support for Targeting Python 3.8
65
+
66
+
Mypy now requires `--python-version 3.9` or greater. Support for targeting Python 3.8 is
67
+
fully removed now. Since 3.8 is an unsupported version, mypy will default to the oldest
68
+
supported version (currently 3.9) if you still try to target 3.8.
10
69
11
70
This change is necessary because typeshed stopped supporting Python 3.8 after it
12
71
reached its End of Life in October 2024.
@@ -17,18 +76,128 @@ Contributed by Marc Mueller
17
76
### Initial Support for Python 3.14
18
77
19
78
Mypy is now tested on 3.14 and mypyc works with 3.14.0b3 and later.
20
-
Mypyc compiled wheels of mypy itself will be available for new versions after 3.14.0rc1 is released.
79
+
Binary wheels compiled with mypyc for mypy itself will be available for 3.14
80
+
some time after 3.14.0rc1 has been released.
21
81
22
-
Note that not all new features might be supported just yet.
82
+
Note that not all features are supported just yet.
23
83
24
84
Contributed by Marc Mueller (PR [19164](https://github.com/python/mypy/pull/19164))
25
85
26
-
### Deprecated Flag: \--force-uppercase-builtins
86
+
### Deprecated Flag: `--force-uppercase-builtins`
27
87
28
-
Mypy only supports Python 3.9+. The \--force-uppercase-builtins flag is now deprecated and a no-op. It will be removed in a future version.
88
+
Mypy only supports Python 3.9+. The `--force-uppercase-builtins` flag is now
89
+
deprecated as unnecessary, and a no-op. It will be removed in a future version.
29
90
30
91
Contributed by Marc Mueller (PR [19176](https://github.com/python/mypy/pull/19176))
31
92
93
+
### Mypyc: Improvements to Generators and Async Functions
94
+
95
+
This release includes both performance improvements and bug fixes related
96
+
to generators and async functions (these share many implementation details).
97
+
98
+
* Fix exception swallowing in async try/finally blocks with await (Chainfire, PR [19353](https://github.com/python/mypy/pull/19353))
99
+
* Fix AttributeError in async try/finally with mixed return paths (Chainfire, PR [19361](https://github.com/python/mypy/pull/19361))
* Support several more constructs in stubgen's alias printer (Stanislav Terliakov, PR [18888](https://github.com/python/mypy/pull/18888))
138
+
139
+
### Miscellaneous Fixes and Improvements
140
+
141
+
* Combine the revealed types of multiple iteration steps in a more robust manner (Christoph Tyralla, PR [19324](https://github.com/python/mypy/pull/19324))
142
+
* Improve the handling of "iteration dependent" errors and notes in finally clauses (Christoph Tyralla, PR [19270](https://github.com/python/mypy/pull/19270))
143
+
* Lessen dmypy suggest path limitations for Windows machines (CoolCat467, PR [19337](https://github.com/python/mypy/pull/19337))
144
+
* Fix type ignore comments erroneously marked as unused by dmypy (Charlie Denton, PR [15043](https://github.com/python/mypy/pull/15043))
* Fix missing error context for unpacking assignment involving star expression (Brian Schubert, PR [19258](https://github.com/python/mypy/pull/19258))
147
+
* Fix and simplify error de-duplication (Ivan Levkivskyi, PR [19247](https://github.com/python/mypy/pull/19247))
148
+
* Disallow `ClassVar` in type aliases (Brian Schubert, PR [19263](https://github.com/python/mypy/pull/19263))
149
+
* Add script that prints list of compiled files when compiling mypy (Jukka Lehtosalo, PR [19260](https://github.com/python/mypy/pull/19260))
150
+
* Fix help message url for "None and Optional handling" section (Guy Wilson, PR [19252](https://github.com/python/mypy/pull/19252))
151
+
* Display fully qualified name of imported base classes in errors about incompatible overrides (Mikhail Golubev, PR [19115](https://github.com/python/mypy/pull/19115))
152
+
* Avoid false `unreachable`, `redundant-expr`, and `redundant-casts` warnings in loops more robustly and efficiently, and avoid multiple `revealed type` notes for the same line (Christoph Tyralla, PR [19118](https://github.com/python/mypy/pull/19118))
153
+
* Fix type extraction from `isinstance` checks (Stanislav Terliakov, PR [19223](https://github.com/python/mypy/pull/19223))
154
+
* Erase stray type variables in `functools.partial` (Stanislav Terliakov, PR [18954](https://github.com/python/mypy/pull/18954))
155
+
* Make inferring condition value recognize the whole truth table (Stanislav Terliakov, PR [18944](https://github.com/python/mypy/pull/18944))
156
+
* Support type aliases, `NamedTuple` and `TypedDict` in constrained TypeVar defaults (Stanislav Terliakov, PR [18884](https://github.com/python/mypy/pull/18884))
157
+
* Move dataclass `kw_only` fields to the end of the signature (Stanislav Terliakov, PR [19018](https://github.com/python/mypy/pull/19018))
158
+
* Provide a better fallback value for the `python_version` option (Marc Mueller, PR [19162](https://github.com/python/mypy/pull/19162))
159
+
* Avoid spurious non-overlapping equality error with metaclass with `__eq__` (Michael J. Sullivan, PR [19220](https://github.com/python/mypy/pull/19220))
160
+
* Narrow type variable bounds (Ivan Levkivskyi, PR [19183](https://github.com/python/mypy/pull/19183))
161
+
* Add classifier for Python 3.14 (Marc Mueller, PR [19199](https://github.com/python/mypy/pull/19199))
* Emit a friendlier warning on invalid exclude regex, instead of a stacktrace (wyattscarpenter, PR [19102](https://github.com/python/mypy/pull/19102))
170
+
* Enable ANSI color codes for dmypy client in Windows (wyattscarpenter, PR [19088](https://github.com/python/mypy/pull/19088))
171
+
* Extend special case for context-based type variable inference to unions in return position (Stanislav Terliakov, PR [18976](https://github.com/python/mypy/pull/18976))
172
+
173
+
### Acknowledgements
174
+
175
+
Thanks to all mypy contributors who contributed to this release:
176
+
177
+
* Alexey Makridenko
178
+
* Brian Schubert
179
+
* Chad Dombrova
180
+
* Chainfire
181
+
* Charlie Denton
182
+
* Charulata
183
+
* Christoph Tyralla
184
+
* CoolCat467
185
+
* Donal Burns
186
+
* Guy Wilson
187
+
* Ivan Levkivskyi
188
+
* johnthagen
189
+
* Jukka Lehtosalo
190
+
* Łukasz Kwieciński
191
+
* Marc Mueller
192
+
* Michael J. Sullivan
193
+
* Mikhail Golubev
194
+
* Sebastian Rittau
195
+
* Shantanu
196
+
* Stanislav Terliakov
197
+
* wyattscarpenter
198
+
199
+
I’d also like to thank my employer, Dropbox, for supporting mypy development.
200
+
32
201
## Mypy 1.16
33
202
34
203
We’ve just uploaded mypy 1.16 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)).
0 commit comments