1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
|
.. bpo: 44600
.. date: 2021-07-25-20-04-54
.. nonce: 0WMldg
.. release date: 2021-08-02
.. section: Security
Fix incorrect line numbers while tracing some failed patterns in :ref:`match
<match>` statements. Patch by Charles Burkland.
..
.. bpo: 44792
.. date: 2021-07-31-12-12-57
.. nonce: mOReTW
.. section: Core and Builtins
Improve syntax errors for if expressions. Patch by Miguel Brito
..
.. bpo: 34013
.. date: 2021-07-27-11-14-22
.. nonce: SjLFe-
.. section: Core and Builtins
Generalize the invalid legacy statement custom error message (like the one
generated when "print" is called without parentheses) to include more
generic expressions. Patch by Pablo Galindo
..
.. bpo: 44732
.. date: 2021-07-26-15-27-03
.. nonce: IxObt3
.. section: Core and Builtins
Rename ``types.Union`` to ``types.UnionType``.
..
.. bpo: 44698
.. date: 2021-07-21-15-26-56
.. nonce: DA4_0o
.. section: Core and Builtins
Fix undefined behaviour in complex object exponentiation.
..
.. bpo: 44653
.. date: 2021-07-19-20-49-06
.. nonce: WcqGyI
.. section: Core and Builtins
Support :mod:`typing` types in parameter substitution in the union type.
..
.. bpo: 44676
.. date: 2021-07-19-19-53-46
.. nonce: WgIMvh
.. section: Core and Builtins
Add ability to serialise ``types.Union`` objects. Patch provided by Yurii
Karabas.
..
.. bpo: 44633
.. date: 2021-07-17-21-04-04
.. nonce: 5-zKeI
.. section: Core and Builtins
Parameter substitution of the union type with wrong types now raises
``TypeError`` instead of returning ``NotImplemented``.
..
.. bpo: 44662
.. date: 2021-07-17-13-41-58
.. nonce: q22kWR
.. section: Core and Builtins
Add ``__module__`` to ``types.Union``. This also fixes ``types.Union``
issues with ``typing.Annotated``. Patch provided by Yurii Karabas.
..
.. bpo: 44655
.. date: 2021-07-16-21-35-14
.. nonce: 95I7M6
.. section: Core and Builtins
Include the name of the type in unset __slots__ attribute errors. Patch by
Pablo Galindo
..
.. bpo: 44655
.. date: 2021-07-16-20-25-37
.. nonce: I3wRjL
.. section: Core and Builtins
Don't include a missing attribute with the same name as the failing one when
offering suggestions for missing attributes. Patch by Pablo Galindo
..
.. bpo: 44646
.. date: 2021-07-16-09-59-13
.. nonce: Yb6s05
.. section: Core and Builtins
Fix the hash of the union type: it no longer depends on the order of
arguments.
..
.. bpo: 44636
.. date: 2021-07-16-09-36-12
.. nonce: ZWebi8
.. section: Core and Builtins
Collapse union of equal types. E.g. the result of ``int | int`` is now
``int``. Fix comparison of the union type with non-hashable objects. E.g.
``int | str == {}`` no longer raises a TypeError.
..
.. bpo: 44635
.. date: 2021-07-14-13-54-07
.. nonce: 7ZMAdB
.. section: Core and Builtins
Convert ``None`` to ``type(None)`` in the union type constructor.
..
.. bpo: 44589
.. date: 2021-07-13-23-19-41
.. nonce: 59OH8T
.. section: Core and Builtins
Mapping patterns in ``match`` statements with two or more equal literal keys
will now raise a :exc:`SyntaxError` at compile-time.
..
.. bpo: 44606
.. date: 2021-07-13-20-22-12
.. nonce: S3Bv2w
.. section: Core and Builtins
Fix ``__instancecheck__`` and ``__subclasscheck__`` for the union type.
..
.. bpo: 42073
.. date: 2021-07-13-17-47-32
.. nonce: 9wopiC
.. section: Core and Builtins
The ``@classmethod`` decorator can now wrap other classmethod-like
descriptors.
..
.. bpo: 44490
.. date: 2021-07-06-22-22-15
.. nonce: BJxPbZ
.. section: Core and Builtins
:mod:`typing` now searches for type parameters in ``types.Union`` objects.
``get_type_hints`` will also properly resolve annotations with nested
``types.Union`` objects. Patch provided by Yurii Karabas.
..
.. bpo: 44490
.. date: 2021-07-01-11-59-34
.. nonce: xY80VR
.. section: Core and Builtins
Add ``__parameters__`` attribute and ``__getitem__`` operator to
``types.Union``. Patch provided by Yurii Karabas.
..
.. bpo: 44472
.. date: 2021-06-21-11-19-54
.. nonce: Vvm1yn
.. section: Core and Builtins
Fix ltrace functionality when exceptions are raised. Patch by Pablo Galindo
..
.. bpo: 44806
.. date: 2021-08-02-14-37-32
.. nonce: wOW_Qn
.. section: Library
Non-protocol subclasses of :class:`typing.Protocol` ignore now the
``__init__`` method inherited from protocol base classes.
..
.. bpo: 44793
.. date: 2021-07-31-20-28-20
.. nonce: woaQSg
.. section: Library
Fix checking the number of arguments when subscribe a generic type with
``ParamSpec`` parameter.
..
.. bpo: 44784
.. date: 2021-07-31-08-45-31
.. nonce: fIMIDS
.. section: Library
In importlib.metadata tests, override warnings behavior under expected
DeprecationWarnings (importlib_metadata 4.6.3).
..
.. bpo: 44667
.. date: 2021-07-30-23-27-30
.. nonce: tu0Xrv
.. section: Library
The :func:`tokenize.tokenize` doesn't incorrectly generate a ``NEWLINE``
token if the source doesn't end with a new line character but the last line
is a comment, as the function is already generating a ``NL`` token. Patch by
Pablo Galindo
..
.. bpo: 44752
.. date: 2021-07-27-22-11-29
.. nonce: _bvbrZ
.. section: Library
:mod:`rcompleter` does not call :func:`getattr` on :class:`property` objects
to avoid the side-effect of evaluating the corresponding method.
..
.. bpo: 44720
.. date: 2021-07-24-02-17-59
.. nonce: shU5Qm
.. section: Library
``weakref.proxy`` objects referencing non-iterators now raise ``TypeError``
rather than dereferencing the null ``tp_iternext`` slot and crashing.
..
.. bpo: 44704
.. date: 2021-07-21-23-16-30
.. nonce: iqHLxQ
.. section: Library
The implementation of ``collections.abc.Set._hash()`` now matches that of
``frozenset.__hash__()``.
..
.. bpo: 44666
.. date: 2021-07-21-10-43-22
.. nonce: CEThkv
.. section: Library
Fixed issue in :func:`compileall.compile_file` when ``sys.stdout`` is
redirected. Patch by Stefan Hölzl.
..
.. bpo: 42854
.. date: 2021-07-20-21-51-35
.. nonce: ThuDMI
.. section: Library
Fixed a bug in the :mod:`_ssl` module that was throwing :exc:`OverflowError`
when using :meth:`_ssl._SSLSocket.write` and :meth:`_ssl._SSLSocket.read`
for a big value of the ``len`` parameter. Patch by Pablo Galindo
..
.. bpo: 44353
.. date: 2021-07-19-22-43-15
.. nonce: HF81_Q
.. section: Library
Refactor ``typing.NewType`` from function into callable class. Patch
provided by Yurii Karabas.
..
.. bpo: 44524
.. date: 2021-07-19-14-04-42
.. nonce: Nbf2JC
.. section: Library
Add missing ``__name__`` and ``__qualname__`` attributes to ``typing``
module classes. Patch provided by Yurii Karabas.
..
.. bpo: 40897
.. date: 2021-07-16-13-40-31
.. nonce: aveAre
.. section: Library
Give priority to using the current class constructor in
:func:`inspect.signature`. Patch by Weipeng Hong.
..
.. bpo: 44648
.. date: 2021-07-15-16-51-32
.. nonce: 2o49TB
.. section: Library
Fixed wrong error being thrown by :func:`inspect.getsource` when examining a
class in the interactive session. Instead of :exc:`TypeError`, it should be
:exc:`OSError` with appropriate error message.
..
.. bpo: 44608
.. date: 2021-07-13-09-01-33
.. nonce: R3IcM1
.. section: Library
Fix memory leak in :func:`_tkinter._flatten` if it is called with a sequence
or set, but not list or tuple.
..
.. bpo: 44559
.. date: 2021-07-12-10-43-31
.. nonce: YunVKY
.. section: Library
[Enum] module reverted to 3.9; 3.10 changes pushed until 3.11
..
.. bpo: 41928
.. date: 2021-07-09-07-14-37
.. nonce: Q1jMrr
.. section: Library
Update :func:`shutil.copyfile` to raise :exc:`FileNotFoundError` instead of
confusing :exc:`IsADirectoryError` when a path ending with a
:const:`os.path.sep` does not exist; :func:`shutil.copy` and
:func:`shutil.copy2` are also affected.
..
.. bpo: 44566
.. date: 2021-07-05-18-13-25
.. nonce: o51Bd1
.. section: Library
handle StopIteration subclass raised from @contextlib.contextmanager
generator
..
.. bpo: 41249
.. date: 2021-07-04-11-33-34
.. nonce: sHdwBE
.. section: Library
Fixes ``TypedDict`` to work with ``typing.get_type_hints()`` and postponed
evaluation of annotations across modules.
..
.. bpo: 44461
.. date: 2021-06-29-21-17-17
.. nonce: acqRnV
.. section: Library
Fix bug with :mod:`pdb`'s handling of import error due to a package which
does not have a ``__main__`` module
..
.. bpo: 43625
.. date: 2021-06-29-07-27-08
.. nonce: ZlAxhp
.. section: Library
Fix a bug in the detection of CSV file headers by
:meth:`csv.Sniffer.has_header` and improve documentation of same.
..
.. bpo: 42892
.. date: 2021-06-24-19-16-20
.. nonce: qvRNhI
.. section: Library
Fixed an exception thrown while parsing a malformed multipart email by
:class:`email.message.EmailMessage`.
..
.. bpo: 27827
.. date: 2021-06-12-21-25-35
.. nonce: TMWh1i
.. section: Library
:meth:`pathlib.PureWindowsPath.is_reserved` now identifies a greater range
of reserved filenames, including those with trailing spaces or colons.
..
.. bpo: 38741
.. date: 2019-11-12-18-59-33
.. nonce: W7IYkq
.. section: Library
:mod:`configparser`: using ']' inside a section header will no longer cut
the section name short at the ']'
..
.. bpo: 27513
.. date: 2019-06-03-23-53-25
.. nonce: qITN7d
.. section: Library
:func:`email.utils.getaddresses` now accepts :class:`email.header.Header`
objects along with string values. Patch by Zackery Spytz.
..
.. bpo: 29298
.. date: 2017-09-20-14-43-03
.. nonce: _78CSN
.. section: Library
Fix ``TypeError`` when required subparsers without ``dest`` do not receive
arguments. Patch by Anthony Sottile.
..
.. bpo: 44740
.. date: 2021-07-26-23-48-31
.. nonce: zMFGMV
.. section: Documentation
Replaced occurences of uppercase "Web" and "Internet" with lowercase
versions per the 2016 revised Associated Press Style Book.
..
.. bpo: 44693
.. date: 2021-07-25-23-04-15
.. nonce: JuCbNq
.. section: Documentation
Update the definition of __future__ in the glossary by replacing the
confusing word "pseudo-module" with a more accurate description.
..
.. bpo: 35183
.. date: 2021-07-22-08-28-03
.. nonce: p9BWTB
.. section: Documentation
Add typical examples to os.path.splitext docs
..
.. bpo: 30511
.. date: 2021-07-20-21-03-18
.. nonce: eMFkRi
.. section: Documentation
Clarify that :func:`shutil.make_archive` is not thread-safe due to reliance
on changing the current working directory.
..
.. bpo: 44561
.. date: 2021-07-18-22-43-14
.. nonce: T7HpWm
.. section: Documentation
Update of three expired hyperlinks in Doc/distributing/index.rst: "Project
structure", "Building and packaging the project", and "Uploading the project
to the Python Packaging Index".
..
.. bpo: 44613
.. date: 2021-07-12-11-39-20
.. nonce: DIXNzc
.. section: Documentation
importlib.metadata is no longer provisional.
..
.. bpo: 44544
.. date: 2021-07-02-14-02-29
.. nonce: _5_aCz
.. section: Documentation
List all kwargs for :func:`textwrap.wrap`, :func:`textwrap.fill`, and
:func:`textwrap.shorten`. Now, there are nav links to attributes of
:class:`TextWrap`, which makes navigation much easier while minimizing
duplication in the documentation.
..
.. bpo: 44453
.. date: 2021-06-18-06-44-45
.. nonce: 3PIkj2
.. section: Documentation
Fix documentation for the return type of :func:`sysconfig.get_path`.
..
.. bpo: 44734
.. date: 2021-07-24-20-09-15
.. nonce: KKsNOV
.. section: Tests
Fixed floating point precision issue in turtle tests.
..
.. bpo: 44708
.. date: 2021-07-22-16-38-39
.. nonce: SYNaac
.. section: Tests
Regression tests, when run with -w, are now re-running only the affected
test methods instead of re-running the entire test file.
..
.. bpo: 44647
.. date: 2021-07-16-14-02-33
.. nonce: 5LzqIy
.. section: Tests
Added a permanent Unicode-valued environment variable to regression tests to
ensure they handle this use case in the future. If your test environment
breaks because of that, report a bug to us, and temporarily set
PYTHONREGRTEST_UNICODE_GUARD=0 in your test environment.
..
.. bpo: 44515
.. date: 2021-06-26-18-37-36
.. nonce: e9fO6f
.. section: Tests
Adjust recently added contextlib tests to avoid assuming the use of a
refcounted GC
..
.. bpo: 44572
.. date: 2021-07-13-15-32-49
.. nonce: gXvhDc
.. section: Windows
Avoid consuming standard input in the :mod:`platform` module
..
.. bpo: 40263
.. date: 2020-04-13-15-20-28
.. nonce: 1KKEbu
.. section: Windows
This is a follow-on bug from https://bugs.python.org/issue26903. Once that
is applied we run into an off-by-one assertion problem. The assert was not
correct.
..
.. bpo: 41972
.. date: 2021-07-12-15-42-02
.. nonce: yUjE8j
.. section: macOS
The framework build's user header path in sysconfig is changed to add a
'pythonX.Y' component to match distutils's behavior.
..
.. bpo: 34932
.. date: 2021-03-29-21-11-23
.. nonce: f3Hdyd
.. section: macOS
Add socket.TCP_KEEPALIVE support for macOS. Patch by Shane Harvey.
..
.. bpo: 44756
.. date: 2021-07-28-00-51-55
.. nonce: pvAajB
.. section: Tools/Demos
In the Makefile for documentation (:file:`Doc/Makefile`), the ``build`` rule
is dependent on the ``venv`` rule. Therefore, ``html``, ``latex``, and other
build-dependent rules are also now dependent on ``venv``. The ``venv`` rule
only performs an action if ``$(VENVDIR)`` does not exist.
:file:`Doc/README.rst` was updated; most users now only need to type ``make
html``.
..
.. bpo: 41103
.. date: 2021-07-29-16-04-28
.. nonce: hiKKcF
.. section: C API
Reverts removal of the old buffer protocol because they are part of stable
ABI.
..
.. bpo: 42747
.. date: 2021-07-20-16-21-06
.. nonce: rRxjUY
.. section: C API
The ``Py_TPFLAGS_HAVE_VERSION_TAG`` type flag now does nothing. The
``Py_TPFLAGS_HAVE_AM_SEND`` flag (which was added in 3.10) is removed. Both
were unnecessary because it is not possible to have type objects with the
relevant fields missing.
|