summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d/3.12.0a2.rst
blob: 41f5f67df01d91c810b4c8f26c854ce8617a753f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
.. date: 2022-11-04-09-29-36
.. gh-issue: 98433
.. nonce: l76c5G
.. release date: 2022-11-14
.. section: Security

The IDNA codec decoder used on DNS hostnames by :mod:`socket` or
:mod:`asyncio` related name resolution functions no longer involves a
quadratic algorithm. This prevents a potential CPU denial of service if an
out-of-spec excessive length hostname involving bidirectional characters
were decoded. Some protocols such as :mod:`urllib` http ``3xx`` redirects
potentially allow for an attacker to supply such a name.

Individual labels within an IDNA encoded DNS name will now raise an error
early during IDNA decoding if they are longer than 1024 unicode characters
given that each decoded DNS label must be 63 or fewer characters and the
entire decoded DNS name is limited to 255. Only an application presenting a
hostname or label consisting primarily of :rfc:`3454` section 3.1 "Nothing"
characters to be removed would run into of this new limit. See also
:rfc:`5894` section 6 and :rfc:`3491`.

..

.. date: 2022-10-26-21-04-23
.. gh-issue: 98739
.. nonce: keBWcY
.. section: Security

Update bundled libexpat to 2.5.0

..

.. date: 2022-11-11-14-48-17
.. gh-issue: 81057
.. nonce: ik4iOv
.. section: Core and Builtins

The docs clearly say that ``PyImport_Inittab``,
:c:func:`PyImport_AppendInittab`, and :c:func:`PyImport_ExtendInittab`
should not be used after :c:func:`Py_Initialize` has been called. We now
enforce this for the two functions.  Additionally, the runtime now uses an
internal copy of ``PyImport_Inittab``, to guard against modification.

..

.. date: 2022-11-09-12-07-24
.. gh-issue: 99298
.. nonce: NeArAJ
.. section: Core and Builtins

Fix an issue that could potentially cause incorrect error handling for some
bytecode instructions.

..

.. date: 2022-11-08-17-47-10
.. gh-issue: 99254
.. nonce: RSvyFt
.. section: Core and Builtins

The compiler now removes all unused constants from code objects (except the
first one, which may be a docstring).

..

.. date: 2022-11-08-16-35-25
.. gh-issue: 99205
.. nonce: 2YOoFT
.. section: Core and Builtins

Fix an issue that prevented :c:type:`PyThreadState` and
:c:type:`PyInterpreterState` memory from being freed properly.

..

.. date: 2022-11-07-14-16-59
.. gh-issue: 81057
.. nonce: 3uKlLQ
.. section: Core and Builtins

The 18 global C variables holding the state of the allocators have been
moved to ``_PyRuntimeState``.  This is a strictly internal change with no
change in behavior.

..

.. date: 2022-11-07-10-29-41
.. gh-issue: 99181
.. nonce: bfG4bI
.. section: Core and Builtins

Fix failure in :keyword:`except* <except_star>` with unhashable exceptions.

..

.. date: 2022-11-07-08-17-12
.. gh-issue: 99204
.. nonce: Mf4hMD
.. section: Core and Builtins

Fix calculation of :data:`sys._base_executable` when inside a POSIX virtual
environment using copies of the python binary when the base installation
does not provide the executable name used by the venv. Calculation will fall
back to alternative names ("python<MAJOR>", "python<MAJOR>.<MINOR>").

..

.. date: 2022-11-06-22-59-02
.. gh-issue: 96055
.. nonce: TmQuJn
.. section: Core and Builtins

Update :mod:`faulthandler` to emit an error message with the proper
unexpected signal number. Patch by Donghee Na.

..

.. date: 2022-11-06-13-25-01
.. gh-issue: 99153
.. nonce: uE3CVL
.. section: Core and Builtins

Fix location of :exc:`SyntaxError` for a :keyword:`try` block with both
:keyword:`except` and :keyword:`except* <except_star>`.

..

.. date: 2022-11-06-00-47-11
.. gh-issue: 98686
.. nonce: DBDy6U
.. section: Core and Builtins

Merge the adaptive opcode logic into each instruction's unquickened variant,
and merge the logic in ``EXTENDED_ARG_QUICK`` into :opcode:`EXTENDED_ARG`.
With these changes, the quickening that happens at code object creation is
now only responsible for initializing warmup counters and inserting
superinstructions.

..

.. date: 2022-11-06-00-17-58
.. gh-issue: 99103
.. nonce: bFA9BX
.. section: Core and Builtins

Fix the error reporting positions of specialized traceback anchors when the
source line contains Unicode characters.

..

.. date: 2022-11-05-18-36-27
.. gh-issue: 99139
.. nonce: cI9vV1
.. section: Core and Builtins

Improve the error suggestion for :exc:`NameError` exceptions for instances.
Now if a :exc:`NameError` is raised in a method and the instance has an
attribute that's exactly equal to the name in the exception, the suggestion
will include ``self.<NAME>`` instead of the closest match in the method
scope. Patch by Pablo Galindo

..

.. date: 2022-11-03-13-11-17
.. gh-issue: 98401
.. nonce: CBS4nv
.. section: Core and Builtins

Octal escapes with value larger than ``0o377`` (ex: ``"\477"``), deprecated
in Python 3.11, now produce a :exc:`SyntaxWarning`, instead of
:exc:`DeprecationWarning`. In a future Python version they will be
eventually a :exc:`SyntaxError`. Patch by Victor Stinner.

..

.. date: 2022-11-02-17-02-06
.. gh-issue: 98401
.. nonce: y-dbVW
.. section: Core and Builtins

A backslash-character pair that is not a valid escape sequence now generates
a :exc:`SyntaxWarning`, instead of :exc:`DeprecationWarning`.  For example,
``re.compile("\d+\.\d+")`` now emits a :exc:`SyntaxWarning` (``"\d"`` is an
invalid escape sequence), use raw strings for regular expression:
``re.compile(r"\d+\.\d+")``. In a future Python version, :exc:`SyntaxError`
will eventually be raised, instead of :exc:`SyntaxWarning`. Patch by Victor
Stinner.

..

.. date: 2022-11-02-14-42-35
.. gh-issue: 96793
.. nonce: q0Oi74
.. section: Core and Builtins

Handle StopIteration and StopAsyncIteration raised in generator or
coroutines in the bytecode, rather than in wrapping C code.

..

.. date: 2022-10-31-22-55-34
.. gh-issue: 98931
.. nonce: AoWZ-4
.. section: Core and Builtins

Improve the :exc:`SyntaxError` error message when the user types ``import x
from y`` instead of ``from y import x``. Patch by Pablo Galindo

..

.. date: 2022-10-31-21-01-35
.. gh-issue: 98852
.. nonce: MYaRN6
.. section: Core and Builtins

Fix subscription of type aliases containing bare generic types or types like
:class:`~typing.TypeVar`: for example ``tuple[A, T][int]`` and
``tuple[TypeVar, T][int]``, where ``A`` is a generic type, and ``T`` is a
type variable.

..

.. date: 2022-10-31-18-03-10
.. gh-issue: 98925
.. nonce: zpdjVd
.. section: Core and Builtins

Lower the recursion depth for marshal on WASI to support (in-development)
wasmtime 2.0.

..

.. date: 2022-10-28-14-52-55
.. gh-issue: 98783
.. nonce: iG0kMs
.. section: Core and Builtins

Fix multiple crashes in debug mode when ``str`` subclasses are used instead
of ``str`` itself.

..

.. date: 2022-10-28-13-59-51
.. gh-issue: 98811
.. nonce: XQypJa
.. section: Core and Builtins

Use complete source locations to simplify detection of ``__future__``
imports which are not at the beginning of the file. Also corrects the offset
in the exception raised in one case, which was off by one and impeded
highlighting.

..

.. date: 2022-10-28-09-42-51
.. gh-issue: 96793
.. nonce: ucBfWO
.. section: Core and Builtins

Add specialization of :opcode:`FOR_ITER` for generators. Saves multiple
layers of dispatch and checking to get from the :opcode:`FOR_ITER`
instruction in the caller to the :opcode:`RESUME` in the generator.

..

.. date: 2022-10-27-16-42-16
.. gh-issue: 98762
.. nonce: Eb2kzg
.. section: Core and Builtins

Fix source locations of :keyword:`match` sub-patterns.

..

.. date: 2022-10-24-10-30-30
.. gh-issue: 98586
.. nonce: Tha5Iy
.. section: Core and Builtins

Added the methods :c:func:`PyObject_Vectorcall` and
:c:func:`PyObject_VectorcallMethod` to the :ref:`Limited API <stable>` along
with the auxiliary macro constant :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`.

The availability of these functions enables more efficient :PEP:`590` vector
calls from binary extension modules that avoid argument boxing/unboxing
overheads.

..

.. date: 2022-10-21-11-28-53
.. gh-issue: 99257
.. nonce: nmcuf-
.. section: Core and Builtins

Fix an issue where member descriptors (such as those for
:attr:`~object.__slots__`) could behave incorrectly or crash instead of
raising a :exc:`TypeError` when accessed via an instance of an invalid type.

..

.. date: 2022-10-19-23-54-43
.. gh-issue: 93143
.. nonce: 1wCYub
.. section: Core and Builtins

Rather than changing :attr:`~types.CodeType.co_code`, the interpreter will
now display a :exc:`RuntimeWarning` and assign :const:`None` to any fast
locals that are left unbound after jumps or :keyword:`del` statements
executed while tracing.

..

.. date: 2022-10-19-15-59-08
.. gh-issue: 96421
.. nonce: e22y3r
.. section: Core and Builtins

When calling into Python code from C code, through
:c:func:`PyEval_EvalFrameEx` or a related C-API function, a shim frame in
inserted into the call stack. This occurs in the
``_PyEval_EvalFrameDefault()`` function. The extra frame should be invisible
to all Python and most C extensions, but out-of-process profilers and
debuggers need to be aware of it. These shim frames can be detected by
checking ``frame->owner == FRAME_OWNED_BY_CSTACK``.

Extensions implementing their own interpreters using PEP 523 need to be
aware of this shim frame and the changes to the semantics of
:opcode:`RETURN_VALUE`, :opcode:`YIELD_VALUE`, and
:opcode:`RETURN_GENERATOR`, which now clear the frame.

..

.. date: 2022-10-19-01-01-08
.. gh-issue: 98415
.. nonce: ZS2eWh
.. section: Core and Builtins

Fix detection of MAC addresses for :mod:`uuid` on certain OSs. Patch by
Chaim Sanders

..

.. date: 2022-10-16-13-26-46
.. gh-issue: 98686
.. nonce: D9Gu_Q
.. section: Core and Builtins

Quicken all code objects, and specialize adaptive bytecode instructions more
aggressively.

..

.. date: 2022-10-15-23-15-14
.. gh-issue: 92119
.. nonce: PMSwwG
.. section: Core and Builtins

Print exception class name instead of its string representation when raising
errors from :mod:`ctypes` calls.

..

.. date: 2022-10-15-22-25-20
.. gh-issue: 91058
.. nonce: Uo2kW-
.. section: Core and Builtins

:exc:`ImportError` raised from failed ``from <module> import <name>`` now
include suggestions for the value of ``<name>`` based on the available names
in ``<module>``. Patch by Pablo Galindo

..

.. date: 2022-09-13-14-07-06
.. gh-issue: 96793
.. nonce: 7DLRSm
.. section: Core and Builtins

The :opcode:`FOR_ITER` now leaves the iterator on the stack on termination
of the loop. This is to assist specialization of loops for generators.

..

.. date: 2022-09-09-16-32-58
.. gh-issue: 90716
.. nonce: z4yuYq
.. section: Core and Builtins

Add _pylong.py module.  It includes asymptotically faster algorithms that
can be used for operations on integers with many digits.  It is used by
longobject.c to speed up some operations.

..

.. date: 2022-07-30-14-10-27
.. gh-issue: 95389
.. nonce: nSGEkG
.. section: Core and Builtins

Expose :const:`~socket.ETH_P_ALL` and some of the :ref:`ETHERTYPE_* constants
<socket-ethernet-types>` in :mod:`socket`. Patch by Noam Cohen.

..

.. date: 2022-06-10-16-37-44
.. gh-issue: 93696
.. nonce: 65BI2R
.. section: Core and Builtins

Allow :mod:`pdb` to locate source for frozen modules in the standard
library.

..

.. date: 2022-11-12-15-45-51
.. gh-issue: 99418
.. nonce: FxfAXS
.. section: Library

Fix bug in :func:`urllib.parse.urlparse` that causes URL schemes that begin
with a digit, a plus sign, or a minus sign to be parsed incorrectly.

..

.. date: 2022-11-11-18-23-41
.. gh-issue: 94597
.. nonce: m6vMDK
.. section: Library

Deprecate :class:`asyncio.AbstractChildWatcher` to be removed in Python
3.14. Patch by Kumar Aditya.

..

.. date: 2022-11-10-11-51-39
.. gh-issue: 99305
.. nonce: 6LzQc3
.. section: Library

Improve performance of :func:`secrets.token_hex`.

..

.. date: 2022-11-09-20-48-42
.. gh-issue: 74044
.. nonce: zBj26K
.. section: Library

Fixed bug where :func:`inspect.signature` reported incorrect arguments for
decorated methods.

..

.. date: 2022-11-09-12-16-35
.. gh-issue: 99275
.. nonce: klOqoL
.. section: Library

Fix ``SystemError`` in :mod:`ctypes` when exception was not set during
``__initsubclass__``.

..

.. date: 2022-11-09-08-40-52
.. gh-issue: 99277
.. nonce: J1P44O
.. section: Library

Remove older version of ``_SSLProtocolTransport.get_write_buffer_limits`` in
:mod:`!asyncio.sslproto`

..

.. date: 2022-11-08-11-15-37
.. gh-issue: 99248
.. nonce: 1vt8xI
.. section: Library

fix negative numbers failing in verify()

..

.. date: 2022-11-06-12-44-51
.. gh-issue: 99155
.. nonce: vLZOzi
.. section: Library

Fix :class:`statistics.NormalDist` pickle with ``0`` and ``1`` protocols.

..

.. date: 2022-11-05-23-16-15
.. gh-issue: 93464
.. nonce: ucd4vP
.. section: Library

``enum.auto()`` is now correctly activated when combined with other
assignment values.  E.g. ``ONE = auto(), 'some text'`` will now evaluate as
``(1, 'some text')``.

..

.. date: 2022-11-05-17-16-40
.. gh-issue: 99134
.. nonce: Msgspf
.. section: Library

Update the bundled copy of pip to version 22.3.1.

..

.. date: 2022-11-03-15-28-07
.. gh-issue: 92584
.. nonce: m5ctkm
.. section: Library

Remove the ``distutils`` package. It was deprecated in Python 3.10 by
:pep:`632` "Deprecate distutils module". For projects still using
``distutils`` and cannot be updated to something else, the ``setuptools``
project can be installed: it still provides ``distutils``. Patch by Victor
Stinner.

..

.. date: 2022-11-02-18-27-13
.. gh-issue: 98999
.. nonce: Ai2KDh
.. section: Library

Now :mod:`_pyio` is consistent with :mod:`_io` in raising ``ValueError``
when executing methods over closed buffers.

..

.. date: 2022-11-02-05-54-02
.. gh-issue: 83004
.. nonce: 0v8iyw
.. section: Library

Clean up refleak on failed module initialisation in :mod:`_zoneinfo`

..

.. date: 2022-11-02-05-53-25
.. gh-issue: 83004
.. nonce: qc_KHr
.. section: Library

Clean up refleaks on failed module initialisation in :mod:`_pickle`

..

.. date: 2022-11-02-05-52-36
.. gh-issue: 83004
.. nonce: LBl79O
.. section: Library

Clean up refleak on failed module initialisation in :mod:`_io`.

..

.. date: 2022-10-31-12-34-03
.. gh-issue: 98897
.. nonce: rgNn4x
.. section: Library

Fix memory leak in :func:`math.dist` when both points don't have the same
dimension. Patch by Kumar Aditya.

..

.. date: 2022-10-30-22-42-48
.. gh-issue: 98878
.. nonce: fgrykp
.. section: Library

Use the frame bound builtins when offering a name suggestion in
:mod:`traceback` to prevent crashing when ``__builtins__`` is not a dict.

..

.. date: 2022-10-30-15-26-33
.. gh-issue: 98139
.. nonce: qtm-9T
.. section: Library

In :mod:`importlib._bootstrap`, enhance namespace package repr to `<module
'x' (namespace) from ['path']>`.

..

.. date: 2022-10-29-09-42-20
.. gh-issue: 90352
.. nonce: t8QEPt
.. section: Library

Fix ``_SelectorDatagramTransport`` to inherit from
:class:`~asyncio.DatagramTransport` in :mod:`asyncio`. Patch by Kumar
Aditya.

..

.. date: 2022-10-29-03-40-18
.. gh-issue: 98793
.. nonce: WSPB4A
.. section: Library

Fix argument typechecks in :func:`!_overlapped.WSAConnect` and
:func:`!_overlapped.Overlapped.WSASendTo` functions.

..

.. date: 2022-10-28-23-44-17
.. gh-issue: 98744
.. nonce: sGHDWm
.. section: Library

Prevent crashing in :mod:`traceback` when retrieving the byte-offset for
some source files that contain certain unicode characters.

..

.. date: 2022-10-27-12-56-38
.. gh-issue: 98740
.. nonce: ZoqqGM
.. section: Library

Fix internal error in the :mod:`re` module which in very rare circumstances
prevented compilation of a regular expression containing a :ref:`conditional
expression <re-conditional-expression>` without the "else" branch.

..

.. date: 2022-10-26-07-51-55
.. gh-issue: 98703
.. nonce: 0hW773
.. section: Library

Fix :meth:`asyncio.StreamWriter.drain` to call ``protocol.connection_lost``
callback only once on Windows.

..

.. date: 2022-10-25-20-17-34
.. gh-issue: 98624
.. nonce: YQUPFy
.. section: Library

Add a mutex to unittest.mock.NonCallableMock to protect concurrent access to
mock attributes.

..

.. date: 2022-10-25-07-00-31
.. gh-issue: 98658
.. nonce: nGABW9
.. section: Library

The :class:`array.array` class now supports subscripting, making it a
:term:`generic type`.

..

.. date: 2022-10-15-10-43-45
.. gh-issue: 98284
.. nonce: SaVHTd
.. section: Library

Improved :class:`TypeError` message for undefined abstract methods of a
:class:`abc.ABC` instance. The names of the missing methods are surrounded
by single-quotes to highlight them.

..

.. date: 2022-10-10-07-07-31
.. gh-issue: 96151
.. nonce: K9fwoq
.. section: Library

Allow ``BUILTINS`` to be a valid field name for frozen dataclasses.

..

.. date: 2022-10-08-19-39-27
.. gh-issue: 98086
.. nonce: y---WC
.. section: Library

Make sure ``patch.dict()`` can be applied on async functions.

..

.. date: 2022-09-05-17-08-56
.. gh-issue: 72719
.. nonce: jUpzF3
.. section: Library

Remove modules :mod:`asyncore` and :mod:`asynchat`, which were deprecated by
:pep:`594`.

..

.. date: 2022-08-23-03-13-18
.. gh-issue: 96192
.. nonce: TJywOF
.. section: Library

Fix handling of ``bytes`` :term:`path-like objects <path-like object>` in
:func:`os.ismount()`.

..

.. date: 2022-06-23-15-36-49
.. gh-issue: 94172
.. nonce: DzQk0s
.. section: Library

:mod:`ftplib`: Remove the ``FTP_TLS.ssl_version`` class attribute: use the
*context* parameter instead. Patch by Victor Stinner

..

.. date: 2022-06-23-15-31-49
.. gh-issue: 94172
.. nonce: AXE2IZ
.. section: Library

Remove the *keyfile* and *certfile* parameters from the
:mod:`ftplib`, :mod:`imaplib`, :mod:`poplib` and :mod:`smtplib` modules,
and the *key_file*, *cert_file* and *check_hostname* parameters from the
:mod:`http.client` module,
all deprecated since Python 3.6. Use the *context*
parameter (*ssl_context* in :mod:`imaplib`) instead. Patch by Victor
Stinner.

..

.. date: 2022-06-14-22-46-05
.. gh-issue: 83638
.. nonce: 73xfGK
.. section: Library

Add the :attr:`~sqlite3.Connection.autocommit` attribute to
:class:`sqlite3.Connection` and the *autocommit* parameter to
:func:`sqlite3.connect` to control :pep:`249`-compliant :ref:`transaction
handling <sqlite3-transaction-control-autocommit>`. Patch by Erlend E.
Aasland.

..

.. date: 2022-05-08-08-47-32
.. gh-issue: 92452
.. nonce: 3pNHe6
.. section: Library

Fixed a race condition that could cause :func:`sysconfig.get_config_var` to
incorrectly return :const:`None` in multi-threaded programs.

..

.. date: 2022-05-03-11-32-29
.. gh-issue: 91803
.. nonce: pI4Juv
.. section: Library

Fix an error when using a method of objects mocked with
:func:`unittest.mock.create_autospec` after it was sealed with
:func:`unittest.mock.seal` function.

..

.. bpo: 38523
.. date: 2020-10-23-22-20-52
.. nonce: CrkxLh
.. section: Library

:func:`shutil.copytree` now applies the *ignore_dangling_symlinks* argument
recursively.

..

.. bpo: 40358
.. date: 2020-04-30-02-15-08
.. nonce: A4ygqe
.. section: Library

Add walk_up argument in :meth:`pathlib.PurePath.relative_to`.

..

.. bpo: 36267
.. date: 2019-09-03-15-45-19
.. nonce: z42Ex7
.. section: Library

Fix IndexError in :class:`argparse.ArgumentParser` when a ``store_true``
action is given an explicit argument.

..

.. date: 2022-10-29-02-33-46
.. gh-issue: 98832
.. nonce: DudEIH
.. section: Documentation

Changes wording of docstring for :func:`pathlib.Path.iterdir`.

..

.. date: 2022-10-06-13-00-28
.. gh-issue: 97966
.. nonce: fz7kFg
.. section: Documentation

Update uname docs to clarify the special nature of the platform attribute
and to indicate when it became late-bound.

..

.. date: 2022-10-31-14-47-49
.. gh-issue: 98903
.. nonce: 7KinCV
.. section: Tests

The Python test suite now fails wit exit code 4 if no tests ran. It should
help detecting typos in test names and test methods.

..

.. date: 2022-10-26-15-19-20
.. gh-issue: 98713
.. nonce: Lnu32R
.. section: Tests

Fix a bug in the :mod:`typing` tests where a test relying on
CPython-specific implementation details was not decorated with
``@cpython_only`` and was not skipped on other implementations.

..

.. date: 2022-10-15-07-46-48
.. gh-issue: 87390
.. nonce: asR-Zo
.. section: Tests

Add tests for star-unpacking with PEP 646, and some other miscellaneous PEP
646 tests.

..

.. date: 2022-10-12-14-57-06
.. gh-issue: 96853
.. nonce: ANe-bw
.. section: Tests

Added explicit coverage of ``Py_Initialize`` (and hence ``Py_InitializeEx``)
back to the embedding tests (all other embedding tests migrated to
``Py_InitializeFromConfig`` in Python 3.11)

..

.. bpo: 34272
.. date: 2018-07-29-15-59-51
.. nonce: lVX2uR
.. section: Tests

Some C API tests were moved into the new Lib/test/test_capi/ directory.

..

.. date: 2022-11-04-02-58-10
.. gh-issue: 99086
.. nonce: DV_4Br
.. section: Build

Fix ``-Wimplicit-int`` compiler warning in :program:`configure` check for
``PTHREAD_SCOPE_SYSTEM``.

..

.. date: 2022-11-02-19-25-07
.. gh-issue: 99016
.. nonce: R05NkD
.. section: Build

Fix build with ``PYTHON_FOR_REGEN=python3.8``.

..

.. date: 2022-11-02-18-45-35
.. gh-issue: 97731
.. nonce: zKpTlj
.. section: Build

Specify the full path to the source location for ``make docclean`` (needed
for cross-builds).

..

.. date: 2022-11-02-10-56-40
.. gh-issue: 98949
.. nonce: 3SRD8C
.. section: Build

Drop unused build dependency on ``readelf``.

..

.. date: 2022-11-01-21-45-58
.. gh-issue: 98989
.. nonce: tMxbdB
.. section: Build

Use ``python3.11``, if available, for regeneration and freezing.

..

.. date: 2022-10-28-22-24-26
.. gh-issue: 98831
.. nonce: IXRCRX
.. section: Build

Add new tooling, in ``Tools/cases_generator``, to generate the interpreter
switch statement from a list of opcode definitions. This only affects
adding, modifying or removing instruction definitions. The instruction
definitions now live in ``Python/bytecodes.c``, in the form of a `custom DSL
(under development)
<https://github.com/faster-cpython/ideas/blob/main/3.12/interpreter_definition.md>`__.
The tooling reads this file and writes ``Python/generated_cases.c.h``, which
is then included by ``Python/ceval.c`` to provide most of the cases of the
main interpreter switch.

..

.. date: 2022-10-28-18-53-40
.. gh-issue: 98817
.. nonce: oPqrtt
.. section: Build

Remove PCbuild/lib.pyproj: it's not used for anything, is only a minor
convenience for Visual Studio users (who probably mostly don't even know
about it), and it takes a lot of maintenance effort to keep updated.

..

.. date: 2022-10-27-19-47-31
.. gh-issue: 98776
.. nonce: lt_UOG
.. section: Build

Fix ``make regen-test-levenshtein`` for out-of-tree builds.

..

.. date: 2022-10-26-12-37-52
.. gh-issue: 98707
.. nonce: eVXGEx
.. section: Build

Don't use vendored ``libmpdec`` headers if :option:`--with-system-libmpdec`
is passed to :program:`configure`. Don't use vendored ``libexpat`` headers
if :option:`--with-system-expat` is passed to :program:`configure`.

..

.. date: 2022-11-01-11-07-33
.. gh-issue: 98689
.. nonce: 0f6e_N
.. section: Windows

Update Windows builds to zlib v1.2.13.  v1.2.12 has CVE-2022-37434, but the
vulnerable ``inflateGetHeader`` API is not used by Python.

..

.. date: 2022-11-01-00-37-13
.. gh-issue: 98790
.. nonce: fpaPAx
.. section: Windows

Assumes that a missing ``DLLs`` directory means that standard extension
modules are in the executable's directory.

..

.. date: 2022-10-27-20-30-16
.. gh-issue: 98745
.. nonce: v06p4r
.. section: Windows

Update :file:`py.exe` launcher to install 3.11 by default and 3.12 on
request.

..

.. date: 2022-10-26-17-43-09
.. gh-issue: 98692
.. nonce: bOopfZ
.. section: Windows

Fix the :ref:`launcher` ignoring unrecognized shebang lines instead of
treating them as local paths

..

.. date: 2022-10-25-10-34-17
.. gh-issue: 94328
.. nonce: 19NhdU
.. section: Windows

Update Windows installer to use SQLite 3.39.4.

..

.. date: 2022-10-25-10-32-23
.. gh-issue: 94328
.. nonce: W3YNC_
.. section: macOS

Update macOS installer to SQLite 3.39.4.

..

.. date: 2022-11-04-16-13-35
.. gh-issue: 98724
.. nonce: p0urWO
.. section: C API

The :c:macro:`Py_CLEAR`, :c:macro:`Py_SETREF` and :c:macro:`Py_XSETREF`
macros now only evaluate their argument once. If the argument has side
effects, these side effects are no longer duplicated. Patch by Victor
Stinner.

..

.. date: 2022-11-03-17-46-41
.. gh-issue: 98978
.. nonce: KJjBvv
.. section: C API

Fix use-after-free in ``Py_SetPythonHome(NULL)``,
``Py_SetProgramName(NULL)`` and ``_Py_SetProgramFullPath(NULL)`` function
calls. Issue reported by Benedikt Reinartz. Patch by Victor Stinner.

..

.. date: 2022-10-25-17-50-43
.. gh-issue: 98410
.. nonce: NSXYfm
.. section: C API

Add ``getbufferproc`` and ``releasebufferproc`` to the stable API.

..

.. date: 2022-10-24-12-09-17
.. gh-issue: 98610
.. nonce: PLX2Np
.. section: C API

Some configurable capabilities of sub-interpreters have changed. They always
allow subprocesses (:mod:`subprocess`) now, whereas before subprocesses
could be optionally disallowed for a sub-interpreter. Instead
:func:`os.exec` can now be disallowed. Disallowing daemon threads is now
supported.  Disallowing all threads is still allowed, but is never done by
default. Note that the optional restrictions are only available through
``_Py_NewInterpreterFromConfig()``, which isn't a public API. They do not
affect the main interpreter, nor :c:func:`Py_NewInterpreter`.

..

.. date: 2022-10-24-11-26-55
.. gh-issue: 98608
.. nonce: _Q2lNV
.. section: C API

A ``_PyInterpreterConfig`` has been added and ``_Py_NewInterpreter()`` has
been renamed to ``_Py_NewInterpreterFromConfig()``.  The
"isolated_subinterpreters" argument is now a granular config that captures
the previous behavior.  Note that this is all "private" API.

..

.. date: 2022-10-16-15-00-25
.. gh-issue: 96853
.. nonce: V0wiXP
.. section: C API

``Py_InitializeEx`` now correctly calls ``PyConfig_Clear`` after
initializing the interpreter (the omission didn't cause a memory leak only
because none of the dynamically allocated config fields are populated by the
wrapper function)

..

.. date: 2022-08-05-15-26-12
.. gh-issue: 91248
.. nonce: ujirJJ
.. section: C API

Add :c:func:`PyFrame_GetVar` and :c:func:`PyFrame_GetVarString` functions to
get a frame variable by its name. Patch by Victor Stinner.