Various mypy 2.4 changelog updates - #22077
Conversation
ilevkivskyi
left a comment
There was a problem hiding this comment.
LG, thanks, just few optional suggestions.
| - Stub files can use syntax that is newer than the target Python | ||
| version. For example, stubs can use the PEP 695 generic class syntax | ||
| (`class Box[T]: ...`) when running on or targeting Python 3.10. | ||
| - Parallel type checking requires the native parser. |
There was a problem hiding this comment.
Maybe also mention error recovery? I think we already made some errors that were previously blocking non-blockers. We may make more syntax errors non-blockers in future.
There was a problem hiding this comment.
I didn't mention this since it's currently only marginally better at most. We can implement proper error recovery later and then announce it as a new feature.
| details). Closed TypedDicts (PEP 728) have been supported since mypy | ||
| 2.2, but the `extra_items` TypedDict argument, also introduced in PEP | ||
| 728, is still unsupported. Support for `extra_items` will be added in | ||
| a future mypy release. |
There was a problem hiding this comment.
Maybe briefly mention other things like lazy imports and unpacking in comprehensions? Even though mypyc doesn't support these, we can still type-check them.
| variadic generic types. The unpacked portion can match any number of | ||
| items when checking compatibility, while explicitly specified items | ||
| still need to match. This also improves type inference and support for | ||
| indexing, slicing, and unpacking these tuples. |
There was a problem hiding this comment.
Maybe clarify this is specific to Any and variadic tuples with non-Any item type are still handled strictly?
Primarily add overviews to beginnings of various sections. (cherry picked from commit 5c45130)
Primarily add overviews to beginnings of various sections.