Skip to content

Commit 944e15b

Browse files
authored
Update changelog for some mypy 2 changes (python#21279)
These have been changes we've been deferring for mypy 2 that have recently gotten merged I decided to not document the Python 2 extra change up top, since it only causes a warning during installation, not an error
1 parent 10ea945 commit 944e15b

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,45 @@
22

33
## Next Release
44

5+
### Enabling `--local-partial-types` by default
6+
7+
This flag affects the inference of types based on assignments in other scopes.
8+
For now, explicitly disabling this continues to be supported, but this support will be removed
9+
in the future as the legacy behaviour is hard to support with other current and future features
10+
in mypy, like the daemon or the new implementation of flexible redefinitions.
11+
12+
Contributed by Ivan Levkivskyi, Jukka Lehtosalo, Shantanu in [PR 21163](https://github.com/python/mypy/pull/21163)
13+
14+
### Enabling `--strict-bytes` by default
15+
16+
Per [PEP 688](https://peps.python.org/pep-0688), mypy no longer treats `bytearray` and `memoryview`
17+
values as assignable to the `bytes` type.
18+
19+
Contributed by Shantanu in [PR 18371](https://github.com/python/mypy/pull/18371)
20+
521
### Drop Support for Targeting Python 3.9
622

723
Mypy no longer supports type checking code with `--python-version 3.9`.
824
Use `--python-version 3.10` or newer.
925

26+
Contributed by Shantanu, Marc Mueller in [PR 21243](https://github.com/python/mypy/pull/21243)
27+
28+
### Remove special casing of legacy bundled stubs
29+
30+
Mypy used to bundle stubs for a few packages in versions 0.812 and earlier. To navigate the
31+
transition, mypy used to report missing types for these packages even if `--ignore-missing-imports`
32+
was set. Mypy now consistently respects `--ignore-missing-imports` for all packages.
33+
34+
Contributed by Shantanu in [PR 18372](https://github.com/python/mypy/pull/18372)
35+
36+
### Prevent assignment to None for non-Optional class variables with type comments
37+
38+
Mypy used to allow assignment to None for class variables when using type comments. This was a
39+
common idiom in Python 3.5 and earlier, prior to the introduction of variable annotations.
40+
However, this was a soundness hole and has now been removed.
41+
42+
Contributed by Shantanu in [PR 20054](https://github.com/python/mypy/pull/20054)
43+
1044
## Mypy 1.20
1145

1246
We’ve just uploaded mypy 1.20.0 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)).

0 commit comments

Comments
 (0)