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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+221-2Lines changed: 221 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,99 @@
2
2
3
3
## Next Release
4
4
5
-
### Enabling `--local-partial-types` by Default
5
+
## Mypy 2.1
6
+
7
+
We’ve just uploaded mypy 2.1.0 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)).
8
+
Mypy is a static type checker for Python. This release includes new features, performance
9
+
improvements and bug fixes. You can install it as follows:
10
+
11
+
python3 -m pip install -U mypy
12
+
13
+
You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
14
+
15
+
### librt.vecs: Fast Growable Array Type for Mypyc
16
+
17
+
The new `librt.vecs` module provides an efficient growable array type `vec` that is
18
+
optimized for mypyc use. It provides fast, packed arrays with integer and floating point
19
+
value types, which can be **several times faster** than `list`, and tens of times faster
20
+
than `array.array` in code compiled using mypyc. It also supports nested `vec` objects and
21
+
non-value-type items, such as ``vec[vec[str]]``.
22
+
23
+
Refer to the [documentation](https://mypyc.readthedocs.io/en/latest/librt_vecs.html) for
24
+
the details.
25
+
26
+
Contributed by Jukka Lehtosalo.
27
+
28
+
### librt.random: Fast Pseudo-Random Number Generation
29
+
30
+
The new `librt.random` module provides fast pseudo-random number generation that is
31
+
optimized for code compiled using mypyc. It can be 3x to 10x faster than the stdlib
32
+
`random` module in compiled code.
33
+
34
+
Refer to the [documentation](https://mypyc.readthedocs.io/en/latest/librt_random.html) for
35
+
the details.
36
+
37
+
Contributed by Jukka Lehtosalo (PR [21433](https://github.com/python/mypy/pull/21433)).
38
+
39
+
### Mypyc Improvements
40
+
41
+
- Make compilation order with multiple files consistent (Piotr Sawicki, PR [21419](https://github.com/python/mypy/pull/21419))
42
+
- Fix crash on accessing `StopAsyncIteration` (Piotr Sawicki, PR [21406](https://github.com/python/mypy/pull/21406))
43
+
- Fix incremental compilation with `separate` flag (Vaggelis Danias, PR [21299](https://github.com/python/mypy/pull/21299))
44
+
45
+
### Fixes to Crashes
46
+
47
+
- Fix crash on partial type with `--allow-redefinition` and `global` declaration (Jukka Lehtosalo, PR [21428](https://github.com/python/mypy/pull/21428))
Please see [git log](https://github.com/python/typeshed/commits/main?after=e4d32e01bee44241a5e7c33298c261175b9f1bdb+0&branch=main&path=stdlib) for full list of standard library typeshed stub changes.
70
+
71
+
### Acknowledgements
72
+
73
+
Thanks to all mypy contributors who contributed to this release:
74
+
75
+
- Adam Turner
76
+
- Ivan Levkivskyi
77
+
- Jukka Lehtosalo
78
+
- Kevin Kannammalil
79
+
- Piotr Sawicki
80
+
- Shantanu
81
+
- sobolevn
82
+
- Vaggelis Danias
83
+
84
+
I’d also like to thank my employer, Dropbox, for supporting mypy development.
85
+
86
+
## Mypy 2.0
87
+
88
+
We’ve just uploaded mypy 2.0.0 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)).
89
+
Mypy is a static type checker for Python. This release includes new features, performance
90
+
improvements and bug fixes. There are also changes to options and defaults.
91
+
You can install it as follows:
92
+
93
+
python3 -m pip install -U mypy
94
+
95
+
You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
96
+
97
+
### Enable `--local-partial-types` by Default
6
98
7
99
This flag affects the inference of types based on assignments in other scopes.
8
100
For now, explicitly disabling this continues to be supported, but this support will be removed
@@ -11,7 +103,7 @@ in mypy, like the daemon or the new implementation of flexible redefinitions.
11
103
12
104
Contributed by Ivan Levkivskyi, Jukka Lehtosalo, Shantanu in [PR 21163](https://github.com/python/mypy/pull/21163).
13
105
14
-
### Enabling`--strict-bytes` by Default
106
+
### Enable`--strict-bytes` by Default
15
107
16
108
Per [PEP 688](https://peps.python.org/pep-0688), mypy no longer treats `bytearray` and `memoryview`
17
109
values as assignable to the `bytes` type.
@@ -72,6 +164,25 @@ in future mypy releases.
72
164
Contributed by Ivan Levkivskyi, with additional contributions from Emma Smith and Jukka
73
165
Lehtosalo.
74
166
167
+
Recent related changes since the last release:
168
+
169
+
- Freeze garbage collection in parallel workers for 4-5% speedup (Ivan Levkivskyi, PR [21302](https://github.com/python/mypy/pull/21302))
170
+
- Expose `--num-workers` and `--native-parser` (Ivan Levkivskyi, PR [21387](https://github.com/python/mypy/pull/21387))
171
+
- Split type checking into interface and implementation in parallel workers (Ivan Levkivskyi, PR [21119](https://github.com/python/mypy/pull/21119))
172
+
- Batch module groups for parallel processing (Ivan Levkivskyi, PR [21287](https://github.com/python/mypy/pull/21287))
- Improve error messages for unexpected keyword arguments in overloaded functions (Kevin Kannammalil, PR [20592](https://github.com/python/mypy/pull/20592))
252
+
- Don't suggest `Foo[...]` when `Foo(arg=...)` is used in annotation (Yosof Badr, PR [21238](https://github.com/python/mypy/pull/21238))
253
+
- Mention what codes are actually ignored in "not covered by type: ignore comment" note (wyattscarpenter, PR [19904](https://github.com/python/mypy/pull/19904))
254
+
- Improve error messages when positional argument is missing (Kevin Kannammalil, PR [20591](https://github.com/python/mypy/pull/20591))
255
+
- Improve "name is not defined" errors with fuzzy matching (Kevin Kannammalil, PR [20693](https://github.com/python/mypy/pull/20693))
- Use sharding for the SQLite cache (Jukka Lehtosalo, PR [21292](https://github.com/python/mypy/pull/21292))
294
+
- Limit type inference context fallback to the walrus operator only (Ivan Levkivskyi, PR [21294](https://github.com/python/mypy/pull/21294))
295
+
- Support `.git/info/exclude` for `--exclude-gitignore` (RogerJinIS, PR [21286](https://github.com/python/mypy/pull/21286))
296
+
- Let `--allow-redefinition` widen a global in a function with `None` initialization (Jukka Lehtosalo, PR [21285](https://github.com/python/mypy/pull/21285))
297
+
- Delete Python 2 extra (Shantanu, PR [18374](https://github.com/python/mypy/pull/18374))
298
+
- No longer narrow final globals in functions (Ivan Levkivskyi, PR [21241](https://github.com/python/mypy/pull/21241))
- Include two more files in the sdist: `CREDITS` and the typeshed `README` (Michael R. Crusoe, PR [21131](https://github.com/python/mypy/pull/21131))
307
+
308
+
### Typeshed Updates
309
+
310
+
Please see [git log](https://github.com/python/typeshed/commits/main?after=c5e47faeda2cf9d233f91bc1dc95814b0cc7ccba+0&branch=main&path=stdlib) for full list of standard library typeshed stub changes.
311
+
312
+
### Acknowledgements
313
+
314
+
Thanks to all mypy contributors who contributed to this release:
315
+
- Brian Schubert
316
+
- Ethan Sarp
317
+
- Ivan Levkivskyi
318
+
- Jukka Lehtosalo
319
+
- Kevin Kannammalil
320
+
- Leo Ji
321
+
- Marc Mueller
322
+
- Michael R. Crusoe
323
+
- Piotr Sawicki
324
+
- Pranav Manglik
325
+
- RogerJinIS
326
+
- Shantanu
327
+
- Vaggelis Danias
328
+
- wyattscarpenter
329
+
- Yosof Badr
330
+
331
+
I’d also like to thank my employer, Dropbox, for supporting mypy development.
332
+
114
333
## Mypy 1.20
115
334
116
335
We’ve just uploaded mypy 1.20.0 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)).
0 commit comments