Skip to content

Commit 78c9575

Browse files
committed
Misc changelog updates
1 parent 0ca02a1 commit 78c9575

1 file changed

Lines changed: 43 additions & 39 deletions

File tree

CHANGELOG.md

Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class A:
2222
except ValueError:
2323
raise Exception(f"'{x}' is not a valid value for 'f'")
2424
```
25-
2625
Contributed by Ivan Levkivskyi (PR [18510](https://github.com/python/mypy/pull/18510))
2726

2827
### Flexible Variable Redefinitions (Experimental)
@@ -36,6 +35,26 @@ TODO:
3635
* `dict.get`
3736
* Use union types instead of join in binder (Ivan Levkivskyi, PR [18538](https://github.com/python/mypy/pull/18538))
3837

38+
### Improvements to Attribute Resolution
39+
40+
This release includes various fixes to inconsistent resolution of attribute access.
41+
42+
* Consolidate descriptor handling in checkmember.py (Ivan Levkivskyi, PR [18831](https://github.com/python/mypy/pull/18831))
43+
* Use checkmember.py to check multiple inheritance (Ivan Levkivskyi, PR [18876](https://github.com/python/mypy/pull/18876))
44+
* Use checkmember.py to check method override (Ivan Levkivskyi, PR [18870](https://github.com/python/mypy/pull/18870))
45+
* Fix descriptor overload selection (Ivan Levkivskyi, PR [18868](https://github.com/python/mypy/pull/18868))
46+
* Handle union types when binding self (Ivan Levkivskyi, PR [18867](https://github.com/python/mypy/pull/18867))
47+
* Use checkmember.py to check variable overrides (Ivan Levkivskyi, PR [18847](https://github.com/python/mypy/pull/18847))
48+
* Consolidate descriptor handling in checkmember.py (Ivan Levkivskyi, PR [18831](https://github.com/python/mypy/pull/18831))
49+
50+
### Make Implementation for Abstract Overloads Optional
51+
52+
* Allow omitting implementation for abstract overloads (Ivan Levkivskyi, PR [18882](https://github.com/python/mypy/pull/18882))
53+
54+
### Option to Exclude Everything in .gitignore
55+
56+
* Add an option to exclude everything in .gitignore (Ivan Levkivskyi, PR [18696](https://github.com/python/mypy/pull/18696))
57+
3958
### Selectively Disable Deprecated Warnings
4059

4160
It's now possible to selectively disable warnings generated from
@@ -99,6 +118,8 @@ Contributed by Marc Mueller (PR [18641](https://github.com/python/mypy/pull/1864
99118
* Fix wheel build for cp313-win (Marc Mueller, PR [18560](https://github.com/python/mypy/pull/18560))
100119
* Reduce impact of immortality (introduced in Python 3.12) on reference counting performance (Jukka Lehtosalo, PR [18459](https://github.com/python/mypy/pull/18459))
101120
* Update math error messages for 3.14 (Marc Mueller, PR [18534](https://github.com/python/mypy/pull/18534))
121+
* Update math error messages for 3.14 (2) (Marc Mueller, PR [18949](https://github.com/python/mypy/pull/18949))
122+
* Replace deprecated `_PyLong_new` with `PyLongWriter` API (Marc Mueller, PR [18532](https://github.com/python/mypy/pull/18532))
102123

103124
### Fixes to Crashes
104125

@@ -112,6 +133,13 @@ Contributed by Marc Mueller (PR [18641](https://github.com/python/mypy/pull/1864
112133
* Fix crashes on incorectly detected recursive aliases (Ivan Levkivskyi, PR [18625](https://github.com/python/mypy/pull/18625))
113134
* Report that `NamedTuple` and `dataclass` are incompatile instead of crashing (Christoph Tyralla, PR [18633](https://github.com/python/mypy/pull/18633))
114135

136+
### Performance Improvements
137+
138+
These are specific to mypy. Mypyc-related performance improvements are discussed elsewhere.
139+
140+
* Speed up binding `self` in trivial cases (Ivan Levkivskyi, PR [19024](https://github.com/python/mypy/pull/19024))
141+
* Small constraint solver optimization (Aaron Gokaslan, PR [18688](https://github.com/python/mypy/pull/18688))
142+
115143
### Documentation Updates
116144

117145
* Re-add documentation for formatting mypy `--help` text (wyattscarpenter, PR [19063](https://github.com/python/mypy/pull/19063))
@@ -128,6 +156,7 @@ Contributed by Marc Mueller (PR [18641](https://github.com/python/mypy/pull/1864
128156
* Fix valid type detection to allow pipe unions (Chad Dombrova, PR [18726](https://github.com/python/mypy/pull/18726))
129157
* Include simple decorators in stub files (Marc Mueller, PR [18489](https://github.com/python/mypy/pull/18489))
130158
* Support positional and keyword-only arguments in stubdoc (Paul Ganssle, PR [18762](https://github.com/python/mypy/pull/18762))
159+
* Fall back to Incomplete if we are unable to determine the module name (Stanislav Terliakov, PR [19084](https://github.com/python/mypy/pull/19084))
131160

132161
### Stubtest Improvements
133162

@@ -142,29 +171,24 @@ Contributed by Marc Mueller (PR [18641](https://github.com/python/mypy/pull/1864
142171
### Miscellanous Fixes and Improvements
143172

144173
* Clear more data in TypeChecker.reset() instead of asserting (Valentin Stanciu, PR [19087](https://github.com/python/mypy/pull/19087))
145-
* Add --strict-bytes to --strict (wyattscarpenter, PR [19049](https://github.com/python/mypy/pull/19049))
174+
* Add `--strict-bytes` to `--strict` (wyattscarpenter, PR [19049](https://github.com/python/mypy/pull/19049))
146175
* Admit that Final variables are never redefined (Stanislav Terliakov, PR [19083](https://github.com/python/mypy/pull/19083))
147-
* Fall back to Incomplete if we are unable to determine the module name (Stanislav Terliakov, PR [19084](https://github.com/python/mypy/pull/19084))
148-
* Speed up binding `self` in trivial cases (Ivan Levkivskyi, PR [19024](https://github.com/python/mypy/pull/19024))
149176
* Add special support for `@django.cached_property` needed in `django-stubs` (sobolevn, PR [18959](https://github.com/python/mypy/pull/18959))
150177
* Do not narrow types to Never with binder (Ivan Levkivskyi, PR [18972](https://github.com/python/mypy/pull/18972))
151178
* Local forward refs should precede global forward refs (Ivan Levkivskyi, PR [19000](https://github.com/python/mypy/pull/19000))
152-
* Consolidate descriptor handling in checkmember.py (Ivan Levkivskyi, PR [18831](https://github.com/python/mypy/pull/18831))
153179
* Do not cache module lookup results that may become invalid in future (Stanislav Terliakov, PR [19044](https://github.com/python/mypy/pull/19044))
154180
* Only consider meta variables in ambiguous "any of" constraints (Stanislav Terliakov, PR [18986](https://github.com/python/mypy/pull/18986))
155181
* Allow accessing `__init__` on final classes and when `__init__` is final (Stanislav Terliakov, PR [19035](https://github.com/python/mypy/pull/19035))
156182
* Mark varargs as pos-only (A5rocks, PR [19022](https://github.com/python/mypy/pull/19022))
157183
* Enable colored output for argparse help in Python 3.14 (Marc Mueller, PR [19021](https://github.com/python/mypy/pull/19021))
158184
* Fix argparse for Python 3.14 (Marc Mueller, PR [19020](https://github.com/python/mypy/pull/19020))
159-
* dmypy suggest can now suggest through contextmanager-based decorators (Anthony Sottile, PR [18948](https://github.com/python/mypy/pull/18948))
185+
* `dmypy suggest` can now suggest through contextmanager-based decorators (Anthony Sottile, PR [18948](https://github.com/python/mypy/pull/18948))
160186
* Check superclass compatibility of untyped methods if `--check-untyped-defs` is set (Stanislav Terliakov, PR [18970](https://github.com/python/mypy/pull/18970))
161-
* Bug fix of __r<magic_methods>__ being used under the same __<magic_method>__ hook (Arnav Jain, PR [18995](https://github.com/python/mypy/pull/18995))
187+
* Bug fix of `__r<magic_methods>__` being used under the same `__<magic_method>__` hook (Arnav Jain, PR [18995](https://github.com/python/mypy/pull/18995))
162188
* Prioritize `.pyi` from `-stubs` packages over bundled `.pyi` (Joren Hammudoglu, PR [19001](https://github.com/python/mypy/pull/19001))
163189
* Do not narrow types to Never with binder (Ivan Levkivskyi, PR [18972](https://github.com/python/mypy/pull/18972))
164190
* Local forward refs should precede global forward refs (Ivan Levkivskyi, PR [19000](https://github.com/python/mypy/pull/19000))
165191
* Add missing branch for `is_subtype(TypeType, Overload)` (Stanislav Terliakov, PR [18975](https://github.com/python/mypy/pull/18975))
166-
* Fix typo in testPropertySetterDecorated (Marc Mueller, PR [18946](https://github.com/python/mypy/pull/18946))
167-
* Update math error messages for 3.14 (2) (Marc Mueller, PR [18949](https://github.com/python/mypy/pull/18949))
168192
* use is_same_type when determining if a cast is redundant (Anthony Sottile, PR [18588](https://github.com/python/mypy/pull/18588))
169193
* Make some parse errors non-blocking (Shantanu, PR [18941](https://github.com/python/mypy/pull/18941))
170194
* Fix PEP 695 type alias with mix of type args (PEP 696) (Marc Mueller, PR [18919](https://github.com/python/mypy/pull/18919))
@@ -174,24 +198,15 @@ Contributed by Marc Mueller (PR [18641](https://github.com/python/mypy/pull/1864
174198
* Fix incremental issue with namespace packages (option 1) (Shantanu, PR [18907](https://github.com/python/mypy/pull/18907))
175199
* Exclude irrelevant members in `narrow_declared_type` from union overlapping with enum (Stanislav Terliakov, PR [18897](https://github.com/python/mypy/pull/18897))
176200
* Flatten union before contracting literals when checking subtyping (Stanislav Terliakov, PR [18898](https://github.com/python/mypy/pull/18898))
177-
* Fix ForwardRef comparison in test for Python 3.14 (Marc Mueller, PR [18885](https://github.com/python/mypy/pull/18885))
178201
* Do not add `kw_only` dataclass fields to `__match_args__` (sobolevn, PR [18892](https://github.com/python/mypy/pull/18892))
179202
* Fix error message when returning long tuple with type mismatch (Thomas Mattone, PR [18881](https://github.com/python/mypy/pull/18881))
180203
* Treat `TypedDict` (old-style) aliases as regular `TypedDict`s (Stanislav Terliakov, PR [18852](https://github.com/python/mypy/pull/18852))
181-
* Allow omitting implementation for abstract overloads (Ivan Levkivskyi, PR [18882](https://github.com/python/mypy/pull/18882))
182-
* Use checkmember.py to check multiple inheritance (Ivan Levkivskyi, PR [18876](https://github.com/python/mypy/pull/18876))
183204
* Warn about unused `type: ignore` comments when error code is disabled (Brian Schubert, PR [18849](https://github.com/python/mypy/pull/18849))
184-
* Use checkmember.py to check method override (Ivan Levkivskyi, PR [18870](https://github.com/python/mypy/pull/18870))
185-
* Fix descriptor overload selection (Ivan Levkivskyi, PR [18868](https://github.com/python/mypy/pull/18868))
186205
* Reject duplicate `ParamSpec.{args,kwargs}` at call site (Stanislav Terliakov, PR [18854](https://github.com/python/mypy/pull/18854))
187-
* Handle union types when binding self (Ivan Levkivskyi, PR [18867](https://github.com/python/mypy/pull/18867))
188206
* Always use `.enum_members` to find enum members (sobolevn, PR [18675](https://github.com/python/mypy/pull/18675))
189-
* Use checkmember.py to check variable overrides (Ivan Levkivskyi, PR [18847](https://github.com/python/mypy/pull/18847))
190-
* Admit that **kwargs mapping subtypes may have no direct type parameters (Stanislav Terliakov, PR [18850](https://github.com/python/mypy/pull/18850))
207+
* Admit that `**kwargs` mapping subtypes may have no direct type parameters (Stanislav Terliakov, PR [18850](https://github.com/python/mypy/pull/18850))
191208
* Drop pkg_resources from stubinfo (Shantanu, PR [18840](https://github.com/python/mypy/pull/18840))
192-
* add `scipy-stubs` as non-typeshed stub package (Joren Hammudoglu, PR [18832](https://github.com/python/mypy/pull/18832))
193-
* Consolidate descriptor handling in checkmember.py (Ivan Levkivskyi, PR [18831](https://github.com/python/mypy/pull/18831))
194-
* Move some functions from checkmember to typeops (Ivan Levkivskyi, PR [18820](https://github.com/python/mypy/pull/18820))
209+
* Add `scipy-stubs` as non-typeshed stub package (Joren Hammudoglu, PR [18832](https://github.com/python/mypy/pull/18832))
195210
* Fix dict.get issue for typeshed update (Marc Mueller, PR [18806](https://github.com/python/mypy/pull/18806))
196211
* Narrow tagged unions in match statements (Gene Parmesan Thomas, PR [18791](https://github.com/python/mypy/pull/18791))
197212
* Consistently store settable property type (Ivan Levkivskyi, PR [18774](https://github.com/python/mypy/pull/18774))
@@ -200,43 +215,32 @@ Contributed by Marc Mueller (PR [18641](https://github.com/python/mypy/pull/1864
200215
* Process superclass methods before subclass methods in semanal (Ivan Levkivskyi, PR [18723](https://github.com/python/mypy/pull/18723))
201216
* Only defer top-level functions (Ivan Levkivskyi, PR [18718](https://github.com/python/mypy/pull/18718))
202217
* Add one more type-checking pass (Ivan Levkivskyi, PR [18717](https://github.com/python/mypy/pull/18717))
203-
* Optimize mypy/solve.py with min instead of sort (Aaron Gokaslan, PR [18688](https://github.com/python/mypy/pull/18688))
204-
* Add an option to exclude everything in .gitignore (Ivan Levkivskyi, PR [18696](https://github.com/python/mypy/pull/18696))
205-
* Add regression test for typing_extensions.Literal and mypy_extensions.TypedDict (Marc Mueller, PR [18694](https://github.com/python/mypy/pull/18694))
206218
* Properly account for `member` and `nonmember` in `TypeInfo.enum_members` (sobolevn, PR [18559](https://github.com/python/mypy/pull/18559))
207219
* Fix instance vs tuple subtyping edge case (Ivan Levkivskyi, PR [18664](https://github.com/python/mypy/pull/18664))
208220
* Better handling of Any/object in variadic generics (Ivan Levkivskyi, PR [18643](https://github.com/python/mypy/pull/18643))
209221
* Fix handling of named tuples in class match pattern (Ivan Levkivskyi, PR [18663](https://github.com/python/mypy/pull/18663))
210222
* Fix regression for user config files (Shantanu, PR [18656](https://github.com/python/mypy/pull/18656))
211-
* Delete old meet hack from checkmember.py (Ivan Levkivskyi, PR [18662](https://github.com/python/mypy/pull/18662))
212-
* GNU/Hurd returns empty string from getsockname() for AF_UNIX sockets (Mattias Ellert, PR [18630](https://github.com/python/mypy/pull/18630))
223+
* Fix dmypy socket issue on GNU/Hurd (Mattias Ellert, PR [18630](https://github.com/python/mypy/pull/18630))
213224
* Don't assume that for loop body index variable is always set (Jukka Lehtosalo, PR [18631](https://github.com/python/mypy/pull/18631))
214-
* Add option to selectively disable deprecation warnings (Marc Mueller, PR [18641](https://github.com/python/mypy/pull/18641))
215225
* Fix overlap check for variadic generics (Ivan Levkivskyi, PR [18638](https://github.com/python/mypy/pull/18638))
216-
* Improve support for functools.partial of overloaded callable protocol (Shantanu, PR [18639](https://github.com/python/mypy/pull/18639))
226+
* Improve support for `functools.partial` of overloaded callable protocol (Shantanu, PR [18639](https://github.com/python/mypy/pull/18639))
217227
* Allow lambdas in `except*` clauses (Stanislav Terliakov, PR [18620](https://github.com/python/mypy/pull/18620))
218-
* Test and fix trailing commas in many multiline string options in `pyproject.toml` (sobolevn, PR [18624](https://github.com/python/mypy/pull/18624))
228+
* Fix trailing commas in many multiline string options in `pyproject.toml` (sobolevn, PR [18624](https://github.com/python/mypy/pull/18624))
219229
* Allow trailing commas for `files` setting in `mypy.ini` and `setup.ini` (sobolevn, PR [18621](https://github.com/python/mypy/pull/18621))
220230
* Fix "not callable" issue for `@dataclass(frozen=True)` with `Final` attr (sobolevn, PR [18572](https://github.com/python/mypy/pull/18572))
221-
* Add missing TypedDict special case to checkmember.py (Stanislav Terliakov, PR [18604](https://github.com/python/mypy/pull/18604))
222-
* Use lower case "list" and "dict" in invariance notes (Jukka Lehtosalo, PR [18594](https://github.com/python/mypy/pull/18594))
231+
* Add missing TypedDict special case when checking member access (Stanislav Terliakov, PR [18604](https://github.com/python/mypy/pull/18604))
232+
* Use lower case `list` and `dict` in invariance notes (Jukka Lehtosalo, PR [18594](https://github.com/python/mypy/pull/18594))
223233
* Fix inference when class and instance match protocol (Ivan Levkivskyi, PR [18587](https://github.com/python/mypy/pull/18587))
224234
* Remove support for `builtins.Any` (Marc Mueller, PR [18578](https://github.com/python/mypy/pull/18578))
225235
* Update the overlapping check for tuples to account for NamedTuples (A5rocks, PR [18564](https://github.com/python/mypy/pull/18564))
226-
* Add constants for Concatenate and Unpack type names (Marc Mueller, PR [18553](https://github.com/python/mypy/pull/18553))
227-
* PEP 702 (@deprecated): "normal" overloaded methods (Christoph Tyralla, PR [18477](https://github.com/python/mypy/pull/18477))
228-
* Fix unsafe default return values in NodeVisitor methods (A5rocks, PR [18536](https://github.com/python/mypy/pull/18536))
236+
* PEP 702 (`@deprecated`): "normal" overloaded methods (Christoph Tyralla, PR [18477](https://github.com/python/mypy/pull/18477))
229237
* Start propagating end columns/lines through for `type-arg` errors (A5rocks, PR [18533](https://github.com/python/mypy/pull/18533))
230238
* Retain None (unreachable) when typemap is None with `type(x) is Foo` check (Stanislav Terliakov, PR [18486](https://github.com/python/mypy/pull/18486))
231-
* Replace deprecated `_PyLong_new` with `PyLongWriter` API (Marc Mueller, PR [18532](https://github.com/python/mypy/pull/18532))
232-
* Suggest typing.Literal for exit-return error messages (Marc Mueller, PR [18541](https://github.com/python/mypy/pull/18541))
239+
* Suggest `typing.Literal` for exit-return error messages (Marc Mueller, PR [18541](https://github.com/python/mypy/pull/18541))
233240
* Allow redefinitions in except/else/finally (Stanislav Terliakov, PR [18515](https://github.com/python/mypy/pull/18515))
234-
* Support properties with setter type different from getter type (Ivan Levkivskyi, PR [18510](https://github.com/python/mypy/pull/18510))
235241
* Disallow inline config of Python version (Shantanu, PR [18497](https://github.com/python/mypy/pull/18497))
236-
* Update TypedDict imports in tests (Marc Mueller, PR [18528](https://github.com/python/mypy/pull/18528))
237-
* Update NoReturn imports in tests (Marc Mueller, PR [18529](https://github.com/python/mypy/pull/18529))
238242
* Improve inference in tuple multiplication plugin (Shantanu, PR [18521](https://github.com/python/mypy/pull/18521))
239-
* Add missing lineno to `yield from` with wrong type (Stanislav Terliakov, PR [18518](https://github.com/python/mypy/pull/18518))
243+
* Add missing linen numberto `yield from` with wrong type (Stanislav Terliakov, PR [18518](https://github.com/python/mypy/pull/18518))
240244
* Hint at argument names when formatting callables with compatible return types in error messages (Stanislav Terliakov, PR [18495](https://github.com/python/mypy/pull/18495))
241245
* Better names of and more compatibility between ad hoc intersections of instances (Christoph Tyralla, PR [18506](https://github.com/python/mypy/pull/18506))
242246
* Infer correct types with overloads of `Type[Guard | Is]` (sobolevn, PR [17678](https://github.com/python/mypy/pull/17678))

0 commit comments

Comments
 (0)