1.. bpo: 42278
2.. date: 2021-08-29-12-39-44
3.. nonce: jvmQz_
4.. release date: 2021-10-05
5.. section: Security
6
7Replaced usage of :func:`tempfile.mktemp` with
8:class:`~tempfile.TemporaryDirectory` to avoid a potential race condition.
9
10..
11
12.. bpo: 44600
13.. date: 2021-07-25-20-04-54
14.. nonce: 0WMldg
15.. section: Security
16
17Fix incorrect line numbers while tracing some failed patterns in :ref:`match
18<match>` statements. Patch by Charles Burkland.
19
20..
21
22.. bpo: 41180
23.. date: 2021-06-29-23-40-22
24.. nonce: uTWHv_
25.. section: Security
26
27Add auditing events to the :mod:`marshal` module, and stop raising
28``code.__init__`` events for every unmarshalled code object. Directly
29instantiated code objects will continue to raise an event, and audit event
30handlers should inspect or collect the raw marshal data. This reduces a
31significant performance overhead when loading from ``.pyc`` files.
32
33..
34
35.. bpo: 44394
36.. date: 2021-06-29-02-45-53
37.. nonce: A220N1
38.. section: Security
39
40Update the vendored copy of libexpat to 2.4.1 (from 2.2.8) to get the fix
41for the CVE-2013-0340 "Billion Laughs" vulnerability. This copy is most used
42on Windows and macOS.
43
44..
45
46.. bpo: 43124
47.. date: 2021-05-08-11-50-46
48.. nonce: 2CTM6M
49.. section: Security
50
51Made the internal ``putcmd`` function in :mod:`smtplib` sanitize input for
52presence of ``\r`` and ``\n`` characters to avoid (unlikely) command
53injection.
54
55..
56
57.. bpo: 44022
58.. date: 2021-05-05-17-37-04
59.. nonce: bS3XJ9
60.. section: Security
61
62:mod:`http.client` now avoids infinitely reading potential HTTP headers
63after a ``100 Continue`` status response from the server.
64
65..
66
67.. bpo: 43760
68.. date: 2021-10-04-16-11-50
69.. nonce: R9QoUv
70.. section: Core and Builtins
71
72The number of hardware branches per instruction dispatch is reduced from two
73to one by adding a special instruction for tracing. Patch by Mark Shannon.
74
75..
76
77.. bpo: 45061
78.. date: 2021-09-21-22-27-25
79.. nonce: 5IOUf0
80.. section: Core and Builtins
81
82Add a deallocator to the bool type to detect refcount bugs in C extensions
83which call Py_DECREF(Py_True) or Py_DECREF(Py_False) by mistake. Detect also
84refcount bugs when the empty tuple singleton or the Unicode empty string
85singleton is destroyed by mistake. Patch by Victor Stinner.
86
87..
88
89.. bpo: 24076
90.. date: 2021-09-20-10-02-12
91.. nonce: ZFgFSj
92.. section: Core and Builtins
93
94sum() was further optimised for summing up single digit integers.
95
96..
97
98.. bpo: 45190
99.. date: 2021-09-14-10-02-12
100.. nonce: ZFRgSj
101.. section: Core and Builtins
102
103Update Unicode databases to Unicode 14.0.0.
104
105..
106
107.. bpo: 45167
108.. date: 2021-09-14-09-23-59
109.. nonce: CPSSoV
110.. section: Core and Builtins
111
112Fix deepcopying of :class:`types.GenericAlias` objects.
113
114..
115
116.. bpo: 45155
117.. date: 2021-09-09-15-05-17
118.. nonce: JRw9TG
119.. section: Core and Builtins
120
121:meth:`int.to_bytes` and :meth:`int.from_bytes` now take a default value of
122``"big"`` for the ``byteorder`` argument.  :meth:`int.to_bytes` also takes a
123default value of ``1`` for the ``length`` argument.
124
125..
126
127.. bpo: 44219
128.. date: 2021-09-09-10-32-33
129.. nonce: WiYyjz
130.. section: Core and Builtins
131
132Release the GIL while performing ``isatty`` system calls on arbitrary file
133descriptors. In particular, this affects :func:`os.isatty`,
134:func:`os.device_encoding` and :class:`io.TextIOWrapper`. By extension,
135:func:`io.open` in text mode is also affected. This change solves a deadlock
136in :func:`os.isatty`. Patch by Vincent Michel in :issue:`44219`.
137
138..
139
140.. bpo: 44959
141.. date: 2021-09-08-08-29-41
142.. nonce: OSwwPf
143.. section: Core and Builtins
144
145Added fallback to extension modules with '.sl' suffix on HP-UX
146
147..
148
149.. bpo: 45121
150.. date: 2021-09-07-17-10-16
151.. nonce: iG-Hsf
152.. section: Core and Builtins
153
154Fix issue where ``Protocol.__init__`` raises ``RecursionError`` when it's
155called directly or via ``super()``. Patch provided by Yurii Karabas.
156
157..
158
159.. bpo: 44348
160.. date: 2021-09-07-00-21-04
161.. nonce: f8w_Td
162.. section: Core and Builtins
163
164The deallocator function of the :exc:`BaseException` type now uses the
165trashcan mechanism to prevent stack overflow. For example, when a
166:exc:`RecursionError` instance is raised, it can be linked to another
167RecursionError through the ``__context__`` attribute or the
168``__traceback__`` attribute, and then a chain of exceptions is created. When
169the chain is destroyed, nested deallocator function calls can crash with a
170stack overflow if the chain is too long compared to the available stack
171memory. Patch by Victor Stinner.
172
173..
174
175.. bpo: 45123
176.. date: 2021-09-06-21-52-45
177.. nonce: 8Eh9iI
178.. section: Core and Builtins
179
180Fix PyAiter_Check to only check for the __anext__ presence (not for
181__aiter__). Rename PyAiter_Check to PyAIter_Check, PyObject_GetAiter ->
182PyObject_GetAIter.
183
184..
185
186.. bpo: 1514420
187.. date: 2021-09-03-16-18-10
188.. nonce: 2Lumpj
189.. section: Core and Builtins
190
191Interpreter no longer attempts to open files with names in angle brackets
192(like "<string>" or "<stdin>") when formatting an exception.
193
194..
195
196.. bpo: 41031
197.. date: 2021-09-03-12-35-17
198.. nonce: yPSJEs
199.. section: Core and Builtins
200
201Match C and Python code formatting of unprintable exceptions and exceptions
202in the :mod:`__main__` module.
203
204..
205
206.. bpo: 37330
207.. date: 2021-09-02-01-28-01
208.. nonce: QDjM_l
209.. section: Core and Builtins
210
211:func:`open`, :func:`io.open`, :func:`codecs.open` and
212:class:`fileinput.FileInput` no longer accept ``'U'`` ("universal newline")
213in the file mode. This flag was deprecated since Python 3.3. Patch by Victor
214Stinner.
215
216..
217
218.. bpo: 45083
219.. date: 2021-09-01-23-55-49
220.. nonce: cLi9G3
221.. section: Core and Builtins
222
223When the interpreter renders an exception, its name now has a complete
224qualname. Previously only the class name was concatenated to the module
225name, which sometimes resulted in an incorrect full name being displayed.
226
227(This issue impacted only the C code exception rendering, the
228:mod:`traceback` module was using qualname already).
229
230..
231
232.. bpo: 34561
233.. date: 2021-09-01-19-21-48
234.. nonce: uMAVA-
235.. section: Core and Builtins
236
237List sorting now uses the merge-ordering strategy from Munro and Wild's
238``powersort()``. Unlike the former strategy, this is provably near-optimal
239in the entropy of the distribution of run lengths. Most uses of
240``list.sort()`` probably won't see a significant time difference, but may
241see significant improvements in cases where the former strategy was
242exceptionally poor. However, as these are all fast linear-time
243approximations to a problem that's inherently at best quadratic-time to
244solve truly optimally, it's also possible to contrive cases where the former
245strategy did better.
246
247..
248
249.. bpo: 45056
250.. date: 2021-09-01-16-55-43
251.. nonce: 7AK2d9
252.. section: Core and Builtins
253
254Compiler now removes trailing unused constants from co_consts.
255
256..
257
258.. bpo: 45020
259.. date: 2021-08-31-17-44-51
260.. nonce: ZPI_3L
261.. section: Core and Builtins
262
263Add a new command line option, "-X frozen_modules=[on|off]" to opt out of
264(or into) using optional frozen modules.  This defaults to "on" (or "off" if
265it's running out of the source tree).
266
267..
268
269.. bpo: 45012
270.. date: 2021-08-31-11-09-52
271.. nonce: ueeOcx
272.. section: Core and Builtins
273
274In :mod:`posix`, release GIL during ``stat()``, ``lstat()``, and
275``fstatat()`` syscalls made by :func:`os.DirEntry.stat`. Patch by Stanisław
276Skonieczny.
277
278..
279
280.. bpo: 45018
281.. date: 2021-08-26-18-44-03
282.. nonce: pu8H9L
283.. section: Core and Builtins
284
285Fixed pickling of range iterators that iterated for over ``2**32`` times.
286
287..
288
289.. bpo: 45000
290.. date: 2021-08-25-23-17-32
291.. nonce: XjmyLl
292.. section: Core and Builtins
293
294A :exc:`SyntaxError` is now raised when trying to delete :const:`__debug__`.
295Patch by Dong-hee Na.
296
297..
298
299.. bpo: 44963
300.. date: 2021-08-25-23-07-10
301.. nonce: 5EET8y
302.. section: Core and Builtins
303
304Implement ``send()`` and ``throw()`` methods for ``anext_awaitable``
305objects. Patch by Pablo Galindo.
306
307..
308
309.. bpo: 44962
310.. date: 2021-08-23-19-55-08
311.. nonce: J00ftt
312.. section: Core and Builtins
313
314Fix a race in WeakKeyDictionary, WeakValueDictionary and WeakSet when two
315threads attempt to commit the last pending removal. This fixes
316asyncio.create_task and fixes a data loss in asyncio.run where
317shutdown_asyncgens is not run
318
319..
320
321.. bpo: 24234
322.. date: 2021-08-23-10-36-55
323.. nonce: MGVUQi
324.. section: Core and Builtins
325
326Implement the :meth:`__bytes__` special method on the :class:`bytes` type,
327so a bytes object ``b``  passes an ``isinstance(b, typing.SupportsBytes)``
328check.
329
330..
331
332.. bpo: 24234
333.. date: 2021-08-22-12-28-50
334.. nonce: n3oTdx
335.. section: Core and Builtins
336
337Implement the :meth:`__complex__` special method on the :class:`complex`
338type, so a complex number ``z`` passes an ``isinstance(z,
339typing.SupportsComplex)`` check.
340
341..
342
343.. bpo: 44954
344.. date: 2021-08-19-14-43-24
345.. nonce: dLn3lg
346.. section: Core and Builtins
347
348Fixed a corner case bug where the result of ``float.fromhex('0x.8p-1074')``
349was rounded the wrong way.
350
351..
352
353.. bpo: 44947
354.. date: 2021-08-18-19-09-28
355.. nonce: mcvGdS
356.. section: Core and Builtins
357
358Refine the syntax error for trailing commas in import statements. Patch by
359Pablo Galindo.
360
361..
362
363.. bpo: 44945
364.. date: 2021-08-18-11-14-38
365.. nonce: CO3s77
366.. section: Core and Builtins
367
368Specialize the BINARY_ADD instruction using the PEP 659 machinery. Adds five
369new instructions:
370
371* BINARY_ADD_ADAPTIVE
372* BINARY_ADD_FLOAT
373* BINARY_ADD_INT
374* BINARY_ADD_UNICODE
375* BINARY_ADD_UNICODE_INPLACE_FAST
376
377..
378
379.. bpo: 44929
380.. date: 2021-08-16-23-16-17
381.. nonce: qpMEky
382.. section: Core and Builtins
383
384Fix some edge cases of ``enum.Flag`` string representation in the REPL.
385Patch by Pablo Galindo.
386
387..
388
389.. bpo: 44914
390.. date: 2021-08-16-11-36-02
391.. nonce: 6Lgrx3
392.. section: Core and Builtins
393
394Class version tags are no longer recycled.
395
396This means that a version tag serves as a unique identifier for the state of
397a class. We rely on this for effective specialization of the LOAD_ATTR and
398other instructions.
399
400..
401
402.. bpo: 44698
403.. date: 2021-08-15-10-39-06
404.. nonce: lITKNc
405.. section: Core and Builtins
406
407Restore behaviour of complex exponentiation with integer-valued exponent of
408type :class:`float` or :class:`complex`.
409
410..
411
412.. bpo: 44895
413.. date: 2021-08-14-20-13-21
414.. nonce: Ic9m90
415.. section: Core and Builtins
416
417A debug variable :envvar:`PYTHONDUMPREFSFILE` is added for creating a dump
418file which is generated by :option:`--with-trace-refs`. Patch by Dong-hee
419Na.
420
421..
422
423.. bpo: 44900
424.. date: 2021-08-12-14-00-57
425.. nonce: w2gpwy
426.. section: Core and Builtins
427
428Add five superinstructions for PEP 659 quickening:
429
430* LOAD_FAST LOAD_FAST
431* STORE_FAST LOAD_FAST
432* LOAD_FAST LOAD_CONST
433* LOAD_CONST LOAD_FAST
434* STORE_FAST STORE_FAST
435
436..
437
438.. bpo: 44889
439.. date: 2021-08-11-20-45-02
440.. nonce: 2T3nTn
441.. section: Core and Builtins
442
443Initial implementation of adaptive specialization of ``LOAD_METHOD``. The
444following specialized forms were added:
445
446* ``LOAD_METHOD_CACHED``
447
448* ``LOAD_METHOD_MODULE``
449
450* ``LOAD_METHOD_CLASS``
451
452..
453
454.. bpo: 44890
455.. date: 2021-08-11-16-46-27
456.. nonce: PwNg8N
457.. section: Core and Builtins
458
459Specialization stats are always collected in debug builds.
460
461..
462
463.. bpo: 44885
464.. date: 2021-08-11-15-39-57
465.. nonce: i4noUO
466.. section: Core and Builtins
467
468Correct the ast locations of f-strings with format specs and repeated
469expressions. Patch by Pablo Galindo
470
471..
472
473.. bpo: 44878
474.. date: 2021-08-11-14-12-41
475.. nonce: pAbBfc
476.. section: Core and Builtins
477
478Remove the loop from the bytecode interpreter. All instructions end with a
479DISPATCH macro, so the loop is now redundant.
480
481..
482
483.. bpo: 44878
484.. date: 2021-08-11-12-03-52
485.. nonce: nEhjLi
486.. section: Core and Builtins
487
488Remove switch statement for interpreter loop when using computed gotos. This
489makes sure that we only have one dispatch table in the interpreter.
490
491..
492
493.. bpo: 44874
494.. date: 2021-08-09-19-05-20
495.. nonce: oOcfU4
496.. section: Core and Builtins
497
498Deprecate the old trashcan macros
499(``Py_TRASHCAN_SAFE_BEGIN``/``Py_TRASHCAN_SAFE_END``). They should be
500replaced by the new macros ``Py_TRASHCAN_BEGIN`` and ``Py_TRASHCAN_END``.
501
502..
503
504.. bpo: 44872
505.. date: 2021-08-09-16-16-03
506.. nonce: OKRlhK
507.. section: Core and Builtins
508
509Use new trashcan macros (Py_TRASHCAN_BEGIN/END) in frameobject.c instead of
510the old ones (Py_TRASHCAN_SAFE_BEGIN/END).
511
512..
513
514.. bpo: 33930
515.. date: 2021-08-09-14-29-52
516.. nonce: --5LQ-
517.. section: Core and Builtins
518
519Fix segmentation fault with deep recursion when cleaning method objects.
520Patch by Augusto Goulart and Pablo Galindo.
521
522..
523
524.. bpo: 25782
525.. date: 2021-08-07-21-39-19
526.. nonce: B22lMx
527.. section: Core and Builtins
528
529Fix bug where ``PyErr_SetObject`` hangs when the current exception has a
530cycle in its context chain.
531
532..
533
534.. bpo: 44856
535.. date: 2021-08-07-01-26-12
536.. nonce: 9rk3li
537.. section: Core and Builtins
538
539Fix reference leaks in the error paths of ``update_bases()`` and
540``__build_class__``. Patch by Pablo Galindo.
541
542..
543
544.. bpo: 44826
545.. date: 2021-08-05-17-49-55
546.. nonce: zQsyK5
547.. section: Core and Builtins
548
549Initial implementation of adaptive specialization of STORE_ATTR
550
551Three specialized forms of STORE_ATTR are added:
552
553* STORE_ATTR_SLOT
554
555* STORE_ATTR_SPLIT_KEYS
556
557* STORE_ATTR_WITH_HINT
558
559..
560
561.. bpo: 44838
562.. date: 2021-08-05-17-42-03
563.. nonce: r_Lkj_
564.. section: Core and Builtins
565
566Fixed a bug that was causing the parser to raise an incorrect custom
567:exc:`SyntaxError` for invalid 'if' expressions. Patch by Pablo Galindo.
568
569..
570
571.. bpo: 44821
572.. date: 2021-08-04-11-37-38
573.. nonce: 67YHGI
574.. section: Core and Builtins
575
576Create instance dictionaries (__dict__) eagerly, to improve regularity of
577object layout and assist specialization.
578
579..
580
581.. bpo: 44792
582.. date: 2021-07-31-12-12-57
583.. nonce: mOReTW
584.. section: Core and Builtins
585
586Improve syntax errors for if expressions. Patch by Miguel Brito
587
588..
589
590.. bpo: 34013
591.. date: 2021-07-27-11-14-22
592.. nonce: SjLFe-
593.. section: Core and Builtins
594
595Generalize the invalid legacy statement custom error message (like the one
596generated when "print" is called without parentheses) to include more
597generic expressions. Patch by Pablo Galindo
598
599..
600
601.. bpo: 44732
602.. date: 2021-07-26-15-27-03
603.. nonce: IxObt3
604.. section: Core and Builtins
605
606Rename ``types.Union`` to ``types.UnionType``.
607
608..
609
610.. bpo: 44725
611.. date: 2021-07-23-15-17-01
612.. nonce: qcuKaa
613.. section: Core and Builtins
614
615Expose specialization stats in python via
616:func:`_opcode.get_specialization_stats`.
617
618..
619
620.. bpo: 44717
621.. date: 2021-07-23-01-52-13
622.. nonce: -vVmAh
623.. section: Core and Builtins
624
625Improve AttributeError on circular imports of submodules.
626
627..
628
629.. bpo: 44698
630.. date: 2021-07-21-15-26-56
631.. nonce: DA4_0o
632.. section: Core and Builtins
633
634Fix undefined behaviour in complex object exponentiation.
635
636..
637
638.. bpo: 44653
639.. date: 2021-07-19-20-49-06
640.. nonce: WcqGyI
641.. section: Core and Builtins
642
643Support :mod:`typing` types in parameter substitution in the union type.
644
645..
646
647.. bpo: 44676
648.. date: 2021-07-19-19-53-46
649.. nonce: WgIMvh
650.. section: Core and Builtins
651
652Add ability to serialise ``types.Union`` objects. Patch provided by Yurii
653Karabas.
654
655..
656
657.. bpo: 44633
658.. date: 2021-07-17-21-04-04
659.. nonce: 5-zKeI
660.. section: Core and Builtins
661
662Parameter substitution of the union type with wrong types now raises
663``TypeError`` instead of returning ``NotImplemented``.
664
665..
666
667.. bpo: 44661
668.. date: 2021-07-17-14-20-59
669.. nonce: BQbXiH
670.. section: Core and Builtins
671
672Update ``property_descr_set`` to use vectorcall if possible. Patch by
673Dong-hee Na.
674
675..
676
677.. bpo: 44662
678.. date: 2021-07-17-13-41-58
679.. nonce: q22kWR
680.. section: Core and Builtins
681
682Add ``__module__`` to ``types.Union``. This also fixes ``types.Union``
683issues with ``typing.Annotated``. Patch provided by Yurii Karabas.
684
685..
686
687.. bpo: 44655
688.. date: 2021-07-16-21-35-14
689.. nonce: 95I7M6
690.. section: Core and Builtins
691
692Include the name of the type in unset __slots__ attribute errors. Patch by
693Pablo Galindo
694
695..
696
697.. bpo: 44655
698.. date: 2021-07-16-20-25-37
699.. nonce: I3wRjL
700.. section: Core and Builtins
701
702Don't include a missing attribute with the same name as the failing one when
703offering suggestions for missing attributes. Patch by Pablo Galindo
704
705..
706
707.. bpo: 44646
708.. date: 2021-07-16-09-59-13
709.. nonce: Yb6s05
710.. section: Core and Builtins
711
712Fix the hash of the union type: it no longer depends on the order of
713arguments.
714
715..
716
717.. bpo: 44636
718.. date: 2021-07-16-09-36-12
719.. nonce: ZWebi8
720.. section: Core and Builtins
721
722Collapse union of equal types. E.g. the result of ``int | int`` is now
723``int``. Fix comparison of the union type with non-hashable objects. E.g.
724``int | str == {}`` no longer raises a TypeError.
725
726..
727
728.. bpo: 44611
729.. date: 2021-07-16-01-01-11
730.. nonce: LcfHN-
731.. section: Core and Builtins
732
733On Windows, :func:`os.urandom`: uses BCryptGenRandom API instead of
734CryptGenRandom API which is deprecated from Microsoft Windows API. Patch by
735Dong-hee Na.
736
737..
738
739.. bpo: 44635
740.. date: 2021-07-14-13-54-07
741.. nonce: 7ZMAdB
742.. section: Core and Builtins
743
744Convert ``None`` to ``type(None)`` in the union type constructor.
745
746..
747
748.. bpo: 26280
749.. date: 2021-07-14-10-31-10
750.. nonce: cgpM4B
751.. section: Core and Builtins
752
753Implement adaptive specialization for BINARY_SUBSCR
754
755Three specialized forms of BINARY_SUBSCR are added:
756
757* BINARY_SUBSCR_LIST_INT
758
759* BINARY_SUBSCR_TUPLE_INT
760
761* BINARY_SUBSCR_DICT
762
763..
764
765.. bpo: 44589
766.. date: 2021-07-13-23-19-41
767.. nonce: 59OH8T
768.. section: Core and Builtins
769
770Mapping patterns in ``match`` statements with two or more equal literal keys
771will now raise a :exc:`SyntaxError` at compile-time.
772
773..
774
775.. bpo: 44606
776.. date: 2021-07-13-20-22-12
777.. nonce: S3Bv2w
778.. section: Core and Builtins
779
780Fix ``__instancecheck__`` and ``__subclasscheck__`` for the union type.
781
782..
783
784.. bpo: 42073
785.. date: 2021-07-13-17-47-32
786.. nonce: 9wopiC
787.. section: Core and Builtins
788
789The ``@classmethod`` decorator can now wrap other classmethod-like
790descriptors.
791
792..
793
794.. bpo: 41972
795.. date: 2021-07-12-04-06-57
796.. nonce: nDX5k_
797.. section: Core and Builtins
798
799Tuned the string-searching algorithm of fastsearch.h to have a shorter inner
800loop for most cases.
801
802..
803
804.. bpo: 44590
805.. date: 2021-07-09-12-08-17
806.. nonce: a2ntVX
807.. section: Core and Builtins
808
809All necessary data for executing a Python function (local variables, stack,
810etc) is now kept in a per-thread stack. Frame objects are lazily allocated
811on demand. This increases performance by about 7% on the standard benchmark
812suite. Introspection and debugging are unaffected as frame objects are
813always available when needed. Patch by Mark Shannon.
814
815..
816
817.. bpo: 44584
818.. date: 2021-07-08-12-18-56
819.. nonce: qKnSqV
820.. section: Core and Builtins
821
822The threading debug (:envvar:`PYTHONTHREADDEBUG` environment variable) is
823deprecated in Python 3.10 and will be removed in Python 3.12. This feature
824requires a debug build of Python. Patch by Victor Stinner.
825
826..
827
828.. bpo: 43895
829.. date: 2021-07-07-16-05-35
830.. nonce: JFjR0-
831.. section: Core and Builtins
832
833An obsolete internal cache of shared object file handles added in 1995 that
834attempted, but did not guarantee, that a .so would not be dlopen'ed twice to
835work around flaws in mid-1990s posix-ish operating systems has been removed
836from dynload_shlib.c.
837
838..
839
840.. bpo: 44490
841.. date: 2021-07-06-22-22-15
842.. nonce: BJxPbZ
843.. section: Core and Builtins
844
845:mod:`typing` now searches for type parameters in ``types.Union`` objects.
846``get_type_hints`` will also properly resolve annotations with nested
847``types.Union`` objects. Patch provided by Yurii Karabas.
848
849..
850
851.. bpo: 43950
852.. date: 2021-07-06-15-27-11
853.. nonce: LhL2-q
854.. section: Core and Builtins
855
856Code objects can now provide the column information for instructions when
857available. This is levaraged during traceback printing to show the
858expressions responsible for errors.
859
860Contributed by Pablo Galindo, Batuhan Taskaya and Ammar Askar as part of
861:pep:`657`.
862
863..
864
865.. bpo: 44562
866.. date: 2021-07-04-23-38-51
867.. nonce: QdeRQo
868.. section: Core and Builtins
869
870Remove uses of :c:func:`PyObject_GC_Del` in error path when initializing
871:class:`types.GenericAlias`.
872
873..
874
875.. bpo: 41486
876.. date: 2021-07-04-17-41-47
877.. nonce: DiM24a
878.. section: Core and Builtins
879
880Fix a memory consumption and copying performance regression in earlier 3.10
881beta releases if someone used an output buffer larger than 4GiB with
882zlib.decompress on input data that expands that large.
883
884..
885
886.. bpo: 43908
887.. date: 2021-07-03-00-20-39
888.. nonce: YHuV_s
889.. section: Core and Builtins
890
891Heap types with the :const:`Py_TPFLAGS_IMMUTABLETYPE` flag can now inherit
892the :pep:`590` vectorcall protocol.  Previously, this was only possible for
893:ref:`static types <static-types>`.  Patch by Erlend E. Aasland.
894
895..
896
897.. bpo: 44553
898.. date: 2021-07-02-22-54-41
899.. nonce: l9YqGg
900.. section: Core and Builtins
901
902Implement GC methods for ``types.Union`` to break reference cycles and
903prevent memory leaks.
904
905..
906
907.. bpo: 44490
908.. date: 2021-07-01-11-59-34
909.. nonce: xY80VR
910.. section: Core and Builtins
911
912Add ``__parameters__`` attribute and ``__getitem__`` operator to
913``types.Union``. Patch provided by Yurii Karabas.
914
915..
916
917.. bpo: 44523
918.. date: 2021-06-29-11-49-29
919.. nonce: 67-ZIP
920.. section: Core and Builtins
921
922Remove the pass-through for :func:`hash` of :class:`weakref.proxy` objects
923to prevent unintended consequences when the original referred object dies
924while the proxy is part of a hashable object. Patch by Pablo Galindo.
925
926..
927
928.. bpo: 44483
929.. date: 2021-06-22-19-08-19
930.. nonce: eq2f7T
931.. section: Core and Builtins
932
933Fix a crash in ``types.Union`` objects when creating a union of an object
934with bad ``__module__`` field.
935
936..
937
938.. bpo: 44486
939.. date: 2021-06-22-10-55-23
940.. nonce: wct-9X
941.. section: Core and Builtins
942
943Modules will always have a dictionary, even when created by
944``types.ModuleType.__new__()``
945
946..
947
948.. bpo: 44472
949.. date: 2021-06-21-11-19-54
950.. nonce: Vvm1yn
951.. section: Core and Builtins
952
953Fix ltrace functionality when exceptions are raised. Patch by Pablo Galindo
954
955..
956
957.. bpo: 12022
958.. date: 2021-06-20-10-53-21
959.. nonce: SW240M
960.. section: Core and Builtins
961
962A :exc:`TypeError` is now raised instead of an :exc:`AttributeError` in
963:keyword:`with` and :keyword:`async with` statements for objects which do
964not support the :term:`context manager` or :term:`asynchronous context
965manager` protocols correspondingly.
966
967..
968
969.. bpo: 44297
970.. date: 2021-06-19-12-41-13
971.. nonce: F53vHj
972.. section: Core and Builtins
973
974Make sure that the line number is set when entering a comprehension scope.
975Ensures that backtraces inclusing generator expressions show the correct
976line number.
977
978..
979
980.. bpo: 44456
981.. date: 2021-06-18-22-08-25
982.. nonce: L0Rhko
983.. section: Core and Builtins
984
985Improve the syntax error when mixing positional and keyword patterns. Patch
986by Pablo Galindo.
987
988..
989
990.. bpo: 44409
991.. date: 2021-06-13-23-12-18
992.. nonce: eW4LS-
993.. section: Core and Builtins
994
995Fix error location information for tokenizer errors raised on initialization
996of the tokenizer. Patch by Pablo Galindo.
997
998..
999
1000.. bpo: 44396
1001.. date: 2021-06-11-18-17-42
1002.. nonce: Z9EKim
1003.. section: Core and Builtins
1004
1005Fix a possible crash in the tokenizer when raising syntax errors for
1006unclosed strings. Patch by Pablo Galindo.
1007
1008..
1009
1010.. bpo: 44376
1011.. date: 2021-06-11-17-37-15
1012.. nonce: zhM1UW
1013.. section: Core and Builtins
1014
1015Exact integer exponentiation (like ``i**2`` or ``pow(i, 2)``) with a small
1016exponent is much faster, due to reducing overhead in such cases.
1017
1018..
1019
1020.. bpo: 44313
1021.. date: 2021-06-10-16-10-39
1022.. nonce: 34RjI8
1023.. section: Core and Builtins
1024
1025Directly imported objects and modules (through import and from import
1026statements) don't generate ``LOAD_METHOD``/``CALL_METHOD`` for directly
1027accessed objects on their namespace. They now use the regular
1028``LOAD_ATTR``/``CALL_FUNCTION``.
1029
1030..
1031
1032.. bpo: 44338
1033.. date: 2021-06-10-10-06-18
1034.. nonce: c4Myr4
1035.. section: Core and Builtins
1036
1037Implement adaptive specialization for LOAD_GLOBAL
1038
1039Two specialized forms of LOAD_GLOBAL are added:
1040
1041* LOAD_GLOBAL_MODULE
1042
1043* LOAD_GLOBAL_BUILTIN
1044
1045..
1046
1047.. bpo: 44368
1048.. date: 2021-06-09-22-56-59
1049.. nonce: vgT0Cx
1050.. section: Core and Builtins
1051
1052Improve syntax errors for invalid "as" targets. Patch by Pablo Galindo
1053
1054..
1055
1056.. bpo: 44349
1057.. date: 2021-06-08-22-49-06
1058.. nonce: xgEgeA
1059.. section: Core and Builtins
1060
1061Fix an edge case when displaying text from files with encoding in syntax
1062errors. Patch by Pablo Galindo.
1063
1064..
1065
1066.. bpo: 44337
1067.. date: 2021-06-08-10-22-46
1068.. nonce: RTjmIt
1069.. section: Core and Builtins
1070
1071Initial implementation of adaptive specialization of LOAD_ATTR
1072
1073Four specialized forms of LOAD_ATTR are added:
1074
1075* LOAD_ATTR_SLOT
1076
1077* LOAD_ATTR_SPLIT_KEYS
1078
1079* LOAD_ATTR_WITH_HINT
1080
1081* LOAD_ATTR_MODULE
1082
1083..
1084
1085.. bpo: 44335
1086.. date: 2021-06-08-01-13-47
1087.. nonce: GQTTkl
1088.. section: Core and Builtins
1089
1090Fix a regression when identifying incorrect characters in syntax errors.
1091Patch by Pablo Galindo
1092
1093..
1094
1095.. bpo: 43693
1096.. date: 2021-06-07-15-13-44
1097.. nonce: c_zDeY
1098.. section: Core and Builtins
1099
1100Computation of the offsets of cell variables is done in the compiler instead
1101of at runtime. This reduces the overhead of handling cell and free
1102variables, especially in the case where a variable is both an argument and
1103cell variable.
1104
1105..
1106
1107.. bpo: 44317
1108.. date: 2021-06-06-00-29-14
1109.. nonce: xPPhcZ
1110.. section: Core and Builtins
1111
1112Improve tokenizer error with improved locations. Patch by Pablo Galindo.
1113
1114..
1115
1116.. bpo: 44304
1117.. date: 2021-06-05-02-34-57
1118.. nonce: _MAoPc
1119.. section: Core and Builtins
1120
1121Fix a crash in the :mod:`sqlite3` module that happened when the garbage
1122collector clears :class:`sqlite.Statement` objects. Patch by Pablo Galindo
1123
1124..
1125
1126.. bpo: 44305
1127.. date: 2021-06-03-22-51-50
1128.. nonce: 66dVDG
1129.. section: Core and Builtins
1130
1131Improve error message for ``try`` blocks without ``except`` or ``finally``
1132blocks. Patch by Pablo Galindo.
1133
1134..
1135
1136.. bpo: 43413
1137.. date: 2021-05-30-16-37-47
1138.. nonce: vYFPPC
1139.. section: Core and Builtins
1140
1141Constructors of subclasses of some builtin classes (e.g. :class:`tuple`,
1142:class:`list`, :class:`frozenset`) no longer accept arbitrary keyword
1143arguments. [reverted in 3.11a4] Subclass of :class:`set` can now define a ``__new__()`` method
1144with additional keyword parameters without overriding also ``__init__()``.
1145
1146..
1147
1148.. bpo: 43667
1149.. date: 2021-05-27-17-34-29
1150.. nonce: ND9jP3
1151.. section: Core and Builtins
1152
1153Improve Unicode support in non-UTF locales on Oracle Solaris. This issue
1154does not affect other Solaris systems.
1155
1156..
1157
1158.. bpo: 43693
1159.. date: 2021-05-26-19-10-47
1160.. nonce: 1KSG9u
1161.. section: Core and Builtins
1162
1163A new opcode MAKE_CELL has been added that effectively moves some of the
1164work done on function entry into the compiler and into the eval loop.  In
1165addition to creating the required cell objects, the new opcode converts
1166relevant arguments (and other locals) to cell variables on function entry.
1167
1168..
1169
1170.. bpo: 44232
1171.. date: 2021-05-25-18-20-10
1172.. nonce: DMcCCf
1173.. section: Core and Builtins
1174
1175Fix a regression in :func:`type` when a metaclass raises an exception. The C
1176function :c:func:`type_new` must properly report the exception when a
1177metaclass constructor raises an exception and the winner class is not the
1178metaclass. Patch by Victor Stinner.
1179
1180..
1181
1182.. bpo: 44201
1183.. date: 2021-05-21-21-16-03
1184.. nonce: bGaSjt
1185.. section: Core and Builtins
1186
1187Avoid side effects of checking for specialized syntax errors in the REPL
1188that was causing it to ask for extra tokens after a syntax error had been
1189detected. Patch by Pablo Galindo
1190
1191..
1192
1193.. bpo: 43693
1194.. date: 2021-05-21-20-53-49
1195.. nonce: -NN3J_
1196.. section: Core and Builtins
1197
1198``PyCodeObject`` gained ``co_fastlocalnames`` and ``co_fastlocalkinds`` as
1199the authoritative source of fast locals info.  Marshaled code objects
1200have changed accordingly.
1201
1202..
1203
1204.. bpo: 44184
1205.. date: 2021-05-21-01-42-45
1206.. nonce: 9qOptC
1207.. section: Core and Builtins
1208
1209Fix a crash at Python exit when a deallocator function removes the last
1210strong reference to a heap type. Patch by Victor Stinner.
1211
1212..
1213
1214.. bpo: 44187
1215.. date: 2021-05-20-12-43-04
1216.. nonce: 3lk0L1
1217.. section: Core and Builtins
1218
1219Implement quickening in the interpreter. This offers no advantages as yet,
1220but is an enabler of future optimizations. See PEP 659 for full explanation.
1221
1222..
1223
1224.. bpo: 44180
1225.. date: 2021-05-19-20-33-36
1226.. nonce: mQVaAs
1227.. section: Core and Builtins
1228
1229The parser doesn't report generic syntax errors that happen in a position
1230further away that the one it reached in the first pass. Patch by Pablo
1231Galindo
1232
1233..
1234
1235.. bpo: 44168
1236.. date: 2021-05-18-11-27-02
1237.. nonce: mgB-rt
1238.. section: Core and Builtins
1239
1240Fix error message in the parser involving keyword arguments with invalid
1241expressions. Patch by Pablo Galindo
1242
1243..
1244
1245.. bpo: 44156
1246.. date: 2021-05-17-20-44-45
1247.. nonce: 8KSp9l
1248.. section: Core and Builtins
1249
1250String caches in ``compile.c`` are now subinterpreter compatible.
1251
1252..
1253
1254.. bpo: 44143
1255.. date: 2021-05-15-17-30-57
1256.. nonce: 7UTS6H
1257.. section: Core and Builtins
1258
1259Fixed a crash in the parser that manifest when raising tokenizer errors when
1260an existing exception was present. Patch by Pablo Galindo.
1261
1262..
1263
1264.. bpo: 44032
1265.. date: 2021-05-14-20-03-32
1266.. nonce: OzT1ob
1267.. section: Core and Builtins
1268
1269Move 'fast' locals and other variables from the frame object to a per-thread
1270datastack.
1271
1272..
1273
1274.. bpo: 44114
1275.. date: 2021-05-12-14-26-16
1276.. nonce: p-WfAE
1277.. section: Core and Builtins
1278
1279Fix incorrect dictkeys_reversed and dictitems_reversed function signatures
1280in C code, which broke webassembly builds.
1281
1282..
1283
1284.. bpo: 44110
1285.. date: 2021-05-11-21-52-44
1286.. nonce: VqbAsB
1287.. section: Core and Builtins
1288
1289Improve :func:`str.__getitem__` error message
1290
1291..
1292
1293.. bpo: 26110
1294.. date: 2021-05-10-18-49-13
1295.. nonce: EQzqqA
1296.. section: Core and Builtins
1297
1298Add ``CALL_METHOD_KW`` opcode to speed up method calls with keyword
1299arguments.  Idea originated from PyPy.  A side effect is executing
1300``CALL_METHOD`` is now branchless in the evaluation loop.
1301
1302..
1303
1304.. bpo: 28307
1305.. date: 2021-05-08-19-54-57
1306.. nonce: 7ysaVW
1307.. section: Core and Builtins
1308
1309Compiler now optimizes simple C-style formatting with literal format
1310containing only format codes %s, %r and %a by converting them to f-string
1311expressions.
1312
1313..
1314
1315.. bpo: 43149
1316.. date: 2021-05-08-17-18-37
1317.. nonce: Kp5FxD
1318.. section: Core and Builtins
1319
1320Correct the syntax error message regarding multiple exception types to not
1321refer to "exception groups". Patch by Pablo Galindo
1322
1323..
1324
1325.. bpo: 43822
1326.. date: 2021-05-04-01-01-04
1327.. nonce: 9VeCg0
1328.. section: Core and Builtins
1329
1330The parser will prioritize tokenizer errors over custom syntax errors when
1331raising exceptions. Patch by Pablo Galindo.
1332
1333..
1334
1335.. bpo: 40222
1336.. date: 2021-04-30-15-48-36
1337.. nonce: j3VxeX
1338.. section: Core and Builtins
1339
1340"Zero cost" exception handling.
1341
1342* Uses a lookup table to determine how to handle exceptions.
1343* Removes SETUP_FINALLY and POP_TOP block instructions, eliminating the runtime overhead of try statements.
1344* Reduces the size of the frame object by about 60%.
1345
1346Patch by Mark Shannon
1347
1348..
1349
1350.. bpo: 43918
1351.. date: 2021-04-23-03-46-45
1352.. nonce: nNDY3S
1353.. section: Core and Builtins
1354
1355Document the signature and ``default`` argument in the docstring of the new
1356``anext`` builtin.
1357
1358..
1359
1360.. bpo: 43833
1361.. date: 2021-04-18-18-07-33
1362.. nonce: oChkCi
1363.. section: Core and Builtins
1364
1365Emit a deprecation warning if the numeric literal is immediately followed by
1366one of keywords: and, else, for, if, in, is, or. Raise a syntax error with
1367more informative message if it is immediately followed by other keyword or
1368identifier.
1369
1370..
1371
1372.. bpo: 43879
1373.. date: 2021-04-17-16-08-00
1374.. nonce: zkyJgh
1375.. section: Core and Builtins
1376
1377Add native_thread_id to PyThreadState. Patch by Gabriele N. Tornetta.
1378
1379..
1380
1381.. bpo: 43693
1382.. date: 2021-04-02-15-02-16
1383.. nonce: l3Ureu
1384.. section: Core and Builtins
1385
1386Compute cell offsets relative to locals in compiler. Allows the interpreter
1387to treats locals and cells a single array, which is slightly more efficient.
1388Also make the LOAD_CLOSURE opcode an alias for LOAD_FAST.  Preserving
1389LOAD_CLOSURE helps keep bytecode a bit more readable.
1390
1391..
1392
1393.. bpo: 17792
1394.. date: 2021-03-22-17-50-30
1395.. nonce: _zssjS
1396.. section: Core and Builtins
1397
1398More accurate error messages for access of unbound locals or free vars.
1399
1400..
1401
1402.. bpo: 28146
1403.. date: 2021-01-13-19-34-41
1404.. nonce: AZBBkH
1405.. section: Core and Builtins
1406
1407Fix a confusing error message in :func:`str.format`.
1408
1409..
1410
1411.. bpo: 11105
1412.. date: 2020-06-02-13-21-14
1413.. nonce: wceryW
1414.. section: Core and Builtins
1415
1416When compiling :class:`ast.AST` objects with recursive references through
1417:func:`compile`, the interpreter doesn't crash anymore instead it raises a
1418:exc:`RecursionError`.
1419
1420..
1421
1422.. bpo: 39091
1423.. date: 2019-12-21-14-18-32
1424.. nonce: dOexgQ
1425.. section: Core and Builtins
1426
1427Fix crash when using passing a non-exception to a generator's ``throw()``
1428method. Patch by Noah Oxer
1429
1430..
1431
1432.. bpo: 33346
1433.. date: 2018-05-11-12-44-03
1434.. nonce: ZgBkvB
1435.. section: Core and Builtins
1436
1437Asynchronous comprehensions are now allowed inside comprehensions in
1438asynchronous functions.  Outer comprehensions implicitly become
1439asynchronous.
1440
1441..
1442
1443.. bpo: 45371
1444.. date: 2021-10-05-11-03-48
1445.. nonce: NOwcDJ
1446.. section: Library
1447
1448Fix clang rpath issue in :mod:`distutils`. The UnixCCompiler now uses
1449correct clang option to add a runtime library directory (rpath) to a shared
1450library.
1451
1452..
1453
1454.. bpo: 45329
1455.. date: 2021-10-01-13-09-53
1456.. nonce: 9iMYaO
1457.. section: Library
1458
1459Fix freed memory access in :class:`pyexpat.xmlparser` when building it with
1460an installed expat library <= 2.2.0.
1461
1462..
1463
1464.. bpo: 41710
1465.. date: 2021-09-30-23-00-18
1466.. nonce: svuloZ
1467.. section: Library
1468
1469On Unix, if the ``sem_clockwait()`` function is available in the C library
1470(glibc 2.30 and newer), the :meth:`threading.Lock.acquire` method now uses
1471the monotonic clock (:data:`time.CLOCK_MONOTONIC`) for the timeout, rather
1472than using the system clock (:data:`time.CLOCK_REALTIME`), to not be
1473affected by system clock changes. Patch by Victor Stinner.
1474
1475..
1476
1477.. bpo: 1596321
1478.. date: 2021-09-24-17-20-23
1479.. nonce: 3nhPUk
1480.. section: Library
1481
1482Fix the :func:`threading._shutdown` function when the :mod:`threading`
1483module was imported first from a thread different than the main thread: no
1484longer log an error at Python exit.
1485
1486..
1487
1488.. bpo: 45274
1489.. date: 2021-09-23-22-17-26
1490.. nonce: gPpa4E
1491.. section: Library
1492
1493Fix a race condition in the :meth:`Thread.join() <threading.Thread.join>`
1494method of the :mod:`threading` module. If the function is interrupted by a
1495signal and the signal handler raises an exception, make sure that the thread
1496remains in a consistent state to prevent a deadlock. Patch by Victor
1497Stinner.
1498
1499..
1500
1501.. bpo: 21302
1502.. date: 2021-09-22-23-56-15
1503.. nonce: vvQ3Su
1504.. section: Library
1505
1506In Unix operating systems, :func:`time.sleep` now uses the ``nanosleep()``
1507function, if ``clock_nanosleep()`` is not available but ``nanosleep()`` is
1508available. ``nanosleep()`` allows to sleep with nanosecond precision.
1509
1510..
1511
1512.. bpo: 21302
1513.. date: 2021-09-20-22-46-40
1514.. nonce: h56430
1515.. section: Library
1516
1517On Windows, :func:`time.sleep` now uses a waitable timer which has a
1518resolution of 100 nanoseconds (10\ :sup:`-7` seconds). Previously, it had a
1519resolution of 1 millisecond (10\ :sup:`-3` seconds). Patch by Benjamin Szőke and
1520Victor Stinner.
1521
1522..
1523
1524.. bpo: 45238
1525.. date: 2021-09-18-16-56-33
1526.. nonce: Hng_9V
1527.. section: Library
1528
1529Fix :meth:`unittest.IsolatedAsyncioTestCase.debug`: it runs now asynchronous
1530methods and callbacks.
1531
1532..
1533
1534.. bpo: 36674
1535.. date: 2021-09-18-13-14-57
1536.. nonce: a2k5Zb
1537.. section: Library
1538
1539:meth:`unittest.TestCase.debug` raises now a :class:`unittest.SkipTest` if
1540the class or the test method are decorated with the skipping decorator.
1541
1542..
1543
1544.. bpo: 45235
1545.. date: 2021-09-17-16-55-37
1546.. nonce: sXnmPA
1547.. section: Library
1548
1549Fix an issue where argparse would not preserve values in a provided
1550namespace when using a subparser with defaults.
1551
1552..
1553
1554.. bpo: 45183
1555.. date: 2021-09-17-15-58-53
1556.. nonce: Vv_vch
1557.. section: Library
1558
1559Have zipimport.zipimporter.find_spec() not raise an exception when the
1560underlying zip file has been deleted and the internal cache has been reset
1561via invalidate_cache().
1562
1563..
1564
1565.. bpo: 45234
1566.. date: 2021-09-17-11-20-55
1567.. nonce: qUcTVt
1568.. section: Library
1569
1570Fixed a regression in :func:`~shutil.copyfile`, :func:`~shutil.copy`,
1571:func:`~shutil.copy2` raising :exc:`FileNotFoundError` when source is a
1572directory, which should raise :exc:`IsADirectoryError`
1573
1574..
1575
1576.. bpo: 45228
1577.. date: 2021-09-17-09-59-33
1578.. nonce: WV1dcT
1579.. section: Library
1580
1581Fix stack buffer overflow in parsing J1939 network address.
1582
1583..
1584
1585.. bpo: 45225
1586.. date: 2021-09-16-19-02-14
1587.. nonce: xmKV4i
1588.. section: Library
1589
1590use map function instead of genexpr in capwords.
1591
1592..
1593
1594.. bpo: 42135
1595.. date: 2021-09-13-19-32-58
1596.. nonce: 1ZAHqR
1597.. section: Library
1598
1599Fix typo: ``importlib.find_loader`` is really slated for removal in Python
16003.12 not 3.10, like the others in PR 25169.
1601
1602Patch by Hugo van Kemenade.
1603
1604..
1605
1606.. bpo: 20524
1607.. date: 2021-09-13-14-59-01
1608.. nonce: PMQ1Fh
1609.. section: Library
1610
1611Improves error messages on ``.format()`` operation for ``str``, ``float``,
1612``int``, and ``complex``. New format now shows the problematic pattern and
1613the object type.
1614
1615..
1616
1617.. bpo: 45168
1618.. date: 2021-09-13-14-28-49
1619.. nonce: Z1mfW4
1620.. section: Library
1621
1622Change :func:`dis.dis` output to omit op arg values that cannot be resolved
1623due to ``co_consts``, ``co_names`` etc not being provided. Previously the
1624oparg itself was repeated in the value field, which is not useful and can be
1625confusing.
1626
1627..
1628
1629.. bpo: 21302
1630.. date: 2021-09-11-18-44-40
1631.. nonce: QxHRpR
1632.. section: Library
1633
1634In Unix operating systems, :func:`time.sleep` now uses the
1635``clock_nanosleep()`` function, if available, which allows to sleep for an
1636interval specified with nanosecond precision.
1637
1638..
1639
1640.. bpo: 45173
1641.. date: 2021-09-11-17-46-20
1642.. nonce: UptGAn
1643.. section: Library
1644
1645Remove from the :mod:`configparser` module: the :class:`SafeConfigParser`
1646class, the :attr:`filename` property of the :class:`ParsingError` class, the
1647:meth:`readfp` method of the :class:`ConfigParser` class, deprecated since
1648Python 3.2.
1649
1650Patch by Hugo van Kemenade.
1651
1652..
1653
1654.. bpo: 44987
1655.. date: 2021-09-11-14-41-02
1656.. nonce: Mt8DiX
1657.. section: Library
1658
1659Pure ASCII strings are now normalized in constant time by
1660:func:`unicodedata.normalize`. Patch by Dong-hee Na.
1661
1662..
1663
1664.. bpo: 35474
1665.. date: 2021-09-11-10-45-12
1666.. nonce: tEY3SD
1667.. section: Library
1668
1669Calling :func:`mimetypes.guess_all_extensions` with ``strict=False`` no
1670longer affects the result of the following call with ``strict=True``. Also,
1671mutating the returned list no longer affects the global state.
1672
1673..
1674
1675.. bpo: 45166
1676.. date: 2021-09-10-21-35-53
1677.. nonce: UHipXF
1678.. section: Library
1679
1680:func:`typing.get_type_hints` now works with :data:`~typing.Final` wrapped
1681in :class:`~typing.ForwardRef`.
1682
1683..
1684
1685.. bpo: 45162
1686.. date: 2021-09-10-13-20-53
1687.. nonce: 2Jh-lq
1688.. section: Library
1689
1690Remove many old deprecated :mod:`unittest` features:
1691
1692* "``fail*``" and "``assert*``" aliases of :class:`~unittest.TestCase` methods.
1693* Broken from start :class:`~unittest.TestCase` method ``assertDictContainsSubset()``.
1694* Ignored :meth:`<unittest.TestLoader.loadTestsFromModule> TestLoader.loadTestsFromModule` parameter *use_load_tests*.
1695* Old alias ``_TextTestResult`` of :class:`~unittest.TextTestResult`.
1696
1697..
1698
1699.. bpo: 38371
1700.. date: 2021-09-08-13-19-29
1701.. nonce: y1kEfP
1702.. section: Library
1703
1704Remove the deprecated ``split()`` method of :class:`_tkinter.TkappType`.
1705Patch by Erlend E. Aasland.
1706
1707..
1708
1709.. bpo: 20499
1710.. date: 2021-09-08-01-19-31
1711.. nonce: tSxx8Y
1712.. section: Library
1713
1714Improve the speed and accuracy of statistics.pvariance().
1715
1716..
1717
1718.. bpo: 45132
1719.. date: 2021-09-07-16-33-51
1720.. nonce: WI9zQY
1721.. section: Library
1722
1723Remove :meth:`__getitem__` methods of
1724:class:`xml.dom.pulldom.DOMEventStream`, :class:`wsgiref.util.FileWrapper`
1725and :class:`fileinput.FileInput`, deprecated since Python 3.9.
1726
1727Patch by Hugo van Kemenade.
1728
1729..
1730
1731.. bpo: 45129
1732.. date: 2021-09-07-14-27-39
1733.. nonce: vXH0gw
1734.. section: Library
1735
1736Due to significant security concerns, the *reuse_address* parameter of
1737:meth:`asyncio.loop.create_datagram_endpoint`, disabled in Python 3.9, is
1738now entirely removed. This is because of the behavior of the socket option
1739``SO_REUSEADDR`` in UDP.
1740
1741Patch by Hugo van Kemenade.
1742
1743..
1744
1745.. bpo: 45124
1746.. date: 2021-09-07-09-13-27
1747.. nonce: Kw5AUs
1748.. section: Library
1749
1750The ``bdist_msi`` command, deprecated in Python 3.9, is now removed.
1751
1752Use ``bdist_wheel`` (wheel packages) instead.
1753
1754Patch by Hugo van Kemenade.
1755
1756..
1757
1758.. bpo: 30856
1759.. date: 2021-09-05-21-37-28
1760.. nonce: jj86y0
1761.. section: Library
1762
1763:class:`unittest.TestResult` methods
1764:meth:`~unittest.TestResult.addFailure`,
1765:meth:`~unittest.TestResult.addError`, :meth:`~unittest.TestResult.addSkip`
1766and :meth:`~unittest.TestResult.addSubTest` are now called immediately after
1767raising an exception in test or finishing a subtest. Previously they were
1768called only after finishing the test clean up.
1769
1770..
1771
1772.. bpo: 45034
1773.. date: 2021-09-05-20-33-25
1774.. nonce: 62NLD5
1775.. section: Library
1776
1777Changes how error is formatted for ``struct.pack`` with ``'H'`` and ``'h'``
1778modes and too large / small numbers. Now it shows the actual numeric limits,
1779while previously it was showing arithmetic expressions.
1780
1781..
1782
1783.. bpo: 25894
1784.. date: 2021-09-05-13-15-08
1785.. nonce: zjbi2f
1786.. section: Library
1787
1788:mod:`unittest` now always reports skipped and failed subtests separately:
1789separate characters in default mode and separate lines in verbose mode. Also
1790the test description is now output for errors in test method, class and
1791module cleanups.
1792
1793..
1794
1795.. bpo: 45081
1796.. date: 2021-09-02-12-42-25
1797.. nonce: tOjJ1k
1798.. section: Library
1799
1800Fix issue when dataclasses that inherit from ``typing.Protocol`` subclasses
1801have wrong ``__init__``. Patch provided by Yurii Karabas.
1802
1803..
1804
1805.. bpo: 45085
1806.. date: 2021-09-02-00-47-14
1807.. nonce: mMnaDv
1808.. section: Library
1809
1810The ``binhex`` module, deprecated in Python 3.9, is now removed. The
1811following :mod:`binascii` functions, deprecated in Python 3.9, are now also
1812removed:
1813
1814* ``a2b_hqx()``, ``b2a_hqx()``;
1815* ``rlecode_hqx()``, ``rledecode_hqx()``.
1816
1817The :func:`binascii.crc_hqx` function remains available.
1818
1819Patch by Victor Stinner.
1820
1821..
1822
1823.. bpo: 40360
1824.. date: 2021-09-02-00-18-32
1825.. nonce: 9nmMtB
1826.. section: Library
1827
1828The :mod:`lib2to3` package is now deprecated and may not be able to parse
1829Python 3.10 or newer. See the :pep:`617` (New PEG parser for CPython). Patch
1830by Victor Stinner.
1831
1832..
1833
1834.. bpo: 45075
1835.. date: 2021-09-01-15-27-00
1836.. nonce: 9xUpvt
1837.. section: Library
1838
1839Rename :meth:`traceback.StackSummary.format_frame` to
1840:meth:`traceback.StackSummary.format_frame_summary`. This method was added
1841for 3.11 so it was not released yet.
1842
1843Updated code and docs to better distinguish frame and FrameSummary.
1844
1845..
1846
1847.. bpo: 31299
1848.. date: 2021-08-30-13-55-09
1849.. nonce: 9QzjZs
1850.. section: Library
1851
1852Add option to completely drop frames from a traceback by returning ``None``
1853from a :meth:`~traceback.StackSummary.format_frame` override.
1854
1855..
1856
1857.. bpo: 41620
1858.. date: 2021-08-29-14-49-22
1859.. nonce: WJ6PFL
1860.. section: Library
1861
1862:meth:`~unittest.TestCase.run` now always return a
1863:class:`~unittest.TestResult` instance. Previously it returned ``None`` if
1864the test class or method was decorated with a skipping decorator.
1865
1866..
1867
1868.. bpo: 45021
1869.. date: 2021-08-28-13-00-12
1870.. nonce: rReeaj
1871.. section: Library
1872
1873Fix a potential deadlock at shutdown of forked children when using
1874:mod:`concurrent.futures` module
1875
1876..
1877
1878.. bpo: 43913
1879.. date: 2021-08-27-23-40-51
1880.. nonce: Uo1Gt5
1881.. section: Library
1882
1883Fix bugs in cleaning up classes and modules in :mod:`unittest`:
1884
1885* Functions registered with :func:`~unittest.addModuleCleanup` were not called unless the user defines ``tearDownModule()`` in their test module.
1886* Functions registered with :meth:`~unittest.TestCase.addClassCleanup` were not called if ``tearDownClass`` is set to ``None``.
1887* Buffering in :class:`~unittest.TestResult` did not work with functions registered with ``addClassCleanup()`` and ``addModuleCleanup()``.
1888* Errors in functions registered with ``addClassCleanup()`` and ``addModuleCleanup()`` were not handled correctly in buffered and debug modes.
1889* Errors in ``setUpModule()`` and functions registered with ``addModuleCleanup()`` were reported in wrong order.
1890* And several lesser bugs.
1891
1892..
1893
1894.. bpo: 45030
1895.. date: 2021-08-27-19-01-23
1896.. nonce: tAmBbY
1897.. section: Library
1898
1899Fix integer overflow in pickling and copying the range iterator.
1900
1901..
1902
1903.. bpo: 45001
1904.. date: 2021-08-26-16-25-48
1905.. nonce: tn_dKp
1906.. section: Library
1907
1908Made email date parsing more robust against malformed input, namely a
1909whitespace-only ``Date:`` header. Patch by Wouter Bolsterlee.
1910
1911..
1912
1913.. bpo: 45010
1914.. date: 2021-08-26-09-54-14
1915.. nonce: Cn23bQ
1916.. section: Library
1917
1918Remove support of special method ``__div__`` in :mod:`unittest.mock`. It is
1919not used in Python 3.
1920
1921..
1922
1923.. bpo: 39218
1924.. date: 2021-08-25-20-18-31
1925.. nonce: BlO6jW
1926.. section: Library
1927
1928Improve accuracy of variance calculations by using ``x*x`` instead of
1929``x**2``.
1930
1931..
1932
1933.. bpo: 43613
1934.. date: 2021-08-25-10-28-49
1935.. nonce: WkYmI0
1936.. section: Library
1937
1938Improve the speed of :func:`gzip.compress` and :func:`gzip.decompress` by
1939compressing and decompressing at once in memory instead of in a streamed
1940fashion.
1941
1942..
1943
1944.. bpo: 37596
1945.. date: 2021-08-23-21-39-59
1946.. nonce: ojRcwB
1947.. section: Library
1948
1949Ensure that :class:`set` and :class:`frozenset` objects are always
1950:mod:`marshalled <marshal>` reproducibly.
1951
1952..
1953
1954.. bpo: 44019
1955.. date: 2021-08-22-13-25-17
1956.. nonce: BN8HDy
1957.. section: Library
1958
1959A new function ``operator.call`` has been added, such that
1960``operator.call(obj, *args, **kwargs) == obj(*args, **kwargs)``.
1961
1962..
1963
1964.. bpo: 42255
1965.. date: 2021-08-19-23-49-10
1966.. nonce: ofe3ms
1967.. section: Library
1968
1969:class:`webbrowser.MacOSX` is deprecated and will be removed in Python 3.13.
1970It is untested and undocumented and also not used by webbrowser itself.
1971Patch by Dong-hee Na.
1972
1973..
1974
1975.. bpo: 44955
1976.. date: 2021-08-19-15-03-54
1977.. nonce: 1mxFQS
1978.. section: Library
1979
1980Method :meth:`~unittest.TestResult.stopTestRun` is now always called in pair
1981with method :meth:`~unittest.TestResult.startTestRun` for
1982:class:`~unittest.TestResult` objects implicitly created in
1983:meth:`~unittest.TestCase.run`. Previously it was not called for test
1984methods and classes decorated with a skipping decorator.
1985
1986..
1987
1988.. bpo: 39039
1989.. date: 2021-08-18-10-36-14
1990.. nonce: A63LYh
1991.. section: Library
1992
1993tarfile.open raises :exc:`~tarfile.ReadError` when a zlib error occurs
1994during file extraction.
1995
1996..
1997
1998.. bpo: 44935
1999.. date: 2021-08-17-16-01-44
2000.. nonce: roUl0G
2001.. section: Library
2002
2003:mod:`subprocess` on Solaris now also uses :func:`os.posix_spawn()` for
2004better performance.
2005
2006..
2007
2008.. bpo: 44911
2009.. date: 2021-08-14-00-55-16
2010.. nonce: uk3hYk
2011.. section: Library
2012
2013:class:`~unittest.IsolatedAsyncioTestCase` will no longer throw an exception
2014while cancelling leaked tasks. Patch by Bar Harel.
2015
2016..
2017
2018.. bpo: 41322
2019.. date: 2021-08-12-16-22-16
2020.. nonce: utscTd
2021.. section: Library
2022
2023Added ``DeprecationWarning`` for tests and async tests that return a
2024value!=None (as this may indicate an improperly written test, for example a
2025test written as a generator function).
2026
2027..
2028
2029.. bpo: 44524
2030.. date: 2021-08-10-16-57-10
2031.. nonce: dk9QX4
2032.. section: Library
2033
2034Make exception message more useful when subclass from typing special form
2035alias. Patch provided by Yurii Karabas.
2036
2037..
2038
2039.. bpo: 38956
2040.. date: 2021-08-09-13-17-10
2041.. nonce: owWLNv
2042.. section: Library
2043
2044:class:`argparse.BooleanOptionalAction`'s default value is no longer printed
2045twice when used with :class:`argparse.ArgumentDefaultsHelpFormatter`.
2046
2047..
2048
2049.. bpo: 44860
2050.. date: 2021-08-07-22-51-32
2051.. nonce: PTvRrU
2052.. section: Library
2053
2054Fix the ``posix_user`` scheme in :mod:`sysconfig` to not depend on
2055:data:`sys.platlibdir`.
2056
2057..
2058
2059.. bpo: 44859
2060.. date: 2021-08-07-17-28-56
2061.. nonce: CCopjk
2062.. section: Library
2063
2064Improve error handling in :mod:`sqlite3` and raise more accurate exceptions.
2065
2066* :exc:`MemoryError` is now raised instead of :exc:`sqlite3.Warning` when memory is not enough for encoding a statement to UTF-8 in ``Connection.__call__()`` and ``Cursor.execute()``.
2067* :exc:`UnicodEncodeError` is now raised instead of :exc:`sqlite3.Warning` when the statement contains surrogate characters in ``Connection.__call__()`` and ``Cursor.execute()``.
2068* :exc:`TypeError` is now raised instead of :exc:`ValueError` for non-string script argument in ``Cursor.executescript()``.
2069* :exc:`ValueError` is now raised for script containing the null character instead of truncating it in ``Cursor.executescript()``.
2070* Correctly handle exceptions raised when getting boolean value of the result of the progress handler.
2071* Add many tests covering different corner cases.
2072
2073..
2074
2075.. bpo: 44581
2076.. date: 2021-08-06-19-15-52
2077.. nonce: oFDBTB
2078.. section: Library
2079
2080Upgrade bundled pip to 21.2.3 and setuptools to 57.4.0
2081
2082..
2083
2084.. bpo: 44849
2085.. date: 2021-08-06-13-00-28
2086.. nonce: O78F_f
2087.. section: Library
2088
2089Fix the :func:`os.set_inheritable` function on FreeBSD 14 for file
2090descriptor opened with the :data:`~os.O_PATH` flag: ignore the
2091:data:`~errno.EBADF` error on ``ioctl()``, fallback on the ``fcntl()``
2092implementation. Patch by Victor Stinner.
2093
2094..
2095
2096.. bpo: 44605
2097.. date: 2021-08-06-09-43-50
2098.. nonce: q4YSBZ
2099.. section: Library
2100
2101The @functools.total_ordering() decorator now works with metaclasses.
2102
2103..
2104
2105.. bpo: 44524
2106.. date: 2021-08-05-18-20-17
2107.. nonce: 9T1tfe
2108.. section: Library
2109
2110Fixed an issue wherein the ``__name__`` and ``__qualname__`` attributes of
2111subscribed specialforms could be ``None``.
2112
2113..
2114
2115.. bpo: 44839
2116.. date: 2021-08-05-14-59-39
2117.. nonce: MURNL9
2118.. section: Library
2119
2120:class:`MemoryError` raised in user-defined functions will now produce a
2121``MemoryError`` in :mod:`sqlite3`. :class:`OverflowError` will now be
2122converted to :class:`~sqlite3.DataError`. Previously
2123:class:`~sqlite3.OperationalError` was produced in these cases.
2124
2125..
2126
2127.. bpo: 44822
2128.. date: 2021-08-04-12-29-00
2129.. nonce: zePNXA
2130.. section: Library
2131
2132:mod:`sqlite3` user-defined functions and aggregators returning
2133:class:`strings <str>` with embedded NUL characters are no longer truncated.
2134Patch by Erlend E. Aasland.
2135
2136..
2137
2138.. bpo: 44801
2139.. date: 2021-08-03-20-37-45
2140.. nonce: i49Aug
2141.. section: Library
2142
2143Ensure that the :class:`~typing.ParamSpec` variable in Callable can only be
2144substituted with a parameters expression (a list of types, an ellipsis,
2145ParamSpec or Concatenate).
2146
2147..
2148
2149.. bpo: 44806
2150.. date: 2021-08-02-14-37-32
2151.. nonce: wOW_Qn
2152.. section: Library
2153
2154Non-protocol subclasses of :class:`typing.Protocol` ignore now the
2155``__init__`` method inherited from protocol base classes.
2156
2157..
2158
2159.. bpo: 27275
2160.. date: 2021-08-01-19-49-09
2161.. nonce: QsvE0k
2162.. section: Library
2163
2164:meth:`collections.OrderedDict.popitem` and
2165:meth:`collections.OrderedDict.pop` no longer call ``__getitem__`` and
2166``__delitem__`` methods of the OrderedDict subclasses.
2167
2168..
2169
2170.. bpo: 44793
2171.. date: 2021-07-31-20-28-20
2172.. nonce: woaQSg
2173.. section: Library
2174
2175Fix checking the number of arguments when subscribe a generic type with
2176``ParamSpec`` parameter.
2177
2178..
2179
2180.. bpo: 44784
2181.. date: 2021-07-31-08-45-31
2182.. nonce: fIMIDS
2183.. section: Library
2184
2185In importlib.metadata tests, override warnings behavior under expected
2186DeprecationWarnings (importlib_metadata 4.6.3).
2187
2188..
2189
2190.. bpo: 44667
2191.. date: 2021-07-30-23-27-30
2192.. nonce: tu0Xrv
2193.. section: Library
2194
2195The :func:`tokenize.tokenize` doesn't incorrectly generate a ``NEWLINE``
2196token if the source doesn't end with a new line character but the last line
2197is a comment, as the function is already generating a ``NL`` token. Patch by
2198Pablo Galindo
2199
2200..
2201
2202.. bpo: 44771
2203.. date: 2021-07-28-22-53-18
2204.. nonce: BvLdnU
2205.. section: Library
2206
2207Added ``importlib.simple`` module implementing adapters from a low-level
2208resources reader interface to a ``TraversableResources`` interface. Legacy
2209API (``path``, ``contents``, ...) is now supported entirely by the
2210``.files()`` API with a compatibility shim supplied for resource loaders
2211without that functionality. Feature parity with ``importlib_resources`` 5.2.
2212
2213..
2214
2215.. bpo: 44752
2216.. date: 2021-07-27-22-11-29
2217.. nonce: _bvbrZ
2218.. section: Library
2219
2220:mod:`rcompleter` does not call :func:`getattr` on :class:`property` objects
2221to avoid the side-effect of  evaluating the corresponding method.
2222
2223..
2224
2225.. bpo: 44747
2226.. date: 2021-07-27-12-06-19
2227.. nonce: epUzZz
2228.. section: Library
2229
2230Refactor usage of ``sys._getframe`` in ``typing`` module. Patch provided by
2231Yurii Karabas.
2232
2233..
2234
2235.. bpo: 42378
2236.. date: 2021-07-25-08-17-55
2237.. nonce: WIhUZK
2238.. section: Library
2239
2240Fixes the issue with log file being overwritten when
2241:class:`logging.FileHandler` is used in :mod:`atexit` with *filemode* set to
2242``'w'``. Note this will cause the message in *atexit* not being logged if
2243the log stream is already closed due to shutdown of logging.
2244
2245..
2246
2247.. bpo: 44720
2248.. date: 2021-07-24-02-17-59
2249.. nonce: shU5Qm
2250.. section: Library
2251
2252``weakref.proxy`` objects referencing non-iterators now raise ``TypeError``
2253rather than dereferencing the null ``tp_iternext`` slot and crashing.
2254
2255..
2256
2257.. bpo: 44704
2258.. date: 2021-07-21-23-16-30
2259.. nonce: iqHLxQ
2260.. section: Library
2261
2262The implementation of ``collections.abc.Set._hash()`` now matches that of
2263``frozenset.__hash__()``.
2264
2265..
2266
2267.. bpo: 44666
2268.. date: 2021-07-21-10-43-22
2269.. nonce: CEThkv
2270.. section: Library
2271
2272Fixed issue in :func:`compileall.compile_file` when ``sys.stdout`` is
2273redirected. Patch by Stefan Hölzl.
2274
2275..
2276
2277.. bpo: 44688
2278.. date: 2021-07-20-23-28-26
2279.. nonce: buFgz3
2280.. section: Library
2281
2282:meth:`sqlite3.Connection.create_collation` now accepts non-ASCII collation
2283names. Patch by Erlend E. Aasland.
2284
2285..
2286
2287.. bpo: 44690
2288.. date: 2021-07-20-22-03-24
2289.. nonce: tV7Zjg
2290.. section: Library
2291
2292Adopt *binacii.a2b_base64*'s strict mode in *base64.b64decode*.
2293
2294..
2295
2296.. bpo: 42854
2297.. date: 2021-07-20-21-51-35
2298.. nonce: ThuDMI
2299.. section: Library
2300
2301Fixed a bug in the :mod:`_ssl` module that was throwing :exc:`OverflowError`
2302when using :meth:`_ssl._SSLSocket.write` and :meth:`_ssl._SSLSocket.read`
2303for a big value of the ``len`` parameter. Patch by Pablo Galindo
2304
2305..
2306
2307.. bpo: 44686
2308.. date: 2021-07-20-19-35-49
2309.. nonce: ucCGhu
2310.. section: Library
2311
2312Replace ``unittest.mock._importer`` with ``pkgutil.resolve_name``.
2313
2314..
2315
2316.. bpo: 44353
2317.. date: 2021-07-20-18-34-16
2318.. nonce: ATuYq4
2319.. section: Library
2320
2321Make ``NewType.__call__`` faster by implementing it in C. Patch provided by
2322Yurii Karabas.
2323
2324..
2325
2326.. bpo: 44682
2327.. date: 2021-07-20-00-11-47
2328.. nonce: 3m2qVV
2329.. section: Library
2330
2331Change the :mod:`pdb` *commands* directive to disallow setting commands for
2332an invalid breakpoint and to display an appropriate error.
2333
2334..
2335
2336.. bpo: 44353
2337.. date: 2021-07-19-22-43-15
2338.. nonce: HF81_Q
2339.. section: Library
2340
2341Refactor ``typing.NewType`` from function into callable class. Patch
2342provided by Yurii Karabas.
2343
2344..
2345
2346.. bpo: 44678
2347.. date: 2021-07-19-18-45-00
2348.. nonce: YMEAu0
2349.. section: Library
2350
2351Added a separate error message for discontinuous padding in
2352*binascii.a2b_base64* strict mode.
2353
2354..
2355
2356.. bpo: 44524
2357.. date: 2021-07-19-14-04-42
2358.. nonce: Nbf2JC
2359.. section: Library
2360
2361Add missing ``__name__`` and ``__qualname__`` attributes to ``typing``
2362module classes. Patch provided by Yurii Karabas.
2363
2364..
2365
2366.. bpo: 40897
2367.. date: 2021-07-16-13-40-31
2368.. nonce: aveAre
2369.. section: Library
2370
2371Give priority to using the current class constructor in
2372:func:`inspect.signature`. Patch by Weipeng Hong.
2373
2374..
2375
2376.. bpo: 44638
2377.. date: 2021-07-16-08-57-27
2378.. nonce: EwYKne
2379.. section: Library
2380
2381Add a reference to the zipp project and hint as to how to use it.
2382
2383..
2384
2385.. bpo: 44648
2386.. date: 2021-07-15-16-51-32
2387.. nonce: 2o49TB
2388.. section: Library
2389
2390Fixed wrong error being thrown by :func:`inspect.getsource` when examining a
2391class in the interactive session. Instead of :exc:`TypeError`, it should be
2392:exc:`OSError` with appropriate error message.
2393
2394..
2395
2396.. bpo: 44608
2397.. date: 2021-07-13-09-01-33
2398.. nonce: R3IcM1
2399.. section: Library
2400
2401Fix memory leak in :func:`_tkinter._flatten` if it is called with a sequence
2402or set, but not list or tuple.
2403
2404..
2405
2406.. bpo: 44594
2407.. date: 2021-07-12-10-32-48
2408.. nonce: eEa5zi
2409.. section: Library
2410
2411Fix an edge case of :class:`ExitStack` and :class:`AsyncExitStack` exception
2412chaining.  They will now match ``with`` block behavior when ``__context__``
2413is explicitly set to ``None`` when the exception is in flight.
2414
2415..
2416
2417.. bpo: 42799
2418.. date: 2021-07-10-19-55-13
2419.. nonce: ad4tq8
2420.. section: Library
2421
2422In :mod:`fnmatch`, the cache size for compiled regex patterns
2423(:func:`functools.lru_cache`) was bumped up from 256 to 32768, affecting
2424functions: :func:`fnmatch.fnmatch`, :func:`fnmatch.fnmatchcase`,
2425:func:`fnmatch.filter`.
2426
2427..
2428
2429.. bpo: 41928
2430.. date: 2021-07-09-07-14-37
2431.. nonce: Q1jMrr
2432.. section: Library
2433
2434Update :func:`shutil.copyfile` to raise :exc:`FileNotFoundError` instead of
2435confusing :exc:`IsADirectoryError` when a path ending with a
2436:const:`os.path.sep` does not exist; :func:`shutil.copy` and
2437:func:`shutil.copy2` are also affected.
2438
2439..
2440
2441.. bpo: 44569
2442.. date: 2021-07-08-12-22-54
2443.. nonce: KZ02v9
2444.. section: Library
2445
2446Added the :func:`StackSummary.format_frame` function in :mod:`traceback`.
2447This allows users to customize the way individual lines are formatted in
2448tracebacks without re-implementing logic to handle recursive tracebacks.
2449
2450..
2451
2452.. bpo: 44566
2453.. date: 2021-07-05-18-13-25
2454.. nonce: o51Bd1
2455.. section: Library
2456
2457handle StopIteration subclass raised from @contextlib.contextmanager
2458generator
2459
2460..
2461
2462.. bpo: 44558
2463.. date: 2021-07-04-21-16-53
2464.. nonce: cm7Slv
2465.. section: Library
2466
2467Make the implementation consistency of :func:`~operator.indexOf` between C
2468and Python versions. Patch by Dong-hee Na.
2469
2470..
2471
2472.. bpo: 41249
2473.. date: 2021-07-04-11-33-34
2474.. nonce: sHdwBE
2475.. section: Library
2476
2477Fixes ``TypedDict`` to work with ``typing.get_type_hints()`` and postponed
2478evaluation of annotations across modules.
2479
2480..
2481
2482.. bpo: 44554
2483.. date: 2021-07-02-18-17-56
2484.. nonce: aBUmJo
2485.. section: Library
2486
2487Refactor argument processing in :func:`pdb.main` to simplify detection of
2488errors in input loading and clarify behavior around module or script
2489invocation.
2490
2491..
2492
2493.. bpo: 34798
2494.. date: 2021-06-30-13-29-49
2495.. nonce: t7FCa0
2496.. section: Library
2497
2498Break up paragraph about :class:`pprint.PrettyPrinter` construction
2499parameters to make it easier to read.
2500
2501..
2502
2503.. bpo: 44539
2504.. date: 2021-06-30-11-34-35
2505.. nonce: nP0Xi4
2506.. section: Library
2507
2508Added support for recognizing JPEG files without JFIF or Exif markers.
2509
2510..
2511
2512.. bpo: 44461
2513.. date: 2021-06-29-21-17-17
2514.. nonce: acqRnV
2515.. section: Library
2516
2517Fix bug with :mod:`pdb`'s handling of import error due to a package which
2518does not have a ``__main__`` module
2519
2520..
2521
2522.. bpo: 43625
2523.. date: 2021-06-29-07-27-08
2524.. nonce: ZlAxhp
2525.. section: Library
2526
2527Fix a bug in the detection of CSV file headers by
2528:meth:`csv.Sniffer.has_header` and improve documentation of same.
2529
2530..
2531
2532.. bpo: 44516
2533.. date: 2021-06-26-12-27-14
2534.. nonce: BVyX_y
2535.. section: Library
2536
2537Update vendored pip to 21.1.3
2538
2539..
2540
2541.. bpo: 42892
2542.. date: 2021-06-24-19-16-20
2543.. nonce: qvRNhI
2544.. section: Library
2545
2546Fixed an exception thrown while parsing a malformed multipart email by
2547:class:`email.message.EmailMessage`.
2548
2549..
2550
2551.. bpo: 44468
2552.. date: 2021-06-23-19-02-00
2553.. nonce: -klV5-
2554.. section: Library
2555
2556:func:`typing.get_type_hints` now finds annotations in classes and base
2557classes with unexpected ``__module__``. Previously, it skipped those MRO
2558elements.
2559
2560..
2561
2562.. bpo: 44491
2563.. date: 2021-06-23-01-33-01
2564.. nonce: tiOlr5
2565.. section: Library
2566
2567Allow clearing the :mod:`sqlite3` authorizer callback by passing
2568:const:`None` to :meth:`~sqlite3.Connection.set_authorizer`. Patch by Erlend
2569E. Aasland.
2570
2571..
2572
2573.. bpo: 43977
2574.. date: 2021-06-22-16-45-48
2575.. nonce: bamAGF
2576.. section: Library
2577
2578Set the proper :const:`Py_TPFLAGS_MAPPING` and :const:`Py_TPFLAGS_SEQUENCE`
2579flags for subclasses created before a parent has been registered as a
2580:class:`collections.abc.Mapping` or :class:`collections.abc.Sequence`.
2581
2582..
2583
2584.. bpo: 44482
2585.. date: 2021-06-22-08-43-04
2586.. nonce: U9GznK
2587.. section: Library
2588
2589Fix very unlikely resource leak in :mod:`glob` in alternate Python
2590implementations.
2591
2592..
2593
2594.. bpo: 44466
2595.. date: 2021-06-21-12-43-04
2596.. nonce: NSm6mv
2597.. section: Library
2598
2599The :mod:`faulthandler` module now detects if a fatal error occurs during a
2600garbage collector collection. Patch by Victor Stinner.
2601
2602..
2603
2604.. bpo: 44471
2605.. date: 2021-06-21-10-46-58
2606.. nonce: 2QjXv_
2607.. section: Library
2608
2609A :exc:`TypeError` is now raised instead of an :exc:`AttributeError` in
2610:meth:`contextlib.ExitStack.enter_context` and
2611:meth:`contextlib.AsyncExitStack.enter_async_context` for objects which do
2612not support the :term:`context manager` or :term:`asynchronous context
2613manager` protocols correspondingly.
2614
2615..
2616
2617.. bpo: 44404
2618.. date: 2021-06-20-19-01-11
2619.. nonce: McfrYB
2620.. section: Library
2621
2622:mod:`tkinter`'s ``after()`` method now supports callables without the
2623``__name__`` attribute.
2624
2625..
2626
2627.. bpo: 41546
2628.. date: 2021-06-20-14-03-18
2629.. nonce: lO1jXU
2630.. section: Library
2631
2632Make :mod:`pprint` (like the builtin ``print``) not attempt to write to
2633``stdout`` when it is ``None``.
2634
2635..
2636
2637.. bpo: 44458
2638.. date: 2021-06-20-07-14-46
2639.. nonce: myqCQ0
2640.. section: Library
2641
2642``BUFFER_BLOCK_SIZE`` is now declared static, to avoid linking collisions
2643when bz2, lmza or zlib are statically linked.
2644
2645..
2646
2647.. bpo: 44464
2648.. date: 2021-06-19-21-52-27
2649.. nonce: U2oa-a
2650.. section: Library
2651
2652Remove exception for flake8 in deprecated importlib.metadata interfaces.
2653Sync with importlib_metadata 4.6.
2654
2655..
2656
2657.. bpo: 44446
2658.. date: 2021-06-17-22-39-34
2659.. nonce: qwdRic
2660.. section: Library
2661
2662Take into account that ``lineno`` might be ``None`` in
2663:class:`traceback.FrameSummary`.
2664
2665..
2666
2667.. bpo: 44439
2668.. date: 2021-06-17-15-01-51
2669.. nonce: 1S7QhT
2670.. section: Library
2671
2672Fix in :meth:`bz2.BZ2File.write` / :meth:`lzma.LZMAFile.write` methods, when
2673the input data is an object that supports the buffer protocol, the file
2674length may be wrong.
2675
2676..
2677
2678.. bpo: 44434
2679.. date: 2021-06-16-16-52-14
2680.. nonce: SQS4Pg
2681.. section: Library
2682
2683_thread.start_new_thread() no longer calls PyThread_exit_thread() explicitly
2684at the thread exit, the call was redundant. On Linux with the glibc,
2685pthread_exit() aborts the whole process if dlopen() fails to open
2686libgcc_s.so file (ex: EMFILE error). Patch by Victor Stinner.
2687
2688..
2689
2690.. bpo: 42972
2691.. date: 2021-06-15-13-51-25
2692.. nonce: UnyYo1
2693.. section: Library
2694
2695The _thread.RLock type now fully implement the GC protocol: add a traverse
2696function and the :const:`Py_TPFLAGS_HAVE_GC` flag. Patch by Victor Stinner.
2697
2698..
2699
2700.. bpo: 44422
2701.. date: 2021-06-14-23-28-17
2702.. nonce: BlWOgv
2703.. section: Library
2704
2705The :func:`threading.enumerate` function now uses a reentrant lock to
2706prevent a hang on reentrant call. Patch by Victor Stinner.
2707
2708..
2709
2710.. bpo: 38291
2711.. date: 2021-06-14-14-19-11
2712.. nonce: ee4cSX
2713.. section: Library
2714
2715Importing typing.io or typing.re now prints a ``DeprecationWarning``.
2716
2717..
2718
2719.. bpo: 37880
2720.. date: 2021-06-13-00-16-56
2721.. nonce: 5bTrkw
2722.. section: Library
2723
2724argparse actions store_const and append_const each receive a default value
2725of None when the ``const`` kwarg is not provided. Previously, this raised a
2726:exc:`TypeError`.
2727
2728..
2729
2730.. bpo: 44389
2731.. date: 2021-06-12-22-58-20
2732.. nonce: WTRnoC
2733.. section: Library
2734
2735Fix deprecation of :data:`ssl.OP_NO_TLSv1_3`
2736
2737..
2738
2739.. bpo: 27827
2740.. date: 2021-06-12-21-25-35
2741.. nonce: TMWh1i
2742.. section: Library
2743
2744:meth:`pathlib.PureWindowsPath.is_reserved` now identifies a greater range
2745of reserved filenames, including those with trailing spaces or colons.
2746
2747..
2748
2749.. bpo: 44395
2750.. date: 2021-06-12-10-08-14
2751.. nonce: PcW6Sx
2752.. section: Library
2753
2754Fix :meth:`~email.message.MIMEPart.as_string` to pass unixfrom properly.
2755Patch by Dong-hee Na.
2756
2757..
2758
2759.. bpo: 34266
2760.. date: 2021-06-10-21-53-46
2761.. nonce: k3fxnm
2762.. section: Library
2763
2764Handle exceptions from parsing the arg of :mod:`pdb`'s run/restart command.
2765
2766..
2767
2768.. bpo: 44362
2769.. date: 2021-06-10-20-07-32
2770.. nonce: oVOMfd
2771.. section: Library
2772
2773Improve :mod:`ssl` module's deprecation messages, error reporting, and
2774documentation for deprecations.
2775
2776..
2777
2778.. bpo: 44342
2779.. date: 2021-06-10-15-06-47
2780.. nonce: qqkGlj
2781.. section: Library
2782
2783[Enum] Change pickling from by-value to by-name.
2784
2785..
2786
2787.. bpo: 44356
2788.. date: 2021-06-10-08-35-38
2789.. nonce: 6oDFhO
2790.. section: Library
2791
2792[Enum] Allow multiple data-type mixins if they are all the same.
2793
2794..
2795
2796.. bpo: 44351
2797.. date: 2021-06-10-07-26-12
2798.. nonce: rvyf2v
2799.. section: Library
2800
2801Restore back :func:`parse_makefile` in :mod:`distutils.sysconfig` because it
2802behaves differently than the similar implementation in :mod:`sysconfig`.
2803
2804..
2805
2806.. bpo: 35800
2807.. date: 2021-06-09-10-08-32
2808.. nonce: 3hmkWw
2809.. section: Library
2810
2811:class:`smtpd.MailmanProxy` is now removed as it is unusable without an
2812external module, ``mailman``. Patch by Dong-hee Na.
2813
2814..
2815
2816.. bpo: 44357
2817.. date: 2021-06-09-08-32-39
2818.. nonce: 70Futb
2819.. section: Library
2820
2821Added a function that returns cube root of the given number
2822:func:`math.cbrt`
2823
2824..
2825
2826.. bpo: 44339
2827.. date: 2021-06-08-17-47-38
2828.. nonce: 9JwMSc
2829.. section: Library
2830
2831Change ``math.pow(±0.0, -math.inf)`` to return ``inf`` instead of raising
2832``ValueError``. This brings the special-case handling of ``math.pow`` into
2833compliance with the IEEE 754 standard.
2834
2835..
2836
2837.. bpo: 44242
2838.. date: 2021-06-07-10-26-14
2839.. nonce: MKeMCQ
2840.. section: Library
2841
2842Remove missing flag check from Enum creation and move into a ``verify``
2843decorator.
2844
2845..
2846
2847.. bpo: 44246
2848.. date: 2021-05-31-11-34-56
2849.. nonce: yHAkF0
2850.. section: Library
2851
2852In ``importlib.metadata``, restore compatibility in the result from
2853``Distribution.entry_points`` (``EntryPoints``) to honor expectations in
2854older implementations and issuing deprecation warnings for these cases: A.
2855``EntryPoints`` objects are once again mutable, allowing   for ``sort()``
2856and other list-based mutation operations.   Avoid deprecation warnings by
2857casting to a   mutable sequence (e.g.   ``list(dist.entry_points).sort()``).
2858B. ``EntryPoints`` results once again allow   for access by index. To avoid
2859deprecation warnings,   cast the result to a Sequence first   (e.g.
2860``tuple(dist.entry_points)[0]``).
2861
2862..
2863
2864.. bpo: 44246
2865.. date: 2021-05-31-11-28-03
2866.. nonce: nhmt-v
2867.. section: Library
2868
2869In importlib.metadata.entry_points, de-duplication of distributions no
2870longer requires loading the full metadata for PathDistribution objects,
2871improving entry point loading performance by ~10x.
2872
2873..
2874
2875.. bpo: 43858
2876.. date: 2021-05-31-04-51-02
2877.. nonce: r7LOu6
2878.. section: Library
2879
2880Added a function that returns a copy of a dict of logging levels:
2881:func:`logging.getLevelNamesMapping`
2882
2883..
2884
2885.. bpo: 44260
2886.. date: 2021-05-30-13-32-09
2887.. nonce: ROEbVd
2888.. section: Library
2889
2890The :class:`random.Random` constructor no longer reads system entropy
2891without need.
2892
2893..
2894
2895.. bpo: 44254
2896.. date: 2021-05-29-01-05-43
2897.. nonce: f06xDm
2898.. section: Library
2899
2900On Mac, give turtledemo button text a color that works on both light or dark
2901background.  Programmers cannot control the latter.
2902
2903..
2904
2905.. bpo: 44258
2906.. date: 2021-05-28-09-43-33
2907.. nonce: nh5F7R
2908.. section: Library
2909
2910Support PEP 515 for Fraction's initialization from string.
2911
2912..
2913
2914.. bpo: 44235
2915.. date: 2021-05-26-22-04-40
2916.. nonce: qFBYpp
2917.. section: Library
2918
2919Remove deprecated functions in the :mod:`gettext`. Patch by Dong-hee Na.
2920
2921..
2922
2923.. bpo: 38693
2924.. date: 2021-05-26-14-50-06
2925.. nonce: NkMacJ
2926.. section: Library
2927
2928Prefer f-strings to ``.format`` in importlib.resources.
2929
2930..
2931
2932.. bpo: 33693
2933.. date: 2021-05-26-13-34-37
2934.. nonce: 3okzdo
2935.. section: Library
2936
2937Importlib.metadata now prefers f-strings to .format.
2938
2939..
2940
2941.. bpo: 44241
2942.. date: 2021-05-26-13-15-51
2943.. nonce: TBqej8
2944.. section: Library
2945
2946Incorporate minor tweaks from importlib_metadata 4.1: SimplePath protocol,
2947support for Metadata 2.2.
2948
2949..
2950
2951.. bpo: 43216
2952.. date: 2021-05-25-23-26-38
2953.. nonce: xTUyyX
2954.. section: Library
2955
2956Remove the :func:`@asyncio.coroutine <asyncio.coroutine>` :term:`decorator`
2957enabling legacy generator-based coroutines to be compatible with async/await
2958code; remove :class:`asyncio.coroutines.CoroWrapper` used for wrapping
2959legacy coroutine objects in the debug mode. The decorator has been
2960deprecated since Python 3.8 and the removal was initially scheduled for
2961Python 3.10. Patch by Illia Volochii.
2962
2963..
2964
2965.. bpo: 44210
2966.. date: 2021-05-21-21-23-43
2967.. nonce: 5afQ3K
2968.. section: Library
2969
2970Make importlib.metadata._meta.PackageMetadata public.
2971
2972..
2973
2974.. bpo: 43643
2975.. date: 2021-05-21-12-12-35
2976.. nonce: GWnmcF
2977.. section: Library
2978
2979Declare readers.MultiplexedPath.name as a property per the spec.
2980
2981..
2982
2983.. bpo: 27334
2984.. date: 2021-05-18-00-17-21
2985.. nonce: 32EJZi
2986.. section: Library
2987
2988The :mod:`sqlite3` context manager now performs a rollback (thus releasing
2989the database lock) if commit failed.  Patch by Luca Citi and Erlend E.
2990Aasland.
2991
2992..
2993
2994.. bpo: 4928
2995.. date: 2021-05-17-21-05-06
2996.. nonce: Ot2yjO
2997.. section: Library
2998
2999Documented existing behavior on POSIX: NamedTemporaryFiles are not deleted
3000when creating process is killed with SIGKILL
3001
3002..
3003
3004.. bpo: 44154
3005.. date: 2021-05-17-07-24-24
3006.. nonce: GRI5bf
3007.. section: Library
3008
3009Optimize :class:`fractions.Fraction` pickling for large components.
3010
3011..
3012
3013.. bpo: 33433
3014.. date: 2021-05-16-17-48-24
3015.. nonce: MyzO71
3016.. section: Library
3017
3018For IPv4 mapped IPv6 addresses (:rfc:`4291` Section 2.5.5.2), the
3019:mod:`ipaddress.IPv6Address.is_private` check is deferred to the mapped IPv4
3020address. This solves a bug where public mapped IPv4 addresses were
3021considered private by the IPv6 check.
3022
3023..
3024
3025.. bpo: 44150
3026.. date: 2021-05-16-11-57-38
3027.. nonce: xAhhik
3028.. section: Library
3029
3030Add optional *weights* argument to statistics.fmean().
3031
3032..
3033
3034.. bpo: 44142
3035.. date: 2021-05-16-02-24-23
3036.. nonce: t-XU8k
3037.. section: Library
3038
3039:func:`ast.unparse` will now drop the redundant parentheses when tuples used
3040as assignment targets (e.g in for loops).
3041
3042..
3043
3044.. bpo: 44145
3045.. date: 2021-05-16-00-00-38
3046.. nonce: ko5SJ7
3047.. section: Library
3048
3049:mod:`hmac` computations were not releasing the GIL while calling the
3050OpenSSL ``HMAC_Update`` C API (a new feature in 3.9).  This unintentionally
3051prevented parallel computation as other :mod:`hashlib` algorithms support.
3052
3053..
3054
3055.. bpo: 44095
3056.. date: 2021-05-14-16-06-02
3057.. nonce: v_pLwY
3058.. section: Library
3059
3060:class:`zipfile.Path` now supports :attr:`zipfile.Path.stem`,
3061:attr:`zipfile.Path.suffixes`, and :attr:`zipfile.Path.suffix` attributes.
3062
3063..
3064
3065.. bpo: 44077
3066.. date: 2021-05-13-19-44-38
3067.. nonce: 04b2a4
3068.. section: Library
3069
3070It's now possible to receive the type of service (ToS), a.k.a.
3071differentiated services (DS), a.k.a. differentiated services code point
3072(DSCP) and explicit congestion notification (ECN) IP header fields with
3073``socket.IP_RECVTOS``.
3074
3075..
3076
3077.. bpo: 37788
3078.. date: 2021-05-13-19-07-28
3079.. nonce: adeFcf
3080.. section: Library
3081
3082Fix a reference leak when a Thread object is never joined.
3083
3084..
3085
3086.. bpo: 38908
3087.. date: 2021-05-12-16-43-21
3088.. nonce: nM2_rO
3089.. section: Library
3090
3091Subclasses of ``typing.Protocol`` which only have data variables declared
3092will now raise a ``TypeError`` when checked with ``isinstance`` unless they
3093are decorated with :func:`runtime_checkable`.  Previously, these checks
3094passed silently. Patch provided by Yurii Karabas.
3095
3096..
3097
3098.. bpo: 44098
3099.. date: 2021-05-10-17-45-00
3100.. nonce: _MoxuZ
3101.. section: Library
3102
3103``typing.ParamSpec`` will no longer be found in the ``__parameters__`` of
3104most :mod:`typing` generics except in valid use locations specified by
3105:pep:`612`. This prevents incorrect usage like ``typing.List[P][int]``. This
3106change means incorrect usage which may have passed silently in 3.10 beta 1
3107and earlier will now error.
3108
3109..
3110
3111.. bpo: 44089
3112.. date: 2021-05-09-22-52-34
3113.. nonce: IoANsN
3114.. section: Library
3115
3116Allow subclassing ``csv.Error`` in 3.10 (it was allowed in 3.9 and earlier
3117but was disallowed in early versions of 3.10).
3118
3119..
3120
3121.. bpo: 44081
3122.. date: 2021-05-09-03-26-31
3123.. nonce: A-Mrto
3124.. section: Library
3125
3126:func:`ast.unparse` now doesn't use redundant spaces to separate ``lambda``
3127and the ``:`` if there are no parameters.
3128
3129..
3130
3131.. bpo: 44061
3132.. date: 2021-05-07-08-39-23
3133.. nonce: MvElG6
3134.. section: Library
3135
3136Fix regression in previous release when calling :func:`pkgutil.iter_modules`
3137with a list of :class:`pathlib.Path` objects
3138
3139..
3140
3141.. bpo: 44059
3142.. date: 2021-05-06-16-01-55
3143.. nonce: GF5r6O
3144.. section: Library
3145
3146Register the SerenityOS Browser in the :mod:`webbrowser` module.
3147
3148..
3149
3150.. bpo: 36515
3151.. date: 2021-05-05-11-44-49
3152.. nonce: uOSa3q
3153.. section: Library
3154
3155The :mod:`hashlib` module no longer does unaligned memory accesses when
3156compiled for ARM platforms.
3157
3158..
3159
3160.. bpo: 40465
3161.. date: 2021-05-03-19-59-14
3162.. nonce: 1tB4Y0
3163.. section: Library
3164
3165Remove random module features deprecated in Python 3.9.
3166
3167..
3168
3169.. bpo: 44018
3170.. date: 2021-05-03-10-07-43
3171.. nonce: VDyW8f
3172.. section: Library
3173
3174random.seed() no longer mutates bytearray inputs.
3175
3176..
3177
3178.. bpo: 38352
3179.. date: 2021-05-02-13-54-25
3180.. nonce: N9MlhV
3181.. section: Library
3182
3183Add ``IO``, ``BinaryIO``, ``TextIO``, ``Match``, and ``Pattern`` to
3184``typing.__all__``. Patch by Jelle Zijlstra.
3185
3186..
3187
3188.. bpo: 44002
3189.. date: 2021-05-01-15-43-37
3190.. nonce: KLT_wd
3191.. section: Library
3192
3193:mod:`urllib.parse` now uses :func:`functool.lru_cache` for its internal URL
3194splitting and quoting caches instead of rolling its own like its the '90s.
3195
3196The undocumented internal :mod:`urllib.parse` ``Quoted`` class API is now
3197deprecated, for removal in 3.14.
3198
3199..
3200
3201.. bpo: 43972
3202.. date: 2021-04-30-16-58-24
3203.. nonce: Y2r9lg
3204.. section: Library
3205
3206When :class:`http.server.SimpleHTTPRequestHandler` sends a ``301 (Moved
3207Permanently)`` for a directory path not ending with `/`, add a
3208``Content-Length: 0`` header. This improves the behavior for certain
3209clients.
3210
3211..
3212
3213.. bpo: 28528
3214.. date: 2021-04-29-00-48-00
3215.. nonce: JLAVWj
3216.. section: Library
3217
3218Fix a bug in :mod:`pdb` where :meth:`~pdb.Pdb.checkline` raises
3219:exc:`AttributeError` if it is called after :meth:`~pdb.Pdb.reset`.
3220
3221..
3222
3223.. bpo: 43853
3224.. date: 2021-04-15-12-02-17
3225.. nonce: XXCVAp
3226.. section: Library
3227
3228Improved string handling for :mod:`sqlite3` user-defined functions and
3229aggregates:
3230
3231* It is now possible to pass strings with embedded null characters to UDFs
3232* Conversion failures now correctly raise :exc:`MemoryError`
3233
3234Patch by Erlend E. Aasland.
3235
3236..
3237
3238.. bpo: 43666
3239.. date: 2021-03-30-08-39-08
3240.. nonce: m72tlH
3241.. section: Library
3242
3243AIX: `Lib/_aix_support.get_platform()` may fail in an AIX WPAR. The fileset
3244bos.rte appears to have a builddate in both LPAR and WPAR so this fileset is
3245queried rather than bos.mp64. To prevent a similar situation (no builddate
3246in ODM) a value (9988) sufficient for completing a build is provided. Patch
3247by M Felt.
3248
3249..
3250
3251.. bpo: 43650
3252.. date: 2021-03-29-00-23-30
3253.. nonce: v01tic
3254.. section: Library
3255
3256Fix :exc:`MemoryError` in :func:`shutil.unpack_archive` which fails inside
3257:func:`shutil._unpack_zipfile` on large files. Patch by Igor Bolshakov.
3258
3259..
3260
3261.. bpo: 43612
3262.. date: 2021-03-24-09-40-02
3263.. nonce: vMGZ4y
3264.. section: Library
3265
3266:func:`zlib.compress` now accepts a wbits parameter which allows users to
3267compress data as a raw deflate block without zlib headers and trailers in
3268one go. Previously this required instantiating a ``zlib.compressobj``. It
3269also provides a faster alternative to ``gzip.compress`` when wbits=31 is
3270used.
3271
3272..
3273
3274.. bpo: 43392
3275.. date: 2021-03-03-13-32-37
3276.. nonce: QQumou
3277.. section: Library
3278
3279:func:`importlib._bootstrap._find_and_load` now implements a two-step check
3280to avoid locking when modules have been already imported and are ready. This
3281improves performance of repeated calls to :func:`importlib.import_module`
3282and :func:`importlib.__import__`.
3283
3284..
3285
3286.. bpo: 43318
3287.. date: 2021-02-25-08-32-06
3288.. nonce: bZJw6V
3289.. section: Library
3290
3291Fix a bug where :mod:`pdb` does not always echo cleared breakpoints.
3292
3293..
3294
3295.. bpo: 43234
3296.. date: 2021-02-15-22-14-31
3297.. nonce: F-vKAT
3298.. section: Library
3299
3300Prohibit passing non-:class:`concurrent.futures.ThreadPoolExecutor`
3301executors to :meth:`loop.set_default_executor` following a deprecation in
3302Python 3.8. Patch by Illia Volochii.
3303
3304..
3305
3306.. bpo: 43232
3307.. date: 2021-02-15-21-17-46
3308.. nonce: awc4yZ
3309.. section: Library
3310
3311Prohibit previously deprecated potentially disruptive operations on
3312:class:`asyncio.trsock.TransportSocket`. Patch by Illia Volochii.
3313
3314..
3315
3316.. bpo: 30077
3317.. date: 2021-02-04-23-16-03
3318.. nonce: v6TqAi
3319.. section: Library
3320
3321Added support for Apple's aifc/sowt pseudo-compression
3322
3323..
3324
3325.. bpo: 42971
3326.. date: 2021-02-02-20-11-14
3327.. nonce: OpVoFu
3328.. section: Library
3329
3330Add definition of ``errno.EQFULL`` for platforms that define this constant
3331(such as macOS).
3332
3333..
3334
3335.. bpo: 43086
3336.. date: 2021-01-31-18-24-54
3337.. nonce: 2_P-SH
3338.. section: Library
3339
3340Added a new optional :code:`strict_mode` parameter to *binascii.a2b_base64*.
3341When :code:`scrict_mode` is set to :code:`True`, the *a2b_base64* function
3342will accept only valid base64 content. More details about what "valid base64
3343content" is, can be found in the function's documentation.
3344
3345..
3346
3347.. bpo: 43024
3348.. date: 2021-01-25-21-24-55
3349.. nonce: vAUrIi
3350.. section: Library
3351
3352Improve the help signature of :func:`traceback.print_exception`,
3353:func:`traceback.format_exception` and
3354:func:`traceback.format_exception_only`.
3355
3356..
3357
3358.. bpo: 33809
3359.. date: 2021-01-16-18-36-00
3360.. nonce: BiMK6V
3361.. section: Library
3362
3363Add the :meth:`traceback.TracebackException.print` method which prints the
3364formatted exception information.
3365
3366..
3367
3368.. bpo: 42862
3369.. date: 2021-01-13-00-02-44
3370.. nonce: Z6ACLN
3371.. section: Library
3372
3373:mod:`sqlite3` now utilizes :meth:`functools.lru_cache` to implement the
3374connection statement cache. As a small optimisation, the default statement
3375cache size has been increased from 100 to 128. Patch by Erlend E. Aasland.
3376
3377..
3378
3379.. bpo: 41818
3380.. date: 2020-12-08-01-08-58
3381.. nonce: zO8vV7
3382.. section: Library
3383
3384Soumendra Ganguly: add termios.tcgetwinsize(), termios.tcsetwinsize().
3385
3386..
3387
3388.. bpo: 40497
3389.. date: 2020-10-18-09-42-53
3390.. nonce: CRz2sG
3391.. section: Library
3392
3393:meth:`subprocess.check_output` now raises :exc:`ValueError` when the
3394invalid keyword argument *check* is passed by user code. Previously such use
3395would fail later with a :exc:`TypeError`. Patch by Rémi Lapeyre.
3396
3397..
3398
3399.. bpo: 37449
3400.. date: 2020-10-11-20-23-48
3401.. nonce: f-t3V6
3402.. section: Library
3403
3404``ensurepip`` now uses ``importlib.resources.files()`` traversable APIs
3405
3406..
3407
3408.. bpo: 40956
3409.. date: 2020-10-01-21-46-34
3410.. nonce: _tvsZ7
3411.. section: Library
3412
3413Use Argument Clinic in :mod:`sqlite3`.  Patches by Erlend E. Aasland.
3414
3415..
3416
3417.. bpo: 41730
3418.. date: 2020-09-10-07-23-24
3419.. nonce: DyKFi9
3420.. section: Library
3421
3422``DeprecationWarning`` is now raised when importing :mod:`tkinter.tix`,
3423which has been deprecated in documentation since Python 3.6.
3424
3425..
3426
3427.. bpo: 20684
3428.. date: 2020-07-30-14-37-15
3429.. nonce: qV35GU
3430.. section: Library
3431
3432Remove unused ``_signature_get_bound_param`` function from :mod:`inspect` -
3433by Anthony Sottile.
3434
3435..
3436
3437.. bpo: 41402
3438.. date: 2020-07-26-18-17-30
3439.. nonce: YRkVkp
3440.. section: Library
3441
3442Fix :meth:`email.message.EmailMessage.set_content` when called with binary
3443data and ``7bit`` content transfer encoding.
3444
3445..
3446
3447.. bpo: 32695
3448.. date: 2020-07-13-23-46-59
3449.. nonce: tTqqXe
3450.. section: Library
3451
3452The *compresslevel* and *preset* keyword arguments of :func:`tarfile.open`
3453are now both documented and tested.
3454
3455..
3456
3457.. bpo: 41137
3458.. date: 2020-07-01-17-42-41
3459.. nonce: AnqbP-
3460.. section: Library
3461
3462Use utf-8 encoding while reading .pdbrc files. Patch by Srinivas Reddy
3463Thatiparthy
3464
3465..
3466
3467.. bpo: 24391
3468.. date: 2020-05-30-10-48-04
3469.. nonce: ZCTnhX
3470.. section: Library
3471
3472Improved reprs of :mod:`threading` synchronization objects:
3473:class:`~threading.Semaphore`, :class:`~threading.BoundedSemaphore`,
3474:class:`~threading.Event` and :class:`~threading.Barrier`.
3475
3476..
3477
3478.. bpo: 5846
3479.. date: 2020-05-25-23-58-29
3480.. nonce: O9BIfm
3481.. section: Library
3482
3483Deprecated the following :mod:`unittest` functions, scheduled for removal in
3484Python 3.13:
3485
3486* :func:`~unittest.findTestCases`
3487* :func:`~unittest.makeSuite`
3488* :func:`~unittest.getTestCaseNames`
3489
3490Use :class:`~unittest.TestLoader` methods instead:
3491
3492* :meth:`unittest.TestLoader.loadTestsFromModule`
3493* :meth:`unittest.TestLoader.loadTestsFromTestCase`
3494* :meth:`unittest.TestLoader.getTestCaseNames`
3495
3496Patch by Erlend E. Aasland.
3497
3498..
3499
3500.. bpo: 40563
3501.. date: 2020-05-21-01-42-32
3502.. nonce: fDn5bP
3503.. section: Library
3504
3505Support pathlike objects on dbm/shelve. Patch by Hakan Çelik and
3506Henry-Joseph Audéoud.
3507
3508..
3509
3510.. bpo: 34990
3511.. date: 2020-04-24-20-39-38
3512.. nonce: 3SmL9M
3513.. section: Library
3514
3515Fixed a Y2k38 bug in the compileall module where it would fail to compile
3516files with a modification time after the year 2038.
3517
3518..
3519
3520.. bpo: 39549
3521.. date: 2020-02-03-21-18-31
3522.. nonce: l4a8uH
3523.. section: Library
3524
3525Whereas the code for reprlib.Repr had previously used a hardcoded string
3526value of '...', this PR updates it to use of a “fillvalue” attribute, whose
3527value defaults to '...' and can be reset in either individual reprlib.Repr
3528instances or in subclasses thereof.
3529
3530..
3531
3532.. bpo: 37022
3533.. date: 2020-01-25-12-58-20
3534.. nonce: FUZI25
3535.. section: Library
3536
3537:mod:`pdb` now displays exceptions from ``repr()`` with its ``p`` and ``pp``
3538commands.
3539
3540..
3541
3542.. bpo: 38840
3543.. date: 2020-01-16-23-41-16
3544.. nonce: VzzYZz
3545.. section: Library
3546
3547Fix ``test___all__`` on platforms lacking a shared memory implementation.
3548
3549..
3550
3551.. bpo: 39359
3552.. date: 2020-01-16-13-54-28
3553.. nonce: hzTu0h
3554.. section: Library
3555
3556Add one missing check that the password is a bytes object for an encrypted
3557zipfile.
3558
3559..
3560
3561.. bpo: 38741
3562.. date: 2019-11-12-18-59-33
3563.. nonce: W7IYkq
3564.. section: Library
3565
3566:mod:`configparser`: using ']' inside a section header will no longer cut
3567the section name short at the ']'
3568
3569..
3570
3571.. bpo: 38415
3572.. date: 2019-10-08-14-08-59
3573.. nonce: N1bUw6
3574.. section: Library
3575
3576Added missing behavior to :func:`contextlib.asynccontextmanager` to match
3577:func:`contextlib.contextmanager` so decorated functions can themselves be
3578decorators.
3579
3580..
3581
3582.. bpo: 30256
3583.. date: 2019-09-25-13-54-41
3584.. nonce: wBkzox
3585.. section: Library
3586
3587Pass multiprocessing BaseProxy argument ``manager_owned`` through AutoProxy.
3588
3589..
3590
3591.. bpo: 27513
3592.. date: 2019-06-03-23-53-25
3593.. nonce: qITN7d
3594.. section: Library
3595
3596:func:`email.utils.getaddresses` now accepts :class:`email.header.Header`
3597objects along with string values. Patch by Zackery Spytz.
3598
3599..
3600
3601.. bpo: 16379
3602.. date: 2019-05-08-15-14-32
3603.. nonce: rN5JVe
3604.. section: Library
3605
3606Add SQLite error code and name to :mod:`sqlite3` exceptions. Patch by Aviv
3607Palivoda, Daniel Shahaf, and Erlend E. Aasland.
3608
3609..
3610
3611.. bpo: 26228
3612.. date: 2019-02-26-09-31-59
3613.. nonce: wyrHKc
3614.. section: Library
3615
3616pty.spawn no longer hangs on FreeBSD, macOS, and Solaris.
3617
3618..
3619
3620.. bpo: 33349
3621.. date: 2018-04-24-14-25-07
3622.. nonce: Y_0LIr
3623.. section: Library
3624
3625lib2to3 now recognizes async generators everywhere.
3626
3627..
3628
3629.. bpo: 29298
3630.. date: 2017-09-20-14-43-03
3631.. nonce: _78CSN
3632.. section: Library
3633
3634Fix ``TypeError`` when required subparsers without ``dest`` do not receive
3635arguments. Patch by Anthony Sottile.
3636
3637..
3638
3639.. bpo: 45216
3640.. date: 2021-09-18-13-45-19
3641.. nonce: o56nyt
3642.. section: Documentation
3643
3644Remove extra documentation listing methods in ``difflib``. It was rendering
3645twice in pydoc and was outdated in some places.
3646
3647..
3648
3649.. bpo: 45024
3650.. date: 2021-09-08-17-20-19
3651.. nonce: dkNPNi
3652.. section: Documentation
3653
3654:mod:`collections.abc` documentation has been expanded to explicitly cover
3655how instance and subclass checks work, with additional doctest examples and
3656an exhaustive list of ABCs which test membership purely by presence of the
3657right :term:`special method`\s. Patch by Raymond Hettinger.
3658
3659..
3660
3661.. bpo: 44957
3662.. date: 2021-08-19-15-53-08
3663.. nonce: imqrh3
3664.. section: Documentation
3665
3666Promote PEP 604 union syntax by using it where possible. Also, mention ``X |
3667Y`` more prominently in section about ``Union`` and mention ``X | None`` at
3668all in section about ``Optional``.
3669
3670..
3671
3672.. bpo: 16580
3673.. date: 2021-08-13-20-17-59
3674.. nonce: MZ_iK9
3675.. section: Documentation
3676
3677Added code equivalents for the :meth:`int.to_bytes` and
3678:meth:`int.from_bytes` methods, as well as tests ensuring that these code
3679equivalents are valid.
3680
3681..
3682
3683.. bpo: 44903
3684.. date: 2021-08-13-19-08-03
3685.. nonce: aJuvQF
3686.. section: Documentation
3687
3688Removed the othergui.rst file, any references to it, and the list of GUI
3689frameworks in the FAQ. In their place I've added links to the Python Wiki
3690`page on GUI frameworks <https://wiki.python.org/moin/GuiProgramming>`.
3691
3692..
3693
3694.. bpo: 33479
3695.. date: 2021-08-11-18-02-06
3696.. nonce: rCe4c5
3697.. section: Documentation
3698
3699Tkinter documentation has been greatly expanded with new "Architecture" and
3700"Threading model" sections.
3701
3702..
3703
3704.. bpo: 36700
3705.. date: 2021-08-09-19-58-45
3706.. nonce: WPNW5f
3707.. section: Documentation
3708
3709:mod:`base64` RFC references were updated to point to :rfc:`4648`; a section
3710was added to point users to the new "security considerations" section of the
3711RFC.
3712
3713..
3714
3715.. bpo: 44740
3716.. date: 2021-07-26-23-48-31
3717.. nonce: zMFGMV
3718.. section: Documentation
3719
3720Replaced occurrences of uppercase "Web" and "Internet" with lowercase
3721versions per the 2016 revised Associated Press Style Book.
3722
3723..
3724
3725.. bpo: 44693
3726.. date: 2021-07-25-23-04-15
3727.. nonce: JuCbNq
3728.. section: Documentation
3729
3730Update the definition of __future__ in the glossary by replacing the
3731confusing word "pseudo-module" with a more accurate description.
3732
3733..
3734
3735.. bpo: 35183
3736.. date: 2021-07-22-08-28-03
3737.. nonce: p9BWTB
3738.. section: Documentation
3739
3740Add typical examples to os.path.splitext docs
3741
3742..
3743
3744.. bpo: 30511
3745.. date: 2021-07-20-21-03-18
3746.. nonce: eMFkRi
3747.. section: Documentation
3748
3749Clarify that :func:`shutil.make_archive` is not thread-safe due to reliance
3750on changing the current working directory.
3751
3752..
3753
3754.. bpo: 44561
3755.. date: 2021-07-18-22-43-14
3756.. nonce: T7HpWm
3757.. section: Documentation
3758
3759Update of three expired hyperlinks in Doc/distributing/index.rst: "Project
3760structure", "Building and packaging the project", and "Uploading the project
3761to the Python Packaging Index".
3762
3763..
3764
3765.. bpo: 44651
3766.. date: 2021-07-18-22-26-02
3767.. nonce: SjT9iY
3768.. section: Documentation
3769
3770Delete entry "coercion" in Doc/glossary.rst for its outdated definition.
3771
3772..
3773
3774.. bpo: 42958
3775.. date: 2021-07-15-11-19-03
3776.. nonce: gC5IHM
3777.. section: Documentation
3778
3779Updated the docstring and docs of :func:`filecmp.cmp` to be more accurate
3780and less confusing especially in respect to *shallow* arg.
3781
3782..
3783
3784.. bpo: 44631
3785.. date: 2021-07-13-22-25-13
3786.. nonce: qkGwe4
3787.. section: Documentation
3788
3789Refactored the ``repr()`` code of the ``_Environ`` (os module).
3790
3791..
3792
3793.. bpo: 44613
3794.. date: 2021-07-12-11-39-20
3795.. nonce: DIXNzc
3796.. section: Documentation
3797
3798importlib.metadata is no longer provisional.
3799
3800..
3801
3802.. bpo: 44558
3803.. date: 2021-07-03-18-25-17
3804.. nonce: 0pTknl
3805.. section: Documentation
3806
3807Match the docstring and python implementation of :func:`~operator.countOf`
3808to the behavior of its c implementation.
3809
3810..
3811
3812.. bpo: 44544
3813.. date: 2021-07-02-14-02-29
3814.. nonce: _5_aCz
3815.. section: Documentation
3816
3817List all kwargs for :func:`textwrap.wrap`, :func:`textwrap.fill`, and
3818:func:`textwrap.shorten`. Now, there are nav links to attributes of
3819:class:`TextWrap`, which makes navigation much easier while minimizing
3820duplication in the documentation.
3821
3822..
3823
3824.. bpo: 38062
3825.. date: 2021-06-28-12-13-48
3826.. nonce: 9Ehp9O
3827.. section: Documentation
3828
3829Clarify that atexit uses equality comparisons internally.
3830
3831..
3832
3833.. bpo: 40620
3834.. date: 2021-06-26-17-41-06
3835.. nonce: PAYDrB
3836.. section: Documentation
3837
3838Convert examples in tutorial controlflow.rst section 4.3 to be
3839interpreter-demo style.
3840
3841..
3842
3843.. bpo: 43066
3844.. date: 2021-06-24-14-37-16
3845.. nonce: Ti7ahX
3846.. section: Documentation
3847
3848Added a warning to :mod:`zipfile` docs: filename arg with a leading slash
3849may cause archive to be un-openable on Windows systems.
3850
3851..
3852
3853.. bpo: 39452
3854.. date: 2021-06-23-15-21-36
3855.. nonce: o_I-6d
3856.. section: Documentation
3857
3858Rewrote ``Doc/library/__main__.rst``. Broadened scope of the document to
3859explicitly discuss and differentiate between ``__main__.py`` in packages
3860versus the ``__name__ == '__main__'`` expression (and the idioms that
3861surround it).
3862
3863..
3864
3865.. bpo: 13814
3866.. date: 2021-06-21-15-46-32
3867.. nonce: LDcslu
3868.. section: Documentation
3869
3870In the Design FAQ, answer "Why don't generators support the with statement?"
3871
3872..
3873
3874.. bpo: 27752
3875.. date: 2021-06-18-18-04-53
3876.. nonce: NEByNk
3877.. section: Documentation
3878
3879Documentation of csv.Dialect is more descriptive.
3880
3881..
3882
3883.. bpo: 44453
3884.. date: 2021-06-18-06-44-45
3885.. nonce: 3PIkj2
3886.. section: Documentation
3887
3888Fix documentation for the return type of :func:`sysconfig.get_path`.
3889
3890..
3891
3892.. bpo: 44392
3893.. date: 2021-06-16-18-09-49
3894.. nonce: 6RF1Sc
3895.. section: Documentation
3896
3897Added a new section in the C API documentation for types used in type
3898hinting.  Documented ``Py_GenericAlias`` and ``Py_GenericAliasType``.
3899
3900..
3901
3902.. bpo: 38291
3903.. date: 2021-06-14-09-20-37
3904.. nonce: VMYa_Q
3905.. section: Documentation
3906
3907Mark ``typing.io`` and ``typing.re`` as deprecated since Python 3.8 in the
3908documentation. They were never properly supported by type checkers.
3909
3910..
3911
3912.. bpo: 44322
3913.. date: 2021-06-06-14-12-00
3914.. nonce: K0PHfE
3915.. section: Documentation
3916
3917Document that SyntaxError args have a details tuple and that details are
3918adjusted for errors in f-string field replacement expressions.
3919
3920..
3921
3922.. bpo: 42392
3923.. date: 2021-05-26-11-16-33
3924.. nonce: oxRx6E
3925.. section: Documentation
3926
3927Document the deprecation and removal of the ``loop`` parameter for many
3928functions and classes in :mod:`asyncio`.
3929
3930..
3931
3932.. bpo: 44195
3933.. date: 2021-05-23-09-11-28
3934.. nonce: 1bqkOs
3935.. section: Documentation
3936
3937Corrected references to ``TraversableResources`` in docs. There is no
3938``TraversableReader``.
3939
3940..
3941
3942.. bpo: 41963
3943.. date: 2021-05-17-20-03-47
3944.. nonce: eUz9_o
3945.. section: Documentation
3946
3947Document that ``ConfigParser`` strips off comments when reading
3948configuration files.
3949
3950..
3951
3952.. bpo: 44072
3953.. date: 2021-05-08-09-48-05
3954.. nonce: fb2x5I
3955.. section: Documentation
3956
3957Correct where in the numeric ABC hierarchy ``**`` support is added, i.e., in
3958numbers.Complex, not numbers.Integral.
3959
3960..
3961
3962.. bpo: 43558
3963.. date: 2021-05-07-12-27-09
3964.. nonce: UGhA8R
3965.. section: Documentation
3966
3967Add the remark to :mod:`dataclasses` documentation that the :meth:`__init__`
3968of any base class has to be called in :meth:`__post_init__`, along with a
3969code example.
3970
3971..
3972
3973.. bpo: 44025
3974.. date: 2021-05-03-22-08-08
3975.. nonce: gcB7iP
3976.. section: Documentation
3977
3978Clarify when '_' in match statements is a keyword, and when not.
3979
3980..
3981
3982.. bpo: 41706
3983.. date: 2020-09-03-13-37-19
3984.. nonce: _zXWOR
3985.. section: Documentation
3986
3987Fix docs about how methods like ``__add__`` are invoked when evaluating
3988operator expressions.
3989
3990..
3991
3992.. bpo: 41621
3993.. date: 2020-08-24-13-35-04
3994.. nonce: nqaw9G
3995.. section: Documentation
3996
3997Document that :class:`collections.defaultdict` parameter ``default_factory``
3998defaults to None and is positional-only.
3999
4000..
4001
4002.. bpo: 41576
4003.. date: 2020-08-21-22-59-37
4004.. nonce: 7a6CQR
4005.. section: Documentation
4006
4007document BaseException in favor of bare except
4008
4009..
4010
4011.. bpo: 21760
4012.. date: 2020-03-21-01-19-28
4013.. nonce: CqofIc
4014.. section: Documentation
4015
4016The description for __file__ fixed. Patch by Furkan Onder
4017
4018..
4019
4020.. bpo: 39498
4021.. date: 2020-01-30-05-18-48
4022.. nonce: Nu3sFL
4023.. section: Documentation
4024
4025Add a "Security Considerations" index which links to standard library
4026modules that have explicitly documented security considerations.
4027
4028..
4029
4030.. bpo: 33479
4031.. date: 2018-05-19-15-59-29
4032.. nonce: 4cLlxo
4033.. section: Documentation
4034
4035Remove the unqualified claim that tkinter is threadsafe. It has not been
4036true for several years and likely never was. An explanation of what is true
4037may be added later, after more discussion, and possibly after patching
4038_tkinter.c,
4039
4040..
4041
4042.. bpo: 40173
4043.. date: 2021-09-30-16-54-39
4044.. nonce: J_slCw
4045.. section: Tests
4046
4047Fix :func:`test.support.import_helper.import_fresh_module`.
4048
4049..
4050
4051.. bpo: 45280
4052.. date: 2021-09-25-11-05-31
4053.. nonce: 3MA6lC
4054.. section: Tests
4055
4056Add a test case for empty :class:`typing.NamedTuple`.
4057
4058..
4059
4060.. bpo: 45269
4061.. date: 2021-09-24-10-41-49
4062.. nonce: 8jKEr8
4063.. section: Tests
4064
4065Cover case when invalid ``markers`` type is supplied to ``c_make_encoder``.
4066
4067..
4068
4069.. bpo: 45128
4070.. date: 2021-09-16-17-22-35
4071.. nonce: Jz6fl2
4072.. section: Tests
4073
4074Fix ``test_multiprocessing_fork`` failure due to ``test_logging`` and
4075``sys.modules`` manipulation.
4076
4077..
4078
4079.. bpo: 45209
4080.. date: 2021-09-15-23-32-39
4081.. nonce: 55ntL5
4082.. section: Tests
4083
4084Fix ``UserWarning: resource_tracker`` warning in
4085``_test_multiprocessing._TestSharedMemory.test_shared_memory_cleaned_after_process_termination``
4086
4087..
4088
4089.. bpo: 45185
4090.. date: 2021-09-14-14-54-04
4091.. nonce: qFx5I6
4092.. section: Tests
4093
4094Enables ``TestEnumerations`` test cases in ``test_ssl`` suite.
4095
4096..
4097
4098.. bpo: 45195
4099.. date: 2021-09-14-13-16-18
4100.. nonce: EyQR1G
4101.. section: Tests
4102
4103Fix test_readline.test_nonascii(): sometimes, the newline character is not
4104written at the end, so don't expect it in the output. Patch by Victor
4105Stinner.
4106
4107..
4108
4109.. bpo: 45156
4110.. date: 2021-09-13-00-28-17
4111.. nonce: 8oomV3
4112.. section: Tests
4113
4114Fixes infinite loop on :func:`unittest.mock.seal` of mocks created by
4115:func:`~unittest.create_autospec`.
4116
4117..
4118
4119.. bpo: 45125
4120.. date: 2021-09-11-22-08-18
4121.. nonce: FVSzs2
4122.. section: Tests
4123
4124Improves pickling tests and docs of ``SharedMemory`` and ``SharableList``
4125objects.
4126
4127..
4128
4129.. bpo: 44860
4130.. date: 2021-09-08-13-01-37
4131.. nonce: qXd0kx
4132.. section: Tests
4133
4134Update ``test_sysconfig.test_user_similar()`` for the posix_user scheme:
4135``platlib`` doesn't use :data:`sys.platlibdir`. Patch by Victor Stinner.
4136
4137..
4138
4139.. bpo: 45052
4140.. date: 2021-09-06-19-00-29
4141.. nonce: yrOK3J
4142.. section: Tests
4143
4144``WithProcessesTestSharedMemory.test_shared_memory_basics`` test was
4145ignored, because ``self.assertEqual(sms.size, sms2.size)`` line was failing.
4146It is now removed and test is unskipped.
4147
4148The main motivation for this line to be removed from the test is that the
4149``size`` of ``SharedMemory`` is not ever guaranteed to be the same. It is
4150decided by the platform.
4151
4152..
4153
4154.. bpo: 44895
4155.. date: 2021-09-01-17-17-44
4156.. nonce: kV7H77
4157.. section: Tests
4158
4159libregrtest now clears the type cache later to reduce the risk of false
4160alarm when checking for reference leaks. Previously, the type cache was
4161cleared too early and libregrtest raised a false alarm about reference leaks
4162under very specific conditions. Patch by Irit Katriel and Victor Stinner.
4163
4164..
4165
4166.. bpo: 45042
4167.. date: 2021-08-30-11-54-14
4168.. nonce: QMz3X8
4169.. section: Tests
4170
4171Fixes that test classes decorated with
4172``@hashlib_helper.requires_hashdigest`` were skipped all the time.
4173
4174..
4175
4176.. bpo: 25130
4177.. date: 2021-08-27-22-37-19
4178.. nonce: ig4oJe
4179.. section: Tests
4180
4181Add calls of :func:`gc.collect` in tests to support PyPy.
4182
4183..
4184
4185.. bpo: 45011
4186.. date: 2021-08-26-14-20-44
4187.. nonce: mQZdXU
4188.. section: Tests
4189
4190Made tests relying on the :mod:`_asyncio` C extension module optional to
4191allow running on alternative Python implementations. Patch by Serhiy
4192Storchaka.
4193
4194..
4195
4196.. bpo: 44949
4197.. date: 2021-08-18-18-30-12
4198.. nonce: VE5ENv
4199.. section: Tests
4200
4201Fix auto history tests of test_readline: sometimes, the newline character is
4202not written at the end, so don't expect it in the output.
4203
4204..
4205
4206.. bpo: 44891
4207.. date: 2021-08-13-12-11-06
4208.. nonce: T9_mBT
4209.. section: Tests
4210
4211Tests were added to clarify :func:`id` is preserved when ``obj * 1`` is used
4212on :class:`str` and :class:`bytes` objects. Patch by Nikita Sobolev.
4213
4214..
4215
4216.. bpo: 44852
4217.. date: 2021-08-06-18-36-04
4218.. nonce: sUL8YX
4219.. section: Tests
4220
4221Add ability to wholesale silence DeprecationWarnings while running the
4222regression test suite.
4223
4224..
4225
4226.. bpo: 40928
4227.. date: 2021-08-06-00-07-15
4228.. nonce: aIwb6G
4229.. section: Tests
4230
4231Notify users running test_decimal regression tests on macOS of potential
4232harmless "malloc can't allocate region" messages spewed by test_decimal.
4233
4234..
4235
4236.. bpo: 44734
4237.. date: 2021-07-24-20-09-15
4238.. nonce: KKsNOV
4239.. section: Tests
4240
4241Fixed floating point precision issue in turtle tests.
4242
4243..
4244
4245.. bpo: 44708
4246.. date: 2021-07-22-16-38-39
4247.. nonce: SYNaac
4248.. section: Tests
4249
4250Regression tests, when run with -w, are now re-running only the affected
4251test methods instead of re-running the entire test file.
4252
4253..
4254
4255.. bpo: 42095
4256.. date: 2021-07-17-11-41-20
4257.. nonce: kCB7oj
4258.. section: Tests
4259
4260Added interop tests for Apple plists: generate plist files with Python
4261plistlib and parse with Apple plutil; and the other way round.
4262
4263..
4264
4265.. bpo: 44647
4266.. date: 2021-07-16-14-02-33
4267.. nonce: 5LzqIy
4268.. section: Tests
4269
4270Added a permanent Unicode-valued environment variable to regression tests to
4271ensure they handle this use case in the future. If your test environment
4272breaks because of that, report a bug to us, and temporarily set
4273PYTHONREGRTEST_UNICODE_GUARD=0 in your test environment.
4274
4275..
4276
4277.. bpo: 44515
4278.. date: 2021-06-26-18-37-36
4279.. nonce: e9fO6f
4280.. section: Tests
4281
4282Adjust recently added contextlib tests to avoid assuming the use of a
4283refcounted GC
4284
4285..
4286
4287.. bpo: 44287
4288.. date: 2021-06-21-17-53-41
4289.. nonce: YON57s
4290.. section: Tests
4291
4292Fix asyncio test_popen() of test_windows_utils by using a longer timeout.
4293Use military grade battle-tested :data:`test.support.SHORT_TIMEOUT` timeout
4294rather than a hardcoded timeout of 10 seconds: it's 30 seconds by default,
4295but it is made longer on slow buildbots. Patch by Victor Stinner.
4296
4297..
4298
4299.. bpo: 44451
4300.. date: 2021-06-18-15-19-35
4301.. nonce: aj5pqE
4302.. section: Tests
4303
4304Reset ``DeprecationWarning`` filters in
4305``test.test_importlib.test_metadata_api.APITests.test_entry_points_by_index``
4306to avoid ``StopIteration`` error if ``DeprecationWarnings`` are ignored.
4307
4308..
4309
4310.. bpo: 44363
4311.. date: 2021-06-10-11-19-43
4312.. nonce: -K9jD0
4313.. section: Tests
4314
4315Account for address sanitizer in test_capi. test_capi now passes when run
4316GCC address sanitizer.
4317
4318..
4319
4320.. bpo: 44364
4321.. date: 2021-06-09-15-32-05
4322.. nonce: zu9Zee
4323.. section: Tests
4324
4325Add non integral tests for :func:`math.sqrt` function.
4326
4327..
4328
4329.. bpo: 43921
4330.. date: 2021-06-03-03-29-34
4331.. nonce: nwH1FS
4332.. section: Tests
4333
4334Fix test_ssl.test_wrong_cert_tls13(): use ``suppress_ragged_eofs=False``,
4335since ``read()`` can raise :exc:`ssl.SSLEOFError` on Windows. Patch by
4336Victor Stinner.
4337
4338..
4339
4340.. bpo: 43921
4341.. date: 2021-06-02-17-41-42
4342.. nonce: xP7yZ4
4343.. section: Tests
4344
4345Fix test_pha_required_nocert() of test_ssl: catch two more EOF cases (when
4346the ``recv()`` method returns an empty string). Patch by Victor Stinner.
4347
4348..
4349
4350.. bpo: 44131
4351.. date: 2021-05-14-14-13-44
4352.. nonce: YPizoC
4353.. section: Tests
4354
4355Add test_frozenmain to test_embed to test the :c:func:`Py_FrozenMain` C
4356function. Patch by Victor Stinner.
4357
4358..
4359
4360.. bpo: 31904
4361.. date: 2021-05-07-15-46-04
4362.. nonce: 8dk3la
4363.. section: Tests
4364
4365Ignore error string case in test_file_not_exists().
4366
4367..
4368
4369.. bpo: 42083
4370.. date: 2021-05-04-18-10-57
4371.. nonce: EMS2TK
4372.. section: Tests
4373
4374Add test to check that ``PyStructSequence_NewType`` accepts a
4375``PyStructSequence_Desc`` with ``doc`` field set to ``NULL``.
4376
4377..
4378
4379.. bpo: 35753
4380.. date: 2020-10-25-19-20-26
4381.. nonce: 2LT-hO
4382.. section: Tests
4383
4384Fix crash in doctest when doctest parses modules that include unwrappable
4385functions by skipping those functions.
4386
4387..
4388
4389.. bpo: 30256
4390.. date: 2019-09-25-18-10-10
4391.. nonce: A5i76Q
4392.. section: Tests
4393
4394Add test for nested queues when using ``multiprocessing`` shared objects
4395``AutoProxy[Queue]`` inside ``ListProxy`` and ``DictProxy``
4396
4397..
4398
4399.. bpo: 45220
4400.. date: 2021-09-16-18-00-43
4401.. nonce: TgbkvW
4402.. section: Build
4403
4404Avoid building with the Windows 11 SDK previews automatically. This may be
4405overridden by setting the ``DefaultWindowsSDKVersion`` environment variable
4406before building.
4407
4408..
4409
4410.. bpo: 45020
4411.. date: 2021-09-14-10-07-23
4412.. nonce: _VGGPv
4413.. section: Build
4414
4415Freeze stdlib modules that are imported during startup.  This provides
4416significant performance improvements to startup.  If necessary, use the
4417previously added "-X frozen_modules=off" commandline option to force
4418importing the source modules.
4419
4420..
4421
4422.. bpo: 45188
4423.. date: 2021-09-14-00-47-57
4424.. nonce: MNbo_T
4425.. section: Build
4426
4427Windows builds now regenerate frozen modules as the first part of the build.
4428Previously the regeneration was later in the build, which would require it
4429to be restarted if any modules had changed.
4430
4431..
4432
4433.. bpo: 45163
4434.. date: 2021-09-11-06-05-23
4435.. nonce: q7xT93
4436.. section: Build
4437
4438Fixes Haiku platform build.
4439
4440..
4441
4442.. bpo: 45067
4443.. date: 2021-09-09-16-45-26
4444.. nonce: mFmY92
4445.. section: Build
4446
4447The ncurses function extended_color_content was introduced in 2017
4448
4449(https://invisible-island.net/ncurses/NEWS.html#index-t20170401).  The
4450
4451ncurses-devel package in CentOS 7 had a older version ncurses resulted in
4452compilation error.  For compiling ncurses with extended color support, we
4453verify the version of the ncurses library >= 20170401.
4454
4455..
4456
4457.. bpo: 45019
4458.. date: 2021-08-26-13-10-46
4459.. nonce: e0mo49
4460.. section: Build
4461
4462Generate lines in relevant files for frozen modules.  Up until now each of
4463the files had to be edited manually.  This change makes it easier to add to
4464and modify the frozen modules.
4465
4466..
4467
4468.. bpo: 44340
4469.. date: 2021-07-19-01-09-56
4470.. nonce: JNeOf4
4471.. section: Build
4472
4473Add support for building with clang thin lto via --with-lto=thin/full. Patch
4474by Dong-hee Na and Brett Holman.
4475
4476..
4477
4478.. bpo: 44535
4479.. date: 2021-06-30-02-32-46
4480.. nonce: M9iN4-
4481.. section: Build
4482
4483Enable building using a Visual Studio 2022 install on Windows.
4484
4485..
4486
4487.. bpo: 43298
4488.. date: 2021-06-19-11-50-03
4489.. nonce: 9ircMb
4490.. section: Build
4491
4492Improved error message when building without a Windows SDK installed.
4493
4494..
4495
4496.. bpo: 44381
4497.. date: 2021-06-10-18-08-44
4498.. nonce: Xpc1iX
4499.. section: Build
4500
4501The Windows build now accepts :envvar:`EnableControlFlowGuard` set to
4502``guard`` to enable CFG.
4503
4504..
4505
4506.. bpo: 41282
4507.. date: 2021-05-24-03-31-17
4508.. nonce: L8nP44
4509.. section: Build
4510
4511Fix broken ``make install`` that caused standard library extension modules
4512to be unnecessarily and incorrectly rebuilt during the install phase of
4513cpython.
4514
4515..
4516
4517.. bpo: 45375
4518.. date: 2021-10-05-12-41-53
4519.. nonce: CohPP-
4520.. section: Windows
4521
4522Fixes an assertion failure due to searching for the standard library in
4523unnormalised paths.
4524
4525..
4526
4527.. bpo: 45022
4528.. date: 2021-09-03-18-05-21
4529.. nonce: bgpD_r
4530.. section: Windows
4531
4532Update Windows release to include libffi 3.4.2
4533
4534..
4535
4536.. bpo: 45007
4537.. date: 2021-08-27-23-50-02
4538.. nonce: NIBlVG
4539.. section: Windows
4540
4541Update to OpenSSL 1.1.1l in Windows build
4542
4543..
4544
4545.. bpo: 44848
4546.. date: 2021-08-06-10-11-07
4547.. nonce: ib3Jcz
4548.. section: Windows
4549
4550Upgrade Windows installer to use SQLite 3.36.0.
4551
4552..
4553
4554.. bpo: 44572
4555.. date: 2021-07-13-15-32-49
4556.. nonce: gXvhDc
4557.. section: Windows
4558
4559Avoid consuming standard input in the :mod:`platform` module
4560
4561..
4562
4563.. bpo: 44582
4564.. date: 2021-07-07-21-07-18
4565.. nonce: 4Mm6Hh
4566.. section: Windows
4567
4568Accelerate speed of :mod:`mimetypes` initialization using a native
4569implementation of the registry scan.
4570
4571..
4572
4573.. bpo: 41299
4574.. date: 2021-06-06-16-36-13
4575.. nonce: Rg-vb_
4576.. section: Windows
4577
4578Fix 16 milliseconds jitter when using timeouts in :mod:`threading`, such as
4579with :meth:`threading.Lock.acquire` or :meth:`threading.Condition.wait`.
4580
4581..
4582
4583.. bpo: 42686
4584.. date: 2021-01-01-21-21-03
4585.. nonce: G_f-TC
4586.. section: Windows
4587
4588Build :mod:`sqlite3` with math functions enabled. Patch by Erlend E.
4589Aasland.
4590
4591..
4592
4593.. bpo: 40263
4594.. date: 2020-04-13-15-20-28
4595.. nonce: 1KKEbu
4596.. section: Windows
4597
4598This is a follow-on bug from https://bugs.python.org/issue26903. Once that
4599is applied we run into an off-by-one assertion problem. The assert was not
4600correct.
4601
4602..
4603
4604.. bpo: 45007
4605.. date: 2021-08-30-00-04-10
4606.. nonce: pixqUB
4607.. section: macOS
4608
4609Update macOS installer builds to use OpenSSL 1.1.1l.
4610
4611..
4612
4613.. bpo: 34602
4614.. date: 2021-08-27-16-55-10
4615.. nonce: ZjHsYJ
4616.. section: macOS
4617
4618When building CPython on macOS with ``./configure
4619--with-undefined-behavior-sanitizer --with-pydebug``, the stack size is now
4620quadrupled to allow for the entire test suite to pass.
4621
4622..
4623
4624.. bpo: 44848
4625.. date: 2021-08-06-10-08-41
4626.. nonce: 0uYXsE
4627.. section: macOS
4628
4629Update macOS installer to use SQLite 3.36.0.
4630
4631..
4632
4633.. bpo: 44689
4634.. date: 2021-07-20-22-27-01
4635.. nonce: mmT_xH
4636.. section: macOS
4637
4638:meth:`ctypes.util.find_library` now works correctly on macOS 11 Big Sur
4639even if Python is built on an older version of macOS.  Previously, when
4640built on older macOS systems, ``find_library`` was not able to find  macOS
4641system libraries when running on Big Sur due to changes in  how system
4642libraries are stored.
4643
4644..
4645
4646.. bpo: 41972
4647.. date: 2021-07-12-15-42-02
4648.. nonce: yUjE8j
4649.. section: macOS
4650
4651The framework build's user header path in sysconfig is changed to add a
4652'pythonX.Y' component to match distutils's behavior.
4653
4654..
4655
4656.. bpo: 43109
4657.. date: 2021-05-24-21-15-41
4658.. nonce: npKJ9c
4659.. section: macOS
4660
4661Allow --with-lto configure option to work with Apple-supplied Xcode or
4662Command Line Tools.
4663
4664..
4665
4666.. bpo: 34932
4667.. date: 2021-03-29-21-11-23
4668.. nonce: f3Hdyd
4669.. section: macOS
4670
4671Add socket.TCP_KEEPALIVE support for macOS. Patch by Shane Harvey.
4672
4673..
4674
4675.. bpo: 45296
4676.. date: 2021-09-27-01-21-59
4677.. nonce: 9H8rdY
4678.. section: IDLE
4679
4680On Windows, change exit/quit message to suggest Ctrl-D, which works, instead
4681of <Ctrl-Z Return>, which does not work in IDLE.
4682
4683..
4684
4685.. bpo: 45193
4686.. date: 2021-09-15-03-20-06
4687.. nonce: G61_GV
4688.. section: IDLE
4689
4690Make completion boxes appear on Ubuntu again.
4691
4692..
4693
4694.. bpo: 40128
4695.. date: 2021-06-11-17-43-39
4696.. nonce: 7vDN3U
4697.. section: IDLE
4698
4699Mostly fix completions on macOS when not using tcl/tk 8.6.11 (as with 3.9).
4700The added update_idletask call should be harmless and possibly helpful
4701otherwise.
4702
4703..
4704
4705.. bpo: 33962
4706.. date: 2021-06-10-00-50-02
4707.. nonce: ikAUNg
4708.. section: IDLE
4709
4710Move the indent space setting from the Font tab to the new Windows tab.
4711Patch by Mark Roseman and Terry Jan Reedy.
4712
4713..
4714
4715.. bpo: 40468
4716.. date: 2021-06-08-03-04-51
4717.. nonce: tUCGUb
4718.. section: IDLE
4719
4720Split the settings dialog General tab into Windows and Shell/ED tabs. Move
4721help sources, which extend the Help menu, to the Extensions tab. Make space
4722for new options and shorten the dialog. The latter makes the dialog better
4723fit small screens.
4724
4725..
4726
4727.. bpo: 41611
4728.. date: 2021-05-27-18-22-46
4729.. nonce: jOKpfc
4730.. section: IDLE
4731
4732Avoid uncaught exceptions in ``AutoCompleteWindow.winconfig_event()``.
4733
4734..
4735
4736.. bpo: 41611
4737.. date: 2021-05-27-13-39-43
4738.. nonce: liNQqj
4739.. section: IDLE
4740
4741Fix IDLE sometimes freezing upon tab-completion on macOS.
4742
4743..
4744
4745.. bpo: 44010
4746.. date: 2021-05-09-09-02-09
4747.. nonce: TaLe9x
4748.. section: IDLE
4749
4750Highlight the new :ref:`match <match>` statement's :ref:`soft keywords
4751<soft-keywords>`: :keyword:`match`, :keyword:`case <match>`, and :keyword:`_
4752<wildcard-patterns>`. However, this highlighting is not perfect and will be
4753incorrect in some rare cases, including some ``_``-s in ``case`` patterns.
4754
4755..
4756
4757.. bpo: 44026
4758.. date: 2021-05-05-09-45-24
4759.. nonce: m2Z0zR
4760.. section: IDLE
4761
4762Include interpreter's typo fix suggestions in message line for NameErrors
4763and AttributeErrors.  Patch by E. Paine.
4764
4765..
4766
4767.. bpo: 44786
4768.. date: 2021-09-14-11-44-26
4769.. nonce: DU0LC0
4770.. section: Tools/Demos
4771
4772Fix a warning in regular expression in the c-analyzer script.
4773
4774..
4775
4776.. bpo: 44967
4777.. date: 2021-08-26-11-57-31
4778.. nonce: UT1RMV
4779.. section: Tools/Demos
4780
4781pydoc now returns a non-zero status code when a module cannot be found.
4782
4783..
4784
4785.. bpo: 44978
4786.. date: 2021-08-22-11-45-31
4787.. nonce: QupKV3
4788.. section: Tools/Demos
4789
4790Allow the Argument Clinic tool to handle ``__complex__`` special methods.
4791
4792..
4793
4794.. bpo: 43425
4795.. date: 2021-07-01-22-21-25
4796.. nonce: t65len
4797.. section: Tools/Demos
4798
4799Removed the 'test2to3' demo project that demonstrated using lib2to3 to
4800support Python 2.x and Python 3.x from a single source in a distutils
4801package. Patch by Dong-hee Na
4802
4803..
4804
4805.. bpo: 44074
4806.. date: 2021-05-08-13-57-00
4807.. nonce: F09kCK
4808.. section: Tools/Demos
4809
4810Make patchcheck automatically detect the correct base branch name
4811(previously it was hardcoded to 'master')
4812
4813..
4814
4815.. bpo: 20291
4816.. date: 2020-02-25-18-22-09
4817.. nonce: AyrDiZ
4818.. section: Tools/Demos
4819
4820Added support for variadic positional parameters in Argument Clinic.
4821
4822..
4823
4824.. bpo: 41710
4825.. date: 2021-09-30-03-14-35
4826.. nonce: DDWJKx
4827.. section: C API
4828
4829The PyThread_acquire_lock_timed() function now clamps the timeout if it is
4830too large, rather than aborting the process. Patch by Victor Stinner.
4831
4832..
4833
4834.. bpo: 44687
4835.. date: 2021-09-19-17-18-25
4836.. nonce: 3fqDRC
4837.. section: C API
4838
4839:meth:`BufferedReader.peek` no longer raises :exc:`ValueError` when the
4840entire file has already been buffered.
4841
4842..
4843
4844.. bpo: 45116
4845.. date: 2021-09-16-18-05-20
4846.. nonce: WxXewl
4847.. section: C API
4848
4849Add the :c:macro:`Py_ALWAYS_INLINE` macro to ask the compiler to always
4850inline a static inline function. The compiler can ignore it and decides to
4851not inline the function. Patch by Victor Stinner.
4852
4853..
4854
4855.. bpo: 45094
4856.. date: 2021-09-03-15-53-43
4857.. nonce: tinXwL
4858.. section: C API
4859
4860Add the :c:macro:`Py_NO_INLINE` macro to disable inlining on a function.
4861Patch by Victor Stinner.
4862
4863..
4864
4865.. bpo: 45061
4866.. date: 2021-08-31-15-21-36
4867.. nonce: ZH0HVe
4868.. section: C API
4869
4870Add a deallocator to the :class:`bool` type to detect refcount bugs in C
4871extensions which call ``Py_DECREF(Py_True);`` or ``Py_DECREF(Py_False);`` by
4872mistake. Patch by Victor Stinner.
4873
4874..
4875
4876.. bpo: 42035
4877.. date: 2021-08-02-20-49-36
4878.. nonce: HTBcZt
4879.. section: C API
4880
4881Add a new :c:func:`PyType_GetQualName` function to get type's qualified
4882name.
4883
4884..
4885
4886.. bpo: 41103
4887.. date: 2021-07-29-16-04-28
4888.. nonce: hiKKcF
4889.. section: C API
4890
4891Reverts removal of the old buffer protocol because they are part of stable
4892ABI.
4893
4894..
4895
4896.. bpo: 44751
4897.. date: 2021-07-27-17-29-12
4898.. nonce: 4qmbDG
4899.. section: C API
4900
4901Remove ``crypt.h`` include from the public ``Python.h`` header.
4902
4903..
4904
4905.. bpo: 42747
4906.. date: 2021-07-20-16-21-06
4907.. nonce: rRxjUY
4908.. section: C API
4909
4910The ``Py_TPFLAGS_HAVE_VERSION_TAG`` type flag now does nothing. The
4911``Py_TPFLAGS_HAVE_AM_SEND`` flag (which was added in 3.10) is removed. Both
4912were unnecessary because it is not possible to have type objects with the
4913relevant fields missing.
4914
4915..
4916
4917.. bpo: 44530
4918.. date: 2021-06-28-23-44-47
4919.. nonce: qij7YC
4920.. section: C API
4921
4922Added the ``co_qualname`` to the ``PyCodeObject`` structure to propagate the
4923qualified name from the compiler to code objects.
4924
4925Patch by Gabriele N. Tornetta
4926
4927..
4928
4929.. bpo: 44441
4930.. date: 2021-06-23-12-12-04
4931.. nonce: 3p14JB
4932.. section: C API
4933
4934:c:func:`Py_RunMain` now resets :c:data:`PyImport_Inittab` to its initial
4935value at exit. It must be possible to call :c:func:`PyImport_AppendInittab`
4936or :c:func:`PyImport_ExtendInittab` at each Python initialization. Patch by
4937Victor Stinner.
4938
4939..
4940
4941.. bpo: 39947
4942.. date: 2021-06-23-10-31-45
4943.. nonce: je_HMo
4944.. section: C API
4945
4946Remove 4 private trashcan C API functions which were only kept for the
4947backward compatibility of the stable ABI with Python 3.8 and older, since
4948the trashcan API was not usable with the limited C API on Python 3.8 and
4949older. The trashcan API was excluded from the limited C API in Python 3.9.
4950
4951Removed functions:
4952
4953* _PyTrash_deposit_object()
4954* _PyTrash_destroy_chain()
4955* _PyTrash_thread_deposit_object()
4956* _PyTrash_thread_destroy_chain()
4957
4958The trashcan C API was never usable with the limited C API, since old
4959trashcan macros accessed directly :c:type:`PyThreadState` members like
4960``_tstate->trash_delete_nesting``, whereas the :c:type:`PyThreadState`
4961structure is opaque in the limited C API.
4962
4963Exclude also the ``PyTrash_UNWIND_LEVEL`` constant from the C API.
4964
4965Patch by Victor Stinner.
4966
4967..
4968
4969.. bpo: 40939
4970.. date: 2021-06-22-17-00-06
4971.. nonce: CGB0I5
4972.. section: C API
4973
4974Removed documentation for the removed ``PyParser_*`` C API.
4975
4976..
4977
4978.. bpo: 43795
4979.. date: 2021-06-15-16-28-18
4980.. nonce: fy0AXK
4981.. section: C API
4982
4983The list in :ref:`stable-abi-list` now shows the public name
4984:c:struct:`PyFrameObject` rather than ``_frame``. The non-existing entry
4985``_node`` no longer appears in the list.
4986
4987..
4988
4989.. bpo: 44378
4990.. date: 2021-06-10-15-22-31
4991.. nonce: jGYakF
4992.. section: C API
4993
4994:c:func:`Py_IS_TYPE` no longer uses :c:func:`Py_TYPE` to avoid a compiler
4995warning: no longer cast ``const PyObject*`` to ``PyObject*``. Patch by
4996Victor Stinner.
4997
4998..
4999
5000.. bpo: 39573
5001.. date: 2021-06-03-00-59-48
5002.. nonce: -elHTJ
5003.. section: C API
5004
5005Convert the :c:func:`Py_TYPE` and :c:func:`Py_SIZE` macros to static inline
5006functions. The :c:func:`Py_SET_TYPE` and :c:func:`Py_SET_SIZE` functions
5007must now be used to set an object type and size. Patch by Victor Stinner.
5008
5009..
5010
5011.. bpo: 44263
5012.. date: 2021-05-31-11-31-13
5013.. nonce: 8mIOfV
5014.. section: C API
5015
5016The :c:func:`PyType_Ready` function now raises an error if a type is defined
5017with the :const:`Py_TPFLAGS_HAVE_GC` flag set but has no traverse function
5018(:c:member:`PyTypeObject.tp_traverse`). Patch by Victor Stinner.
5019
5020..
5021
5022.. bpo: 43795
5023.. date: 2021-05-19-15-09-47
5024.. nonce: WAHRxt
5025.. section: C API
5026
5027The undocumented function :c:func:`Py_FrozenMain` is removed from the
5028Limited API.
5029
5030..
5031
5032.. bpo: 44113
5033.. date: 2021-05-12-12-24-45
5034.. nonce: DcgOqE
5035.. section: C API
5036
5037Deprecate the following functions to configure the Python initialization:
5038
5039* :c:func:`PySys_AddWarnOptionUnicode`
5040* :c:func:`PySys_AddWarnOption`
5041* :c:func:`PySys_AddXOption`
5042* :c:func:`PySys_HasWarnOptions`
5043* :c:func:`Py_SetPath`
5044* :c:func:`Py_SetProgramName`
5045* :c:func:`Py_SetPythonHome`
5046* :c:func:`Py_SetStandardStreamEncoding`
5047* :c:func:`_Py_SetProgramFullPath`
5048
5049Use the new :c:type:`PyConfig` API of the :ref:`Python Initialization
5050Configuration <init-config>` instead (:pep:`587`).
5051
5052..
5053
5054.. bpo: 44094
5055.. date: 2021-05-10-14-34-22
5056.. nonce: HayXZO
5057.. section: C API
5058
5059Remove ``PyErr_SetFromErrnoWithUnicodeFilename()``,
5060``PyErr_SetFromWindowsErrWithUnicodeFilename()``, and
5061``PyErr_SetExcFromWindowsErrWithUnicodeFilename()``. They are not documented
5062and have been deprecated since Python 3.3.
5063
5064..
5065
5066.. bpo: 43795
5067.. date: 2021-05-05-19-04-50
5068.. nonce: 9Ojj73
5069.. section: C API
5070
5071:c:func:`PyCodec_Unregister` is now properly exported as a function in the
5072Windows Stable ABI DLL.
5073
5074..
5075
5076.. bpo: 44029
5077.. date: 2021-05-04-17-43-39
5078.. nonce: ayX4PR
5079.. section: C API
5080
5081Remove deprecated ``Py_UNICODE`` APIs: ``PyUnicode_Encode``,
5082``PyUnicode_EncodeUTF7``, ``PyUnicode_EncodeUTF8``,
5083``PyUnicode_EncodeUTF16``, ``PyUnicode_EncodeUTF32``,
5084``PyUnicode_EncodeLatin1``, ``PyUnicode_EncodeMBCS``,
5085``PyUnicode_EncodeDecimal``, ``PyUnicode_EncodeRawUnicodeEscape``,
5086``PyUnicode_EncodeCharmap``, ``PyUnicode_EncodeUnicodeEscape``,
5087``PyUnicode_TransformDecimalToASCII``, ``PyUnicode_TranslateCharmap``,
5088``PyUnicodeEncodeError_Create``, ``PyUnicodeTranslateError_Create``. See
5089:pep:`393` and :pep:`624` for reference.
5090
5091..
5092
5093.. bpo: 42035
5094.. date: 2020-12-23-01-28-50
5095.. nonce: S9eUm0
5096.. section: C API
5097
5098Add a new :c:func:`PyType_GetName` function to get type's short name.
5099