1.. date: 2022-05-04-14-32-24
2.. gh-issue: 57684
3.. nonce: HrlDrM
4.. release date: 2022-05-06
5.. section: Security
6
7Add the :option:`-P` command line option and the :envvar:`PYTHONSAFEPATH`
8environment variable to not prepend a potentially unsafe path to
9:data:`sys.path`. Patch by Victor Stinner.
10
11..
12
13.. date: 2022-05-06-02-29-53
14.. gh-issue: 89519
15.. nonce: 4OfkRE
16.. section: Core and Builtins
17
18Chaining classmethod descriptors (introduced in bpo-19072) is deprecated. It
19can no longer be used to wrap other descriptors such as property().  The
20core design of this feature was flawed, and it caused a number of downstream
21problems.
22
23..
24
25.. date: 2022-05-05-20-05-41
26.. gh-issue: 92345
27.. nonce: lnN_RA
28.. section: Core and Builtins
29
30``pymain_run_python()`` now imports ``readline`` and ``rlcompleter`` before
31sys.path is extended to include the current working directory of an
32interactive interpreter. Non-interactive interpreters are not affected.
33
34..
35
36.. bpo: 43857
37.. date: 2022-05-04-11-37-20
38.. nonce: WuX8p3
39.. section: Core and Builtins
40
41Improve the :exc:`AttributeError` message when deleting a missing attribute.
42Patch by Géry Ogam.
43
44..
45
46.. date: 2022-05-03-14-55-40
47.. gh-issue: 92245
48.. nonce: G17-5i
49.. section: Core and Builtins
50
51Make sure that PEP 523 is respected in all cases. In 3.11a7, specialization
52may have prevented Python-to-Python calls respecting PEP 523.
53
54..
55
56.. date: 2022-05-02-17-12-49
57.. gh-issue: 92203
58.. nonce: -igcjS
59.. section: Core and Builtins
60
61Add a closure keyword-only parameter to exec(). It can only be specified
62when exec-ing a code object that uses free variables. When specified, it
63must be a tuple, with exactly the number of cell variables referenced by the
64code object. closure has a default value of None, and it must be None if the
65code object doesn't refer to any free variables.
66
67..
68
69.. date: 2022-05-02-12-40-18
70.. gh-issue: 91173
71.. nonce: k_Dr6z
72.. section: Core and Builtins
73
74Disable frozen modules in debug builds. Patch by Kumar Aditya.
75
76..
77
78.. date: 2022-05-01-16-40-07
79.. gh-issue: 92114
80.. nonce: 5xTlLt
81.. section: Core and Builtins
82
83Improve error message when subscript a type with ``__class_getitem__`` set
84to ``None``.
85
86..
87
88.. date: 2022-05-01-10-58-38
89.. gh-issue: 92112
90.. nonce: lLJemu
91.. section: Core and Builtins
92
93Fix crash triggered by an evil custom ``mro()`` on a metaclass.
94
95..
96
97.. date: 2022-04-30-04-26-01
98.. gh-issue: 92063
99.. nonce: vHnhf6
100.. section: Core and Builtins
101
102The ``PRECALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS`` instruction now ensures
103methods are called only on objects of the correct type.
104
105..
106
107.. date: 2022-04-29-02-50-41
108.. gh-issue: 92031
109.. nonce: 2PpaIN
110.. section: Core and Builtins
111
112Deoptimize statically allocated code objects during ``Py_FINALIZE()`` so
113that future ``_PyCode_Quicken`` calls always start with unquickened code.
114
115..
116
117.. date: 2022-04-28-23-37-30
118.. gh-issue: 92036
119.. nonce: GZJAC9
120.. section: Core and Builtins
121
122Fix a crash in subinterpreters related to the garbage collector. When a
123subinterpreter is deleted, untrack all objects tracked by its GC. To prevent
124a crash in deallocator functions expecting objects to be tracked by the GC,
125leak a strong reference to these objects on purpose, so they are never
126deleted and their deallocator functions are not called. Patch by Victor
127Stinner.
128
129..
130
131.. date: 2022-04-28-20-19-49
132.. gh-issue: 92032
133.. nonce: ef-UfM
134.. section: Core and Builtins
135
136The interpreter can now autocomplete soft keywords, as of now ``match``,
137``case``, and ``_`` (wildcard pattern) from :pep:`634`.
138
139..
140
141.. date: 2022-04-27-10-36-43
142.. gh-issue: 87999
143.. nonce: YSPHfO
144.. section: Core and Builtins
145
146The warning emitted by the Python parser for a numeric literal immediately
147followed by keyword has been changed from deprecation warning to syntax
148warning.
149
150..
151
152.. date: 2022-04-26-05-05-32
153.. gh-issue: 91869
154.. nonce: ELbTXl
155.. section: Core and Builtins
156
157Fix an issue where specialized opcodes with extended arguments could produce
158incorrect tracing output or lead to assertion failures.
159
160..
161
162.. date: 2022-04-23-22-08-34
163.. gh-issue: 91603
164.. nonce: GcWEkK
165.. section: Core and Builtins
166
167Speed up :class:`types.UnionType` instantiation. Based on patch provided by
168Yurii Karabas.
169
170..
171
172.. date: 2022-04-21-16-15-24
173.. gh-issue: 89373
174.. nonce: A1jgLx
175.. section: Core and Builtins
176
177If Python is built in debug mode, Python now ensures that deallocator
178functions leave the current exception unchanged. Patch by Victor Stinner.
179
180..
181
182.. date: 2022-04-20-14-43-37
183.. gh-issue: 91632
184.. nonce: cvUhsZ
185.. section: Core and Builtins
186
187Fix a minor memory leak at exit: release the memory of the
188:class:`generic_alias_iterator` type. Patch by Dong-hee Na.
189
190..
191
192.. date: 2022-04-18-20-25-01
193.. gh-issue: 81548
194.. nonce: n3VYgp
195.. section: Core and Builtins
196
197Octal escapes with value larger than ``0o377`` now produce a
198:exc:`DeprecationWarning`. In a future Python version they will be a
199:exc:`SyntaxWarning` and eventually a :exc:`SyntaxError`.
200
201..
202
203.. bpo: 43950
204.. date: 2022-04-18-15-22-56
205.. nonce: qrTvWL
206.. section: Core and Builtins
207
208Use a single compact table for line starts, ends and column offsets. Reduces
209memory consumption for location info by half
210
211..
212
213.. date: 2022-04-18-07-23-48
214.. gh-issue: 91102
215.. nonce: vm-6g1
216.. section: Core and Builtins
217
218Use Argument Clinic for :class:`EncodingMap`.  Patch by Oleg Iarygin.
219
220..
221
222.. date: 2022-04-18-02-45-40
223.. gh-issue: 91636
224.. nonce: 6DFdy_
225.. section: Core and Builtins
226
227Fixed a crash in a garbage-collection edge-case, in which a
228``PyFunction_Type.tp_clear`` function could leave a python function object
229in an inconsistent state.
230
231..
232
233.. date: 2022-04-17-11-03-45
234.. gh-issue: 91603
235.. nonce: hYw1Lv
236.. section: Core and Builtins
237
238Speed up :func:`isinstance` and :func:`issubclass` checks for
239:class:`types.UnionType`. Patch by Yurii Karabas.
240
241..
242
243.. date: 2022-04-17-02-55-38
244.. gh-issue: 91625
245.. nonce: 80CrC7
246.. section: Core and Builtins
247
248Fixed a bug in which adaptive opcodes ignored any preceding
249``EXTENDED_ARG``\ s on specialization failure.
250
251..
252
253.. date: 2022-04-16-21-54-31
254.. gh-issue: 78607
255.. nonce: _Y7bMm
256.. section: Core and Builtins
257
258The LLTRACE special build now looks for the name ``__lltrace__`` defined in
259module globals, rather than the name ``__ltrace__``, which had been
260introduced as a typo.
261
262..
263
264.. date: 2022-04-15-16-57-23
265.. gh-issue: 91576
266.. nonce: adoDj_
267.. section: Core and Builtins
268
269Speed up iteration of ascii strings by 50%. Patch by Kumar Aditya.
270
271..
272
273.. date: 2022-04-13-22-03-04
274.. gh-issue: 89279
275.. nonce: -jAVxZ
276.. section: Core and Builtins
277
278Improve interpreter performance on Windows by inlining a few specific
279macros.
280
281..
282
283.. date: 2022-04-13-11-15-09
284.. gh-issue: 91502
285.. nonce: 11YXHQ
286.. section: Core and Builtins
287
288Add a new :c:func:`_PyFrame_IsEntryFrame` API function, to check if a
289:c:type:`PyFrameObject` is an entry frame. Patch by Pablo Galindo.
290
291..
292
293.. date: 2022-04-13-07-14-30
294.. gh-issue: 91266
295.. nonce: 6Vkzzt
296.. section: Core and Builtins
297
298Refactor the ``bytearray`` strip methods ``strip``, ``lstrip`` and
299``rstrip`` to use a common implementation.
300
301..
302
303.. date: 2022-04-12-11-56-23
304.. gh-issue: 91479
305.. nonce: -dyGJX
306.. section: Core and Builtins
307
308Replaced the ``__note__`` field of :exc:`BaseException` (added in an earlier
309version of 3.11) with the final design of :pep:`678`. Namely,
310:exc:`BaseException` gets an :meth:`add_note` method, and its ``__notes__``
311field is created when necessary.
312
313..
314
315.. date: 2022-04-12-09-40-57
316.. gh-issue: 46055
317.. nonce: IPb1HA
318.. section: Core and Builtins
319
320Speed up right shift of negative integers, by removing unnecessary creation
321of temporaries. Original patch by Xinhang Xu, reworked by Mark Dickinson.
322
323..
324
325.. date: 2022-04-12-00-44-14
326.. gh-issue: 91462
327.. nonce: t8oxyd
328.. section: Core and Builtins
329
330Make the interpreter's low-level tracing (lltrace) feature output more
331readable by displaying opcode names (rather than just numbers), and by
332displaying stack contents before each opcode.
333
334..
335
336.. date: 2022-04-11-18-44-19
337.. gh-issue: 89455
338.. nonce: d0qMYd
339.. section: Core and Builtins
340
341Fixed an uninitialized bool value in the traceback printing code path that
342was introduced by the initial bpo-45292 exception groups work.
343
344..
345
346.. date: 2022-04-10-22-57-27
347.. gh-issue: 91421
348.. nonce: dHhv6U
349.. section: Core and Builtins
350
351Fix a potential integer overflow in _Py_DecodeUTF8Ex.
352
353..
354
355.. date: 2022-04-10-18-47-21
356.. gh-issue: 91428
357.. nonce: ZewV-M
358.. section: Core and Builtins
359
360Add ``static const char *const _PyOpcode_OpName[256] = {...};`` to
361``opcode.h`` for debug builds to assist in debugging the Python interpreter.
362It is now more convenient to make various forms of debugging output more
363human-readable by including opcode names rather than just the corresponding
364decimal digits.
365
366..
367
368.. bpo: 47120
369.. date: 2022-04-06-22-50-31
370.. nonce: mbfHs5
371.. section: Core and Builtins
372
373Make :opcode:`POP_JUMP_IF_TRUE`, :opcode:`POP_JUMP_IF_FALSE`,
374:opcode:`POP_JUMP_IF_NONE` and :opcode:`POP_JUMP_IF_NOT_NONE` virtual,
375mapping to new relative jump opcodes.
376
377..
378
379.. bpo: 45317
380.. date: 2022-04-04-15-12-38
381.. nonce: UDLOt8
382.. section: Core and Builtins
383
384Add internal documentation explaining design of new (for 3.11) frame stack.
385
386..
387
388.. bpo: 47197
389.. date: 2022-04-03-17-21-04
390.. nonce: Ji_c30
391.. section: Core and Builtins
392
393ctypes used to mishandle ``void`` return types, so that for instance a
394function declared like ``ctypes.CFUNCTYPE(None, ctypes.c_int)`` would be
395called with signature ``int f(int)`` instead of ``void f(int)``. Wasm
396targets require function pointers to be called with the correct signatures
397so this led to crashes. The problem is now fixed.
398
399..
400
401.. bpo: 47120
402.. date: 2022-03-31-14-33-48
403.. nonce: 6S_uoU
404.. section: Core and Builtins
405
406Make opcodes :opcode:`JUMP_IF_TRUE_OR_POP` and
407:opcode:`JUMP_IF_FALSE_OR_POP` relative rather than absolute.
408
409..
410
411.. bpo: 47177
412.. date: 2022-03-31-01-30-03
413.. nonce: fQqaov
414.. section: Core and Builtins
415
416Replace the ``f_lasti`` member of the internal ``_PyInterpreterFrame``
417structure with a ``prev_instr`` pointer, which reduces overhead in the main
418interpreter loop. The ``f_lasti`` attribute of Python-layer frame objects is
419preserved for backward-compatibility.
420
421..
422
423.. bpo: 46961
424.. date: 2022-03-13-08-23-17
425.. nonce: SgGCkG
426.. section: Core and Builtins
427
428Integer mod/remainder operations, including the three-argument form of
429:func:`pow`, now consistently return ints from the global small integer
430cache when applicable.
431
432..
433
434.. bpo: 46962
435.. date: 2022-03-08-21-59-57
436.. nonce: UomDfz
437.. section: Core and Builtins
438
439Classes and functions that unconditionally declared their docstrings
440ignoring the `--without-doc-strings` compilation flag no longer do so.
441
442The classes affected are :class:`ctypes.UnionType`,
443:class:`pickle.PickleBuffer`, :class:`testcapi.RecursingInfinitelyError`,
444and :class:`types.GenericAlias`.
445
446The functions affected are 24 methods in :mod:`ctypes`.
447
448Patch by Oleg Iarygin.
449
450..
451
452.. bpo: 46942
453.. date: 2022-03-07-11-51-51
454.. nonce: 57obVi
455.. section: Core and Builtins
456
457Use Argument Clinic for the :class:`types.MethodType` constructor.  Patch by
458Oleg Iarygin.
459
460..
461
462.. bpo: 46764
463.. date: 2022-02-16-03-23-38
464.. nonce: wEY4bS
465.. section: Core and Builtins
466
467Fix wrapping bound methods with @classmethod
468
469..
470
471.. bpo: 43464
472.. date: 2022-02-13-21-53-29
473.. nonce: yupHjd
474.. section: Core and Builtins
475
476Optimize :meth:`set.intersection` for non-set arguments.
477
478..
479
480.. bpo: 46721
481.. date: 2022-02-11-17-16-30
482.. nonce: JkHaLF
483.. section: Core and Builtins
484
485Optimize :meth:`set.issuperset` for non-set argument.
486
487..
488
489.. bpo: 46509
490.. date: 2022-01-25-05-39-38
491.. nonce: ljrqrc
492.. section: Core and Builtins
493
494Add type-specialized versions of the ``Py_DECREF()``, and use them for
495``float``, ``int``, ``str``, ``bool``, and ``None`` to avoid pointer-chasing
496at runtime where types are known at C compile time.
497
498..
499
500.. bpo: 46045
501.. date: 2021-12-11-11-36-48
502.. nonce: sfThay
503.. section: Core and Builtins
504
505Do not use POSIX semaphores on NetBSD
506
507..
508
509.. bpo: 36819
510.. date: 2021-09-28-10-58-30
511.. nonce: cyV50C
512.. section: Core and Builtins
513
514Fix crashes in built-in encoders with error handlers that return position
515less or equal than the starting position of non-encodable characters.
516
517..
518
519.. bpo: 34093
520.. date: 2018-07-14-16-58-00
521.. nonce: WaVD-f
522.. section: Core and Builtins
523
524``marshal.dumps()`` uses ``FLAG_REF`` for all interned strings.  This makes
525output more deterministic and helps reproducible build.
526
527..
528
529.. bpo: 26579
530.. date: 2017-07-23-11-28-45
531.. nonce: lpCY8R
532.. section: Core and Builtins
533
534Added ``object.__getstate__`` which provides the default implementation of
535the ``__getstate__()`` method.
536
537Copying and pickling instances of subclasses of builtin types bytearray,
538set, frozenset, collections.OrderedDict, collections.deque, weakref.WeakSet,
539and datetime.tzinfo now copies and pickles instance attributes implemented
540as slots.
541
542..
543
544.. date: 2022-05-06-13-53-10
545.. gh-issue: 87901
546.. nonce: NnkUVr
547.. section: Library
548
549Add the *encoding* parameter to :func:`os.popen`.
550
551..
552
553.. date: 2022-05-06-09-48-07
554.. gh-issue: 90997
555.. nonce: 4PmCgX
556.. section: Library
557
558Fix an issue where :mod:`dis` utilities may interpret populated inline cache
559entries as valid instructions.
560
561..
562
563.. date: 2022-05-05-22-46-52
564.. gh-issue: 92332
565.. nonce: Fv9CJx
566.. section: Library
567
568Deprecate :class:`typing.Text` (removal of the class is currently not
569planned). Patch by Alex Waygood.
570
571..
572
573.. gh: 78157
574.. date: 2022-05-05-20-40-45
575.. nonce: IA_9na
576.. section: Library
577
578Deprecate nested classes in enum definitions becoming members -- in 3.13
579they will be normal classes; add `member` and `nonmember` functions to allow
580control over results now.
581
582..
583
584.. date: 2022-05-05-19-25-09
585.. gh-issue: 92356
586.. nonce: uvxWdu
587.. section: Library
588
589Fixed a performance regression in ctypes function calls.
590
591..
592
593.. date: 2022-05-05-17-35-01
594.. gh-issue: 90997
595.. nonce: UV5_s0
596.. section: Library
597
598Show the actual named values stored in inline caches when
599``show_caches=True`` is passed to :mod:`dis` utilities.
600
601..
602
603.. date: 2022-05-04-11-54-37
604.. gh-issue: 92301
605.. nonce: eqjoYX
606.. section: Library
607
608Prefer ``close_range()`` to iterating over procfs for file descriptor
609closing in :mod:`subprocess` for better performance.
610
611..
612
613.. date: 2022-05-03-19-06-38
614.. gh-issue: 67248
615.. nonce: DK61Go
616.. section: Library
617
618Sort the miscellaneous topics in Cmd.do_help()
619
620..
621
622.. date: 2022-05-03-17-33-46
623.. gh-issue: 92210
624.. nonce: csDOQM
625.. section: Library
626
627Port ``socket.__init__`` to Argument Clinic. Patch by Cinder.
628
629..
630
631.. date: 2022-05-03-12-11-27
632.. gh-issue: 80010
633.. nonce: yG54RE
634.. section: Library
635
636Add support for generalized ISO 8601 parsing to
637:meth:`datetime.datetime.fromisoformat`, :meth:`datetime.date.fromisoformat`
638and :meth:`datetime.time.fromisoformat`. Patch by Paul Ganssle.
639
640..
641
642.. date: 2022-05-02-23-08-02
643.. gh-issue: 92118
644.. nonce: 9Mm9g4
645.. section: Library
646
647Fix a 3.11 regression in :func:`~contextlib.contextmanager`, which caused it
648to propagate exceptions with incorrect tracebacks.
649
650..
651
652.. date: 2022-05-02-18-19-46
653.. gh-issue: 90887
654.. nonce: zQsmfp
655.. section: Library
656
657Adding ``COPYFILE_STAT``, ``COPYFILE_ACL`` and ``COPYFILE_XATTR`` constants
658for :func:`os.fcopyfile` available in macOs.
659
660..
661
662.. date: 2022-05-02-09-09-47
663.. gh-issue: 91215
664.. nonce: l1p7CJ
665.. section: Library
666
667For @dataclass, add weakref_slot. Default is False. If True, and if
668slots=True, add a slot named "__weakref__", which will allow instances to be
669weakref'd. Contributed by Eric V. Smith
670
671..
672
673.. date: 2022-05-02-03-56-50
674.. gh-issue: 85984
675.. nonce: RBivvc
676.. section: Library
677
678New function os.login_tty() for Unix.
679
680..
681
682.. date: 2022-05-01-21-45-41
683.. gh-issue: 92128
684.. nonce: Di7VbE
685.. section: Library
686
687Add :meth:`~object.__class_getitem__` to :class:`logging.LoggerAdapter` and
688:class:`logging.StreamHandler`, allowing them to be parameterized at
689runtime. Patch by Alex Waygood.
690
691..
692
693.. date: 2022-04-30-10-53-10
694.. gh-issue: 92049
695.. nonce: 5SEKoh
696.. section: Library
697
698Forbid pickling constants ``re._constants.SUCCESS`` etc. Previously,
699pickling did not fail, but the result could not be unpickled.
700
701..
702
703.. date: 2022-04-29-18-15-23
704.. gh-issue: 92062
705.. nonce: X2c_Rj
706.. section: Library
707
708:class:`inspect.Parameter` now raises :exc:`ValueError` if ``name`` is a
709keyword, in addition to the existing check that it is an identifier.
710
711..
712
713.. date: 2022-04-29-16-41-08
714.. gh-issue: 87390
715.. nonce: 3LNNCv
716.. section: Library
717
718Add an ``__unpacked__`` attribute to :class:`types.GenericAlias`. Patch by
719Jelle Zijlstra.
720
721..
722
723.. date: 2022-04-28-18-45-58
724.. gh-issue: 88089
725.. nonce: hu9kRk
726.. section: Library
727
728Add support for generic :class:`typing.NamedTuple`.
729
730..
731
732.. date: 2022-04-27-19-45-58
733.. gh-issue: 91996
734.. nonce: YEEIzk
735.. section: Library
736
737New http.HTTPMethod enum to represent all the available HTTP request methods
738in a convenient way
739
740..
741
742.. date: 2022-04-27-18-30-00
743.. gh-issue: 91984
744.. nonce: LxAB11
745.. section: Library
746
747Modified test strings in test_argparse.py to not contain trailing spaces
748before end of line.
749
750..
751
752.. date: 2022-04-27-18-04-24
753.. gh-issue: 91952
754.. nonce: 9A4RXx
755.. section: Library
756
757Add ``encoding="locale"`` support to :meth:`TextIOWrapper.reconfigure`.
758
759..
760
761.. date: 2022-04-27-13-30-26
762.. gh-issue: 91954
763.. nonce: cC7ga_
764.. section: Library
765
766Add *encoding* and *errors* arguments to :func:`subprocess.getoutput` and
767:func:`subprocess.getstatusoutput`.
768
769..
770
771.. bpo: 47029
772.. date: 2022-04-26-19-01-13
773.. nonce: qkT42X
774.. section: Library
775
776Always close the read end of the pipe used by :class:`multiprocessing.Queue`
777*after* the last write of buffered data to the write end of the pipe to
778avoid :exc:`BrokenPipeError` at garbage collection and at
779:meth:`multiprocessing.Queue.close` calls. Patch by Géry Ogam.
780
781..
782
783.. date: 2022-04-26-18-02-44
784.. gh-issue: 91928
785.. nonce: V0YveU
786.. section: Library
787
788Add `datetime.UTC` alias for `datetime.timezone.utc`.
789
790Patch by Kabir Kwatra.
791
792..
793
794.. date: 2022-04-26-09-09-07
795.. gh-issue: 68966
796.. nonce: roapI2
797.. section: Library
798
799The :mod:`mailcap` module is now deprecated and will be removed in Python
8003.13. See :pep:`594` for the rationale and the :mod:`mimetypes` module for
801an alternative. Patch by Victor Stinner.
802
803..
804
805.. date: 2022-04-25-21-33-48
806.. gh-issue: 91401
807.. nonce: _Jo4Bu
808.. section: Library
809
810Provide a way to disable :mod:`subprocess` use of ``vfork()`` just in case
811it is ever needed and document the existing mechanism for ``posix_spawn()``.
812
813..
814
815.. date: 2022-04-25-18-30-20
816.. gh-issue: 64783
817.. nonce: HFtERN
818.. section: Library
819
820Fix :data:`signal.NSIG` value on FreeBSD to accept signal numbers greater
821than 32, like :data:`signal.SIGRTMIN` and :data:`signal.SIGRTMAX`. Patch by
822Victor Stinner.
823
824..
825
826.. date: 2022-04-25-14-18-01
827.. gh-issue: 91910
828.. nonce: kY-JR0
829.. section: Library
830
831Add missing f prefix to f-strings in error messages from the
832:mod:`multiprocessing` and :mod:`asyncio` modules.
833
834..
835
836.. date: 2022-04-23-08-06-36
837.. gh-issue: 91860
838.. nonce: ityDjK
839.. section: Library
840
841Add :func:`typing.dataclass_transform`, implementing :pep:`681`. Patch by
842Jelle Zijlstra.
843
844..
845
846.. date: 2022-04-23-03-24-00
847.. gh-issue: 91832
848.. nonce: TyLi65
849.. section: Library
850
851Add ``required`` attribute to :class:`argparse.Action` repr output.
852
853..
854
855.. date: 2022-04-22-19-11-31
856.. gh-issue: 91827
857.. nonce: 6P3gOI
858.. section: Library
859
860In the :mod:`tkinter` module add method ``info_patchlevel()`` which returns
861the exact version of the Tcl library as a named tuple similar to
862:data:`sys.version_info`.
863
864..
865
866.. date: 2022-04-22-13-01-20
867.. gh-issue: 84461
868.. nonce: rsCiTH
869.. section: Library
870
871Add :option:`--enable-wasm-pthreads` to enable pthreads support for WASM
872builds. ``Emscripten/node`` no longer has threading enabled by default.
873Include additional file systems.
874
875..
876
877.. date: 2022-04-22-08-25-18
878.. gh-issue: 91821
879.. nonce: XwMkj0
880.. section: Library
881
882Fix unstable ``test_from_tuple`` test in ``test_decimal.py``.
883
884..
885
886.. date: 2022-04-21-21-06-54
887.. gh-issue: 91217
888.. nonce: 2cVma_
889.. section: Library
890
891Deprecate the xdrlib module.
892
893..
894
895.. date: 2022-04-21-21-04-08
896.. gh-issue: 91217
897.. nonce: BZVEki
898.. section: Library
899
900Deprecate the uu module.
901
902..
903
904.. date: 2022-04-21-19-46-03
905.. gh-issue: 91760
906.. nonce: zDtv1E
907.. section: Library
908
909More strict rules will be applied for numerical group references and group
910names in regular expressions. For now, a deprecation warning is emitted for
911group references and group names which will be errors in future Python
912versions.
913
914..
915
916.. date: 2022-04-21-11-57-23
917.. gh-issue: 84461
918.. nonce: S7dbt4
919.. section: Library
920
921Add provisional :data:`sys._emscripten_info` named tuple with build-time and
922run-time information about Emscripten platform.
923
924..
925
926.. date: 2022-04-20-18-47-27
927.. gh-issue: 90623
928.. nonce: 5fROpX
929.. section: Library
930
931:func:`signal.raise_signal` and :func:`os.kill` now check immediately for
932pending signals. Patch by Victor Stinner.
933
934..
935
936.. date: 2022-04-20-09-49-33
937.. gh-issue: 91734
938.. nonce: 4Dj4Gy
939.. section: Library
940
941Fix OSS audio support on Solaris.
942
943..
944
945.. date: 2022-04-19-19-50-10
946.. gh-issue: 90633
947.. nonce: Youov0
948.. section: Library
949
950Include the passed value in the exception thrown by
951:func:`typing.assert_never`. Patch by Jelle Zijlstra.
952
953..
954
955.. date: 2022-04-19-17-30-17
956.. gh-issue: 91700
957.. nonce: MRJi6m
958.. section: Library
959
960Compilation of regular expression containing a conditional expression
961``(?(group)...)`` now raises an appropriate :exc:`re.error` if the group
962number refers to not defined group. Previously an internal RuntimeError was
963raised.
964
965..
966
967.. date: 2022-04-19-15-30-06
968.. gh-issue: 91231
969.. nonce: AWy4Cs
970.. section: Library
971
972Add an optional keyword *shutdown_timeout* parameter to the
973:class:`multiprocessing.BaseManager` constructor. Kill the process if
974terminate() takes longer than the timeout. Patch by Victor Stinner.
975
976..
977
978.. date: 2022-04-18-18-55-21
979.. gh-issue: 91621
980.. nonce: ACNlda
981.. section: Library
982
983Fix :func:`typing.get_type_hints` for :class:`collections.abc.Callable`.
984Patch by Shantanu Jain.
985
986..
987
988.. date: 2022-04-18-16-31-33
989.. gh-issue: 90568
990.. nonce: 9kiU7o
991.. section: Library
992
993Parsing ``\N`` escapes of Unicode Named Character Sequences in a
994:mod:`regular expression <re>` raises now :exc:`re.error` instead of
995``TypeError``.
996
997..
998
999.. date: 2022-04-18-15-23-24
1000.. gh-issue: 91670
1001.. nonce: 6eyChw
1002.. section: Library
1003
1004Remove deprecated ``SO`` config variable in :mod:`sysconfig`.
1005
1006..
1007
1008.. date: 2022-04-17-12-41-52
1009.. gh-issue: 91217
1010.. nonce: 3wnHSX
1011.. section: Library
1012
1013Deprecate the telnetlib module.
1014
1015..
1016
1017.. date: 2022-04-17-12-38-31
1018.. gh-issue: 91217
1019.. nonce: 55714p
1020.. section: Library
1021
1022Deprecate the sunau module.
1023
1024..
1025
1026.. date: 2022-04-17-12-32-40
1027.. gh-issue: 91217
1028.. nonce: ms49Rg
1029.. section: Library
1030
1031Deprecate the spwd module.
1032
1033..
1034
1035.. date: 2022-04-17-12-27-46
1036.. gh-issue: 91217
1037.. nonce: tNDWtK
1038.. section: Library
1039
1040Deprecate the sndhdr module, as well as inline needed functionality for
1041``email.mime.MIMEAudio``.
1042
1043..
1044
1045.. date: 2022-04-17-12-27-25
1046.. gh-issue: 91616
1047.. nonce: gSQg69
1048.. section: Library
1049
1050:mod:`re` module, fix :meth:`~re.Pattern.fullmatch` mismatch when using
1051Atomic Grouping or Possessive Quantifiers.
1052
1053..
1054
1055.. date: 2022-04-17-12-07-50
1056.. gh-issue: 91217
1057.. nonce: TIvrsq
1058.. section: Library
1059
1060Deprecate the 'pipes' module.
1061
1062..
1063
1064.. date: 2022-04-17-11-56-17
1065.. gh-issue: 91217
1066.. nonce: McJre3
1067.. section: Library
1068
1069Deprecate the ossaudiodev module.
1070
1071..
1072
1073.. bpo: 47256
1074.. date: 2022-04-16-11-39-59
1075.. nonce: 1cygyd
1076.. section: Library
1077
1078:mod:`re` module, limit the maximum capturing group to 1,073,741,823 in
107964-bit build, this increases the depth of backtracking.
1080
1081..
1082
1083.. date: 2022-04-16-09-33-14
1084.. gh-issue: 91217
1085.. nonce: nt9JFs
1086.. section: Library
1087
1088Deprecate the nis module.
1089
1090..
1091
1092.. date: 2022-04-16-05-12-13
1093.. gh-issue: 91595
1094.. nonce: CocJBv
1095.. section: Library
1096
1097Fix the comparison of character and integer inside
1098:func:`Tools.gdb.libpython.write_repr`. Patch by Yu Liu.
1099
1100..
1101
1102.. date: 2022-04-15-20-56-31
1103.. gh-issue: 74166
1104.. nonce: 70KlvL
1105.. section: Library
1106
1107Add option to raise all errors from :meth:`~socket.create_connection` in an
1108:exc:`ExceptionGroup` when it fails to create a connection. The default
1109remains to raise only the last error that had occurred when multiple
1110addresses were tried.
1111
1112..
1113
1114.. date: 2022-04-15-19-34-02
1115.. gh-issue: 91487
1116.. nonce: 2aqguF
1117.. section: Library
1118
1119Optimize asyncio UDP speed, over 100 times faster when transferring a large
1120file.
1121
1122..
1123
1124.. date: 2022-04-15-18-38-21
1125.. gh-issue: 91575
1126.. nonce: fSyAxS
1127.. section: Library
1128
1129Update case-insensitive matching in the :mod:`re` module to the latest
1130Unicode version.
1131
1132..
1133
1134.. date: 2022-04-15-18-32-38
1135.. gh-issue: 90622
1136.. nonce: WQjFDe
1137.. section: Library
1138
1139In ``concurrent.futures.process.ProcessPoolExecutor`` disallow the "fork"
1140multiprocessing start method when the new ``max_tasks_per_child`` feature is
1141used as the mix of threads+fork can hang the child processes. Default to
1142using the safe "spawn" start method in that circumstance if no
1143``mp_context`` was supplied.
1144
1145..
1146
1147.. date: 2022-04-15-17-06-09
1148.. gh-issue: 89022
1149.. nonce: DgdQCa
1150.. section: Library
1151
1152In :mod:`sqlite3`, ``SQLITE_MISUSE`` result codes are now mapped to
1153:exc:`~sqlite3.InterfaceError` instead of :exc:`~sqlite3.ProgrammingError`.
1154Also, more accurate exceptions are raised when binding parameters fail.
1155Patch by Erlend E. Aasland.
1156
1157..
1158
1159.. date: 2022-04-14-18-06-00
1160.. gh-issue: 91526
1161.. nonce: cwfhSB
1162.. section: Library
1163
1164Stop calling ``os.device_encoding(file.fileno())`` in
1165:class:`TextIOWrapper`. It was complex, never documented, and didn't work
1166for most cases. (Patch by Inada Naoki.)
1167
1168..
1169
1170.. date: 2022-04-14-13-11-37
1171.. gh-issue: 88116
1172.. nonce: j_SybE
1173.. section: Library
1174
1175Change the frame-related functions in the :mod:`inspect` module to return a
1176regular object (that is backwards compatible with the old tuple-like
1177interface) that include the extended :pep:`657` position information (end
1178line number, column and end column). The affected functions are:
1179:func:`inspect.getframeinfo`, :func:`inspect.getouterframes`,
1180:func:`inspect.getinnerframes`, :func:`inspect.stack` and
1181:func:`inspect.trace`. Patch by Pablo Galindo.
1182
1183..
1184
1185.. date: 2022-04-14-01-00-31
1186.. gh-issue: 69093
1187.. nonce: bmlMwI
1188.. section: Library
1189
1190Add indexing and slicing support to :class:`sqlite3.Blob`. Patch by Aviv
1191Palivoda and Erlend E. Aasland.
1192
1193..
1194
1195.. date: 2022-04-14-00-59-01
1196.. gh-issue: 69093
1197.. nonce: bmlMwI
1198.. section: Library
1199
1200Add :term:`context manager` support to :class:`sqlite3.Blob`. Patch by Aviv
1201Palivoda and Erlend E. Aasland.
1202
1203..
1204
1205.. date: 2022-04-12-20-19-10
1206.. gh-issue: 91217
1207.. nonce: acd4h9
1208.. section: Library
1209
1210Deprecate nntplib.
1211
1212..
1213
1214.. date: 2022-04-12-19-42-20
1215.. gh-issue: 91217
1216.. nonce: b9_Rz9
1217.. section: Library
1218
1219Deprecate msilib.
1220
1221..
1222
1223.. date: 2022-04-12-19-08-13
1224.. gh-issue: 91404
1225.. nonce: zjqYHo
1226.. section: Library
1227
1228Improve the performance of :mod:`re` matching by using computed gotos (or
1229"threaded code") on supported platforms and removing expensive pointer
1230indirections.
1231
1232..
1233
1234.. date: 2022-04-11-17-04-38
1235.. gh-issue: 91217
1236.. nonce: QVDLOq
1237.. section: Library
1238
1239Deprecate the imghdr module.
1240
1241..
1242
1243.. date: 2022-04-11-16-13-26
1244.. gh-issue: 91217
1245.. nonce: 2rf8rc
1246.. section: Library
1247
1248Deprecate the crypt module.
1249
1250..
1251
1252.. date: 2022-04-11-13-07-30
1253.. gh-issue: 91276
1254.. nonce: Vttu15
1255.. section: Library
1256
1257Make space for longer opcodes in :mod:`dis` output.
1258
1259..
1260
1261.. bpo: 47000
1262.. date: 2022-04-10-17-50-18
1263.. nonce: JlQkFx
1264.. section: Library
1265
1266Make :class:`TextIOWrapper` uses locale encoding when ``encoding="locale"``
1267is specified even in UTF-8 mode.
1268
1269..
1270
1271.. date: 2022-04-10-17-12-23
1272.. gh-issue: 91230
1273.. nonce: T1d_fG
1274.. section: Library
1275
1276:func:`warnings.catch_warnings` now accepts arguments for
1277:func:`warnings.simplefilter`, providing a more concise way to locally
1278ignore warnings or convert them to errors.
1279
1280..
1281
1282.. date: 2022-04-10-11-11-33
1283.. gh-issue: 91217
1284.. nonce: K82AuH
1285.. section: Library
1286
1287Deprecate the chunk module.
1288
1289..
1290
1291.. gh: 91498
1292.. date: 2022-04-10-08-39-44
1293.. nonce: 8oII92
1294.. section: Library
1295
1296Add the ``TCP_CONNECTION_INFO`` option (available on macOS) to
1297:mod:`socket`.
1298
1299..
1300
1301.. bpo: 47260
1302.. date: 2022-04-08-14-30-53
1303.. nonce: TtcNxI
1304.. section: Library
1305
1306Fix ``os.closerange()`` potentially being a no-op in a Linux seccomp
1307sandbox.
1308
1309..
1310
1311.. bpo: 47087
1312.. date: 2022-04-08-08-55-36
1313.. nonce: Q5C3EI
1314.. section: Library
1315
1316Implement ``typing.Required`` and ``typing.NotRequired`` (:pep:`655`). Patch
1317by David Foster and Jelle Zijlstra.
1318
1319..
1320
1321.. bpo: 47061
1322.. date: 2022-04-07-20-32-47
1323.. nonce: TOufgh
1324.. section: Library
1325
1326Deprecate cgi and cgitb.
1327
1328..
1329
1330.. bpo: 47061
1331.. date: 2022-04-06-18-01-28
1332.. nonce: qoVTR9
1333.. section: Library
1334
1335Deprecate audioop.
1336
1337..
1338
1339.. bpo: 47000
1340.. date: 2022-04-06-11-54-53
1341.. nonce: 2nmAR1
1342.. section: Library
1343
1344Add :func:`locale.getencoding` to get the current locale encoding. It is
1345similar to ``locale.getpreferredencoding(False)`` but ignores the
1346:ref:`Python UTF-8 Mode <utf8-mode>`.
1347
1348..
1349
1350.. bpo: 42012
1351.. date: 2022-04-05-17-18-13
1352.. nonce: zMocQz
1353.. section: Library
1354
1355Add :mod:`wsgiref.types`, containing WSGI-specific types for static type
1356checking.
1357
1358..
1359
1360.. bpo: 47227
1361.. date: 2022-04-05-15-53-58
1362.. nonce: 1HWdp9
1363.. section: Library
1364
1365Suppress expression chaining for more :mod:`re` parsing errors.
1366
1367..
1368
1369.. bpo: 47211
1370.. date: 2022-04-04-11-58-07
1371.. nonce: W4GFkB
1372.. section: Library
1373
1374Remove undocumented and never working function ``re.template()`` and flag
1375``re.TEMPLATE``.
1376This was later reverted in 3.11.0b2 and deprecated instead.
1377
1378..
1379
1380.. bpo: 47135
1381.. date: 2022-04-01-21-44-00
1382.. nonce: TvkKB-
1383.. section: Library
1384
1385:meth:`decimal.localcontext` now accepts context attributes via keyword
1386arguments
1387
1388..
1389
1390.. bpo: 43323
1391.. date: 2022-03-27-12-40-16
1392.. nonce: 9mFPuI
1393.. section: Library
1394
1395Fix errors in the :mod:`email` module if the charset itself contains
1396undecodable/unencodable characters.
1397
1398..
1399
1400.. bpo: 46841
1401.. date: 2022-03-25-22-18-45
1402.. nonce: NUEsXW
1403.. section: Library
1404
1405Disassembly of quickened code.
1406
1407..
1408
1409.. bpo: 46681
1410.. date: 2022-03-21-13-50-07
1411.. nonce: RRhopn
1412.. section: Library
1413
1414Forward gzip.compress() compresslevel to zlib.
1415
1416..
1417
1418.. bpo: 45100
1419.. date: 2022-03-06-18-15-32
1420.. nonce: B_lHu0
1421.. section: Library
1422
1423Add :func:`typing.get_overloads` and :func:`typing.clear_overloads`. Patch
1424by Jelle Zijlstra.
1425
1426..
1427
1428.. bpo: 44807
1429.. date: 2022-03-02-04-25-58
1430.. nonce: gHNC9J
1431.. section: Library
1432
1433:class:`typing.Protocol` no longer silently replaces :meth:`__init__`
1434methods defined on subclasses. Patch by Adrian Garcia Badaracco.
1435
1436..
1437
1438.. bpo: 46787
1439.. date: 2022-02-18-20-09-29
1440.. nonce: juwWc0
1441.. section: Library
1442
1443Fix :class:`concurrent.futures.ProcessPoolExecutor` exception memory leak
1444
1445..
1446
1447.. bpo: 46720
1448.. date: 2022-02-11-23-11-35
1449.. nonce: nY8spB
1450.. section: Library
1451
1452Add support for path-like objects to :func:`multiprocessing.set_executable`
1453for Windows to be on a par with Unix-like systems. Patch by Géry Ogam.
1454
1455..
1456
1457.. bpo: 46696
1458.. date: 2022-02-09-21-40-02
1459.. nonce: nPXRno
1460.. section: Library
1461
1462Add ``SO_INCOMING_CPU`` constant to :mod:`socket`.
1463
1464..
1465
1466.. bpo: 46053
1467.. date: 2022-02-06-12-59-32
1468.. nonce: sHFo3S
1469.. section: Library
1470
1471Fix OSS audio support on NetBSD.
1472
1473..
1474
1475.. bpo: 45639
1476.. date: 2022-02-02-04-51-39
1477.. nonce: N8XrGO
1478.. section: Library
1479
1480``image/avif`` and ``image/webp`` were added to :mod:`mimetypes`.
1481
1482..
1483
1484.. bpo: 46285
1485.. date: 2022-01-29-00-23-00
1486.. nonce: pt84qm
1487.. section: Library
1488
1489Add command-line option ``-p``/``--protocol`` to module :mod:`http.server`
1490which specifies the HTTP version to which the server is conformant (HTTP/1.1
1491conformant servers can now be run from the command-line interface of module
1492:mod:`http.server`). Patch by Géry Ogam.
1493
1494..
1495
1496.. bpo: 44791
1497.. date: 2022-01-27-14-46-15
1498.. nonce: tR1JFG
1499.. section: Library
1500
1501Accept ellipsis as the last argument of :data:`typing.Concatenate`.
1502
1503..
1504
1505.. bpo: 46547
1506.. date: 2022-01-27-14-41-55
1507.. nonce: JMyYz9
1508.. section: Library
1509
1510Remove variables leaking into ``pydoc.Helper`` class namespace.
1511
1512..
1513
1514.. bpo: 46415
1515.. date: 2022-01-17-16-53-30
1516.. nonce: 6wSYg-
1517.. section: Library
1518
1519Fix ipaddress.ip_{address,interface,network} raising TypeError instead of
1520ValueError if given invalid tuple as address parameter.
1521
1522..
1523
1524.. bpo: 46075
1525.. date: 2021-12-14-21-19-04
1526.. nonce: KDtcU-
1527.. section: Library
1528
1529``CookieJar`` with ``DefaultCookiePolicy`` now can process cookies from
1530localhost with domain=localhost explicitly specified in Set-Cookie header.
1531
1532..
1533
1534.. bpo: 45995
1535.. date: 2021-12-14-13-15-41
1536.. nonce: Am9pNL
1537.. section: Library
1538
1539Add a "z" option to the string formatting specification that coerces
1540negative zero floating-point values to positive zero after rounding to the
1541format precision.  Contributed by John Belmonte.
1542
1543..
1544
1545.. bpo: 26175
1546.. date: 2021-11-14-01-35-04
1547.. nonce: LNlOfI
1548.. section: Library
1549
1550Fully implement the :class:`io.BufferedIOBase` or :class:`io.TextIOBase`
1551interface for :class:`tempfile.SpooledTemporaryFile` objects. This lets them
1552work correctly with higher-level layers (like compression modules). Patch by
1553Carey Metcalfe.
1554
1555..
1556
1557.. bpo: 45138
1558.. date: 2021-09-08-16-21-03
1559.. nonce: yghUrK
1560.. section: Library
1561
1562Fix a regression in the :mod:`sqlite3` trace callback where bound parameters
1563were not expanded in the passed statement string. The regression was
1564introduced in Python 3.10 by :issue:`40318`. Patch by Erlend E. Aasland.
1565
1566..
1567
1568.. bpo: 44863
1569.. date: 2021-09-03-07-56-48
1570.. nonce: udgz95
1571.. section: Library
1572
1573Allow :class:`~typing.TypedDict` subclasses to also include
1574:class:`~typing.Generic` as a base class in class based syntax. Thereby
1575allowing the user to define a generic ``TypedDict``, just like a
1576user-defined generic but with ``TypedDict`` semantics.
1577
1578..
1579
1580.. bpo: 44587
1581.. date: 2021-08-17-21-41-39
1582.. nonce: 57OKSz
1583.. section: Library
1584
1585Fix BooleanOptionalAction to not automatically add a default string.  If a
1586default string is desired, use a formatter to add it.
1587
1588..
1589
1590.. bpo: 43827
1591.. date: 2021-04-16-17-32-44
1592.. nonce: uJaXdP
1593.. section: Library
1594
1595All positional-or-keyword parameters to ``ABCMeta.__new__`` are now
1596positional-only to avoid conflicts with keyword arguments to be passed to
1597:meth:`__init_subclass__`.
1598
1599..
1600
1601.. bpo: 43218
1602.. date: 2021-02-14-20-55-53
1603.. nonce: VZv2M4
1604.. section: Library
1605
1606Prevent creation of a venv whose path contains the PATH separator. This
1607could affect the usage of the activate script. Patch by Dustin Rodrigues.
1608
1609..
1610
1611.. bpo: 38435
1612.. date: 2020-12-24-19-11-53
1613.. nonce: rEHTAR
1614.. section: Library
1615
1616Add a ``process_group`` parameter to :class:`subprocess.Popen` to help move
1617more things off of the unsafe ``preexec_fn`` parameter.
1618
1619..
1620
1621.. bpo: 42066
1622.. date: 2020-10-19-08-50-41
1623.. nonce: DsB-R6
1624.. section: Library
1625
1626Fix cookies getting sorted in :func:`CookieJar.__iter__` which is an extra
1627behavior and not mentioned in RFC 2965 or Netscape cookie protocol. Now the
1628cookies in ``CookieJar`` follows the order of the ``Set-Cookie`` header.
1629Patch by Iman Kermani.
1630
1631..
1632
1633.. bpo: 40617
1634.. date: 2020-05-24-23-52-03
1635.. nonce: lycF9q
1636.. section: Library
1637
1638Add :meth:`~sqlite3.Connection.create_window_function` to
1639:class:`sqlite3.Connection` for creating aggregate window functions. Patch
1640by Erlend E. Aasland.
1641
1642..
1643
1644.. bpo: 40676
1645.. date: 2020-05-19-01-40-51
1646.. nonce: yJfq1J
1647.. section: Library
1648
1649Convert :mod:`csv` to use Argument Clinic for :func:`csv.field_size_limit`,
1650:func:`csv.get_dialect`, :func:`csv.unregister_dialect` and
1651:func:`csv.list_dialects`.
1652
1653..
1654
1655.. bpo: 39716
1656.. date: 2020-02-22-12-02-11
1657.. nonce: z2WhDQ
1658.. section: Library
1659
1660Raise an ArgumentError when the same subparser name is added twice to an
1661`argparse.ArgumentParser`.  This is consistent with the (default) behavior
1662when the same option string is added twice to an ArgumentParser.
1663
1664..
1665
1666.. bpo: 36073
1667.. date: 2019-06-22-11-01-45
1668.. nonce: ED8mB9
1669.. section: Library
1670
1671Raise :exc:`~sqlite3.ProgrammingError` instead of segfaulting on recursive
1672usage of cursors in :mod:`sqlite3` converters. Patch by Sergey Fedoseev.
1673
1674..
1675
1676.. bpo: 34975
1677.. date: 2019-05-06-23-36-34
1678.. nonce: eb49jr
1679.. section: Library
1680
1681Adds a ``start_tls()`` method to :class:`~asyncio.streams.StreamWriter`,
1682which upgrades the connection with TLS using the given
1683:class:`~ssl.SSLContext`.
1684
1685..
1686
1687.. bpo: 22276
1688.. date: 2018-11-11-04-41-11
1689.. nonce: Tt19TW
1690.. section: Library
1691
1692:class:`~pathlib.Path` methods :meth:`~pathlib.Path.glob` and
1693:meth:`~pathlib.Path.rglob` return only directories if *pattern* ends with a
1694pathname components separator (``/`` or :data:`~os.sep`). Patch by Eisuke
1695Kawashima.
1696
1697..
1698
1699.. bpo: 24905
1700.. date: 2018-04-18-16-15-55
1701.. nonce: jYqjYx
1702.. section: Library
1703
1704Add :meth:`~sqlite3.Connection.blobopen` to :class:`sqlite3.Connection`.
1705:class:`sqlite3.Blob` allows incremental I/O operations on blobs. Patch by
1706Aviv Palivoda and Erlend E. Aasland.
1707
1708..
1709
1710.. date: 2022-04-24-22-09-31
1711.. gh-issue: 91888
1712.. nonce: kTjJLx
1713.. section: Documentation
1714
1715Add a new `gh` role to the documentation to link to GitHub issues.
1716
1717..
1718
1719.. date: 2022-04-23-00-22-54
1720.. gh-issue: 91783
1721.. nonce: N09dRR
1722.. section: Documentation
1723
1724Document security issues concerning the use of the function
1725:meth:`shutil.unpack_archive`
1726
1727..
1728
1729.. date: 2022-04-19-20-16-00
1730.. gh-issue: 91547
1731.. nonce: LsNWER
1732.. section: Documentation
1733
1734Remove "Undocumented modules" page.
1735
1736..
1737
1738.. date: 2022-04-17-03-19-51
1739.. gh-issue: 91298
1740.. nonce: NT9qHi
1741.. section: Documentation
1742
1743In ``importlib.resources.abc``, refined the documentation of the Traversable
1744Protocol, applying changes from importlib_resources 5.7.1.
1745
1746..
1747
1748.. bpo: 44347
1749.. date: 2022-04-10-20-28-20
1750.. nonce: Q1m3DM
1751.. section: Documentation
1752
1753Clarify the meaning of *dirs_exist_ok*, a kwarg of :func:`shutil.copytree`.
1754
1755..
1756
1757.. bpo: 36329
1758.. date: 2022-04-06-11-53-41
1759.. nonce: EVtAtK
1760.. section: Documentation
1761
1762Remove 'make -C Doc serve' in favour of 'make -C Doc htmlview'
1763
1764..
1765
1766.. bpo: 47189
1767.. date: 2022-04-01-23-56-13
1768.. nonce: Nss0Y3
1769.. section: Documentation
1770
1771Add a What's New in Python 3.11 entry for the Faster CPython project.
1772Documentation by Ken Jin and Kumar Aditya.
1773
1774..
1775
1776.. bpo: 38668
1777.. date: 2022-04-01-09-28-31
1778.. nonce: j4mrqW
1779.. section: Documentation
1780
1781Update the introduction to documentation for :mod:`os.path` to remove
1782warnings that became irrelevant after the implementations of :pep:`383` and
1783:pep:`529`.
1784
1785..
1786
1787.. bpo: 47115
1788.. date: 2022-03-30-17-08-12
1789.. nonce: R3wt3i
1790.. section: Documentation
1791
1792The documentation now lists which members of C structs are part of the
1793:ref:`Limited API/Stable ABI <stable>`.
1794
1795..
1796
1797.. bpo: 46962
1798.. date: 2022-03-08-22-10-38
1799.. nonce: FIVe9I
1800.. section: Documentation
1801
1802All docstrings in code snippets are now wrapped into :func:`PyDoc_STR` to
1803follow the guideline of `PEP 7's Documentation Strings paragraph
1804<https://www.python.org/dev/peps/pep-0007/#documentation-strings>`_. Patch
1805by Oleg Iarygin.
1806
1807..
1808
1809.. bpo: 26792
1810.. date: 2022-01-23-20-44-53
1811.. nonce: dQ1v1W
1812.. section: Documentation
1813
1814Improve the docstrings of :func:`runpy.run_module` and
1815:func:`runpy.run_path`. Original patch by Andrew Brezovsky.
1816
1817..
1818
1819.. date: 2022-05-02-20-57-04
1820.. gh-issue: 92169
1821.. nonce: Xi4NGV
1822.. section: Tests
1823
1824Use ``warnings_helper.import_deprecated()`` to import deprecated modules
1825uniformly in tests. Patch by Hugo van Kemenade.
1826
1827..
1828
1829.. date: 2022-05-02-20-15-54
1830.. gh-issue: 84461
1831.. nonce: DhxllI
1832.. section: Tests
1833
1834When multiprocessing is enabled, libregrtest can now use a Python executable
1835other than :code:`sys.executable` via the ``--python`` flag.
1836
1837..
1838
1839.. date: 2022-04-25-11-16-36
1840.. gh-issue: 91904
1841.. nonce: 13Uvrz
1842.. section: Tests
1843
1844Fix initialization of :envvar:`PYTHONREGRTEST_UNICODE_GUARD` which prevented
1845running regression tests on non-UTF-8 locale.
1846
1847..
1848
1849.. date: 2022-04-22-19-00-00
1850.. gh-issue: 91752
1851.. nonce: Ji27dd
1852.. section: Tests
1853
1854Added @requires_zlib to test.test_tools.test_freeze.TestFreeze.
1855
1856..
1857
1858.. date: 2022-04-16-17-54-05
1859.. gh-issue: 91607
1860.. nonce: FnXjtW
1861.. section: Tests
1862
1863Fix ``test_concurrent_futures`` to test the correct multiprocessing start
1864method context in several cases where the test logic mixed this up.
1865
1866..
1867
1868.. bpo: 40280
1869.. date: 2022-04-06-10-16-27
1870.. nonce: KT5Apg
1871.. section: Tests
1872
1873Threading tests are now skipped on WASM targets without pthread support.
1874
1875..
1876
1877.. bpo: 47109
1878.. date: 2022-03-24-13-35-01
1879.. nonce: FjKQCE
1880.. section: Tests
1881
1882Test for :mod:`ctypes.macholib.dyld`, :mod:`ctypes.macholib.dylib`, and
1883:mod:`ctypes.macholib.framework` are brought from manual pre-:mod:`unittest`
1884times to :mod:`ctypes.test` location and structure. Patch by Oleg Iarygin.
1885
1886..
1887
1888.. bpo: 29890
1889.. date: 2022-01-24-21-31-09
1890.. nonce: zEG-ra
1891.. section: Tests
1892
1893Add tests for :class:`ipaddress.IPv4Interface` and
1894:class:`ipaddress.IPv6Interface` construction with tuple arguments. Original
1895patch and tests by louisom.
1896
1897..
1898
1899.. date: 2022-05-03-03-36-47
1900.. gh-issue: 89452
1901.. nonce: NIY0fF
1902.. section: Build
1903
1904gdbm-compat is now preferred over ndbm if both are available on the system.
1905This allows avoiding the problematic ndbm.h on macOS.
1906
1907..
1908
1909.. date: 2022-04-20-11-14-51
1910.. gh-issue: 91731
1911.. nonce: zRoPcJ
1912.. section: Build
1913
1914Python is now built with ``-std=c11`` compiler option, rather than
1915``-std=c99``. Patch by Victor Stinner.
1916
1917..
1918
1919.. bpo: 47152
1920.. date: 2022-04-10-16-33-31
1921.. nonce: TLkxKm
1922.. section: Build
1923
1924Add script and make target for generating ``sre_constants.h``.
1925
1926..
1927
1928.. bpo: 47103
1929.. date: 2022-03-23-20-01-16
1930.. nonce: b4-00F
1931.. section: Build
1932
1933Windows ``PGInstrument`` builds now copy a required DLL into the output
1934directory, making it easier to run the profile stage of a PGO build.
1935
1936..
1937
1938.. bpo: 46907
1939.. date: 2022-04-27-19-36-56
1940.. nonce: lfurlP
1941.. section: Windows
1942
1943Update Windows installer to use SQLite 3.38.3.
1944
1945..
1946
1947.. bpo: 47239
1948.. date: 2022-04-06-15-16-37
1949.. nonce: B1HP7i
1950.. section: Windows
1951
1952Fixed --list and --list-paths output for :ref:`launcher` when used in an
1953active virtual environment.
1954
1955..
1956
1957.. bpo: 46907
1958.. date: 2022-03-28-07-01-31
1959.. nonce: Ou3G6Z
1960.. section: Windows
1961
1962Update Windows installer to use SQLite 3.38.2.
1963
1964..
1965
1966.. bpo: 46785
1967.. date: 2022-03-13-20-35-41
1968.. nonce: Pnknyl
1969.. section: Windows
1970
1971Fix race condition between :func:`os.stat` and unlinking a file on Windows,
1972by using errors codes returned by ``FindFirstFileW()`` when appropriate in
1973``win32_xstat_impl``.
1974
1975..
1976
1977.. bpo: 40859
1978.. date: 2020-06-04-10-42-04
1979.. nonce: isKSw7
1980.. section: Windows
1981
1982Update Windows build to use xz-5.2.5
1983
1984..
1985
1986.. bpo: 46907
1987.. date: 2022-05-05-06-21-39
1988.. nonce: dkgFPk
1989.. section: macOS
1990
1991Update macOS installer to SQLite 3.38.4.
1992
1993..
1994
1995.. date: 2022-04-20-14-26-14
1996.. gh-issue: 91583
1997.. nonce: 200qI0
1998.. section: Tools/Demos
1999
2000Fix regression in the code generated by Argument Clinic for functions with
2001the ``defining_class`` parameter.
2002
2003..
2004
2005.. date: 2022-04-18-12-52-16
2006.. gh-issue: 91575
2007.. nonce: fK1TEh
2008.. section: Tools/Demos
2009
2010Add script ``Tools/scripts/generate_re_casefix.py`` and the make target
2011``regen-re`` for generating additional data for case-insensitive matching
2012according to the current Unicode version.
2013
2014..
2015
2016.. date: 2022-04-14-18-11-46
2017.. gh-issue: 91551
2018.. nonce: l_nNT-
2019.. section: Tools/Demos
2020
2021Remove the ancient Pynche color editor.  It has moved to
2022https://gitlab.com/warsaw/pynche
2023
2024..
2025
2026.. date: 2022-05-06-04-55-17
2027.. gh-issue: 88279
2028.. nonce: 3mQ54t
2029.. section: C API
2030
2031Deprecate the C functions: :c:func:`PySys_SetArgv`,
2032:c:func:`PySys_SetArgvEx`, :c:func:`PySys_SetPath`. Patch by Victor Stinner.
2033
2034..
2035
2036.. date: 2022-05-03-20-08-35
2037.. gh-issue: 92154
2038.. nonce: IqMcAJ
2039.. section: C API
2040
2041Added the :c:func:`PyCode_GetCode` function. This function does the
2042equivalent of the Python code ``getattr(code_object, 'co_code')``.
2043
2044..
2045
2046.. date: 2022-05-02-12-39-33
2047.. gh-issue: 92173
2048.. nonce: len2Is
2049.. section: C API
2050
2051Fix the ``closure`` argument to :c:func:`PyEval_EvalCodeEx`.
2052
2053..
2054
2055.. date: 2022-04-26-16-51-31
2056.. gh-issue: 91320
2057.. nonce: QDHmTv
2058.. section: C API
2059
2060Fix C++ compiler warnings about "old-style cast" (``g++ -Wold-style-cast``)
2061in the Python C API. Use C++ ``reinterpret_cast<>`` and ``static_cast<>``
2062casts when the Python C API is used in C++. Patch by Victor Stinner.
2063
2064..
2065
2066.. date: 2022-04-21-23-11-35
2067.. gh-issue: 80527
2068.. nonce: Cx-95G
2069.. section: C API
2070
2071Mark functions as deprecated by :pep:`623`: :c:func:`PyUnicode_AS_DATA`,
2072:c:func:`PyUnicode_AS_UNICODE`, :c:func:`PyUnicode_GET_DATA_SIZE`,
2073:c:func:`PyUnicode_GET_SIZE`. Patch by Victor Stinner.
2074
2075..
2076
2077.. date: 2022-04-21-01-48-22
2078.. gh-issue: 91768
2079.. nonce: x_aKzv
2080.. section: C API
2081
2082:c:func:`Py_REFCNT`, :c:func:`Py_TYPE`, :c:func:`Py_SIZE` and
2083:c:func:`Py_IS_TYPE` functions argument type is now ``PyObject*``, rather
2084than ``const PyObject*``. Patch by Victor Stinner.
2085
2086..
2087
2088.. date: 2022-04-19-17-05-39
2089.. gh-issue: 91020
2090.. nonce: BVJ8F3
2091.. section: C API
2092
2093Add ``PyBytes_Type.tp_alloc`` to initialize ``PyBytesObject.ob_shash`` for
2094bytes subclasses.
2095
2096..
2097
2098.. bpo: 40421
2099.. date: 2022-04-08-11-29-36
2100.. nonce: H0ORmT
2101.. section: C API
2102
2103Add ``PyFrame_GetLasti`` C-API function to access frame object's ``f_lasti``
2104attribute safely from C code.
2105
2106..
2107
2108.. bpo: 35134
2109.. date: 2022-04-07-00-53-51
2110.. nonce: zSjIzk
2111.. section: C API
2112
2113Remove the ``Include/code.h`` header file. C extensions should only include
2114the main ``<Python.h>`` header file. Patch by Victor Stinner.
2115
2116..
2117
2118.. bpo: 47169
2119.. date: 2022-04-06-16-54-39
2120.. nonce: EGzX4B
2121.. section: C API
2122
2123:c:func:`PyOS_CheckStack` is now exported in the Stable ABI on Windows.
2124
2125..
2126
2127.. bpo: 47169
2128.. date: 2022-04-06-16-29-14
2129.. nonce: wVv2bT
2130.. section: C API
2131
2132:c:func:`PyThread_get_thread_native_id` is excluded from the stable ABI on
2133platforms where it doesn't exist (like Solaris).
2134
2135..
2136
2137.. bpo: 46343
2138.. date: 2022-01-11-12-52-37
2139.. nonce: JQJWhZ
2140.. section: C API
2141
2142Added :c:func:`PyErr_GetHandledException` and
2143:c:func:`PyErr_SetHandledException` as simpler alternatives to
2144:c:func:`PyErr_GetExcInfo` and :c:func:`PyErr_SetExcInfo`.
2145
2146They are included in the stable ABI.
2147