aboutsummaryrefslogtreecommitdiff
path: root/Misc/NEWS.d/3.11.1.rst
blob: 62cf53afe507c99c473d1e900447855e37fc6721 (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
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
.. date: 2022-12-05-01-39-10
.. gh-issue: 100001
.. nonce: uD05Fc
.. release date: 2022-12-06
.. section: Security

``python -m http.server`` no longer allows terminal control characters sent
within a garbage request to be printed to the stderr server log.

This is done by changing the :mod:`http.server`
:class:`BaseHTTPRequestHandler` ``.log_message`` method to replace control
characters with a ``\xHH`` hex escape before printing.

..

.. date: 2022-11-11-12-50-28
.. gh-issue: 87604
.. nonce: OtwH5L
.. section: Security

Avoid publishing list of active per-interpreter audit hooks via the
:mod:`gc` module

..

.. date: 2022-11-04-09-29-36
.. gh-issue: 98433
.. nonce: l76c5G
.. 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.

..

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

Update bundled libexpat to 2.5.0

..

.. date: 2022-09-28-12-10-57
.. gh-issue: 97612
.. nonce: y6NvOQ
.. section: Security

Fix a shell code injection vulnerability in the
``get-remote-certificate.py`` example script. The script no longer uses a
shell to run ``openssl`` commands. Issue reported and initial fix by Caleb
Shortt. Patch by Victor Stinner.

..

.. date: 2022-11-30-15-29-08
.. gh-issue: 99886
.. nonce: feJkSv
.. section: Core and Builtins

Fix a crash when an object which does not have a dictionary frees its
instance values.

..

.. date: 2022-11-30-11-09-40
.. gh-issue: 99891
.. nonce: 9VomwB
.. section: Core and Builtins

Fix a bug in the tokenizer that could cause infinite recursion when showing
syntax warnings that happen in the first line of the source. Patch by Pablo
Galindo

..

.. date: 2022-11-26-05-34-00
.. gh-issue: 99729
.. nonce: A3ovwQ
.. section: Core and Builtins

Fix an issue that could cause frames to be visible to Python code as they
are being torn down, possibly leading to memory corruption or hard crashes
of the interpreter.

..

.. date: 2022-11-21-11-27-14
.. gh-issue: 99578
.. nonce: DcKoBJ
.. section: Core and Builtins

Fix a reference bug in :func:`_imp.create_builtin()` after the creation of
the first sub-interpreter for modules ``builtins`` and ``sys``. Patch by
Victor Stinner.

..

.. date: 2022-11-19-22-27-52
.. gh-issue: 99581
.. nonce: yKYPbf
.. section: Core and Builtins

Fixed a bug that was causing a buffer overflow if the tokenizer copies a
line missing the newline caracter from a file that is as long as the
available tokenizer buffer. Patch by Pablo galindo

..

.. date: 2022-11-18-11-24-25
.. gh-issue: 99553
.. nonce: F64h-n
.. section: Core and Builtins

Fix bug where an :exc:`ExceptionGroup` subclass can wrap a
:exc:`BaseException`.

..

.. date: 2022-11-12-01-39-57
.. gh-issue: 99370
.. nonce: _cu32j
.. section: Core and Builtins

Fix zip path for venv created from a non-installed python on POSIX
platforms.

..

.. date: 2022-11-10-02-11-23
.. 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-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-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 Dong-hee 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-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-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 wasmtime 2.0/main.

..

.. 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-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-48-46
.. gh-issue: 98374
.. nonce: eOBh8M
.. section: Core and Builtins

Suppress ImportError for invalid query for help() command. Patch by Dong-hee
Na.

..

.. 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-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-06-15-45-57
.. gh-issue: 96078
.. nonce: fS-6mU
.. section: Core and Builtins

:func:`os.sched_yield` now release the GIL while calling sched_yield(2).
Patch by Dong-hee Na.

..

.. date: 2022-10-06-05-41-01
.. gh-issue: 93354
.. nonce: 6BpHl2
.. section: Core and Builtins

Fix an issue that could delay the specialization of :opcode:`PRECALL`
instructions.

..

.. date: 2022-10-05-17-02-22
.. gh-issue: 97943
.. nonce: LYAWlE
.. section: Core and Builtins

Bugfix: :func:`PyFunction_GetAnnotations` should return a borrowed
reference. It was returning a new reference.

..

.. date: 2022-10-04-02-00-10
.. gh-issue: 97779
.. nonce: f3N1hI
.. section: Core and Builtins

Ensure that all Python frame objects are backed by "complete" frames.

..

.. date: 2022-10-01-08-55-09
.. gh-issue: 97591
.. nonce: pw6kkH
.. section: Core and Builtins

Fixed a missing incref/decref pair in ``Exception.__setstate__()``. Patch by
Ofey Chan.

..

.. date: 2022-09-29-15-19-29
.. gh-issue: 94526
.. nonce: wq5m6T
.. section: Core and Builtins

Fix the Python path configuration used to initialized :data:`sys.path` at
Python startup. Paths are no longer encoded to UTF-8/strict to avoid
encoding errors if it contains surrogate characters (bytes paths are decoded
with the surrogateescape error handler). Patch by Victor Stinner.

..

.. date: 2022-09-20-11-06-45
.. gh-issue: 95921
.. nonce: dkcRQn
.. section: Core and Builtins

Fix overly-broad source position information for chained comparisons used as
branching conditions.

..

.. date: 2022-09-16-16-54-35
.. gh-issue: 96387
.. nonce: GRzewg
.. section: Core and Builtins

At Python exit, sometimes a thread holding the GIL can wait forever for a
thread (usually a daemon thread) which requested to drop the GIL, whereas
the thread already exited. To fix the race condition, the thread which
requested the GIL drop now resets its request before exiting. Issue
discovered and analyzed by Mingliang ZHAO. Patch by Victor Stinner.

..

.. date: 2022-09-16-12-36-13
.. gh-issue: 96864
.. nonce: PLU3i8
.. section: Core and Builtins

Fix a possible assertion failure, fatal error, or :exc:`SystemError` if a
line tracing event raises an exception while opcode tracing is enabled.

..

.. date: 2022-09-13-12-06-46
.. gh-issue: 96678
.. nonce: NqGFyb
.. section: Core and Builtins

Fix undefined behaviour in C code of null pointer arithmetic.

..

.. date: 2022-09-12-16-58-22
.. gh-issue: 96754
.. nonce: 0GRme5
.. section: Core and Builtins

Make sure that all frame objects created are created from valid interpreter
frames. Prevents the possibility of invalid frames in backtraces and signal
handlers.

..

.. date: 2022-08-29-13-06-58
.. gh-issue: 95196
.. nonce: eGRR4b
.. section: Core and Builtins

Disable incorrect pickling of the C implemented classmethod descriptors.

..

.. date: 2022-08-15-21-08-11
.. gh-issue: 96005
.. nonce: 6eoc8k
.. section: Core and Builtins

On WASI :data:`~errno.ENOTCAPABLE` is now mapped to :exc:`PermissionError`.
The :mod:`errno` modules exposes the new error number. ``getpath.py`` now
ignores :exc:`PermissionError` when it cannot open landmark files
``pybuilddir.txt`` and ``pyenv.cfg``.

..

.. 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.

..

.. bpo: 31718
.. date: 2020-02-23-23-48-15
.. nonce: sXko5e
.. section: Core and Builtins

Raise :exc:`ValueError` instead of :exc:`SystemError` when methods of
uninitialized :class:`io.IncrementalNewlineDecoder` objects are called.
Patch by Oren Milman.

..

.. bpo: 38031
.. date: 2019-09-04-19-09-49
.. nonce: Yq4L72
.. section: Core and Builtins

Fix a possible assertion failure in :class:`io.FileIO` when the opener
returns an invalid file descriptor.

..

.. date: 2022-12-05-13-40-15
.. gh-issue: 100001
.. nonce: 78ReYp
.. section: Library

Also \ escape \s in the http.server BaseHTTPRequestHandler.log_message so
that it is technically possible to parse the line and reconstruct what the
original data was.  Without this a \xHH is ambiguious as to if it is a hex
replacement we put in or the characters r"\x" came through in the original
request line.

..

.. date: 2022-12-02-13-05-00
.. gh-issue: 93453
.. nonce: EFj1NN
.. section: Library

:func:`asyncio.get_event_loop` now only emits a deprecation warning when a
new event loop was created implicitly. It no longer emits a deprecation
warning if the current event loop was set.

..

.. date: 2022-11-21-17-56-18
.. gh-issue: 51524
.. nonce: nTykx8
.. section: Library

Fix bug when calling trace.CoverageResults with valid infile.

..

.. date: 2022-11-21-13-49-03
.. gh-issue: 99645
.. nonce: 9w1QKq
.. section: Library

Fix a bug in handling class cleanups in :class:`unittest.TestCase`.  Now
``addClassCleanup()`` uses separate lists for different ``TestCase``
subclasses, and ``doClassCleanups()`` only cleans up the particular class.

..

.. date: 2022-11-15-10-55-24
.. gh-issue: 97001
.. nonce: KeQuVF
.. section: Library

Release the GIL when calling termios APIs to avoid blocking threads.

..

.. date: 2022-11-13-02-06-56
.. gh-issue: 99341
.. nonce: 8-OlwB
.. section: Library

Fix :func:`ast.increment_lineno` to also cover :class:`ast.TypeIgnore` when
changing line numbers.

..

.. 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-12-12-15-30
.. gh-issue: 99382
.. nonce: dKg_rW
.. section: Library

Check the number of arguments in substitution in user generics containing a
:class:`~typing.TypeVarTuple` and one or more :class:`~typing.TypeVar`.

..

.. date: 2022-11-12-12-10-23
.. gh-issue: 99379
.. nonce: bcGhxF
.. section: Library

Fix substitution of :class:`~typing.ParamSpec` followed by
:class:`~typing.TypeVarTuple` in generic aliases.

..

.. date: 2022-11-12-12-08-34
.. gh-issue: 99344
.. nonce: 7M_u8G
.. section: Library

Fix substitution of :class:`~typing.TypeVarTuple` and
:class:`~typing.ParamSpec` together in user generics.

..

.. 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-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 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-12-22-24
.. gh-issue: 98706
.. nonce: v1Kuy5
.. section: Library

[3.11] Applied changes from importlib_metadata `4.11.4 through 4.13
<https://importlib-metadata.readthedocs.io/en/latest/history.html#v4-13-0>`_,
including compatibility and robustness fixes for ``Distribution`` objects
without ``_normalized_name``, disallowing invalid inputs to
``Distribution.from_name``, and refined behaviors in
``PathDistribution._name_from_stem`` and
``PathDistribution._normalized_name``.

..

.. 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-23-18-30-39
.. gh-issue: 89237
.. nonce: kBui30
.. section: Library

Fix hang on Windows in ``subprocess.wait_closed()`` in :mod:`asyncio` with
:class:`~asyncio.ProactorEventLoop`. Patch by Kumar Aditya.

..

.. date: 2022-10-19-18-31-53
.. gh-issue: 98458
.. nonce: vwyq7O
.. section: Library

Fix infinite loop in unittest when a self-referencing chained exception is
raised

..

.. date: 2022-10-19-09-29-12
.. gh-issue: 97928
.. nonce: xj3im7
.. section: Library

:meth:`tkinter.Text.count` raises now an exception for options starting with
"-" instead of silently ignoring them.

..

.. date: 2022-10-16-18-52-00
.. gh-issue: 97966
.. nonce: humlhz
.. section: Library

On ``uname_result``, restored expectation that ``_fields`` and ``_asdict``
would include all six properties including ``processor``.

..

.. date: 2022-10-16-06-18-59
.. gh-issue: 98307
.. nonce: b2_CDu
.. section: Library

A :meth:`~logging.handlers.SysLogHandler.createSocket` method was added to
:class:`~logging.handlers.SysLogHandler`.

..

.. date: 2022-10-14-19-57-37
.. gh-issue: 96035
.. nonce: 0xcX-p
.. section: Library

Fix bug in :func:`urllib.parse.urlparse` that causes certain port numbers
containing whitespace, underscores, plus and minus signs, or non-ASCII
digits to be incorrectly accepted.

..

.. date: 2022-10-14-11-46-31
.. gh-issue: 98251
.. nonce: Uxc9al
.. section: Library

Allow :mod:`venv` to pass along :envvar:`PYTHON*` variables to ``ensurepip``
and ``pip`` when they do not impact path resolution

..

.. date: 2022-10-12-10-00-40
.. gh-issue: 98178
.. nonce: hspH51
.. section: Library

On macOS, fix a crash in :func:`syslog.syslog` in multi-threaded
applications. On macOS, the libc ``syslog()`` function is not thread-safe,
so :func:`syslog.syslog` no longer releases the GIL to call it. Patch by
Victor Stinner.

..

.. 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-09-12-12-38
.. gh-issue: 87730
.. nonce: ClgP3f
.. section: Library

Wrap network errors consistently in urllib FTP support, so the test suite
doesn't fail when a network is available but the public internet is not
reachable.

..

.. 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-10-06-23-42-00
.. gh-issue: 90985
.. nonce: s280JY
.. section: Library

Earlier in 3.11 we deprecated ``asyncio.Task.cancel("message")``. We
realized we were too harsh, and have undeprecated it.

..

.. date: 2022-10-04-21-21-41
.. gh-issue: 97837
.. nonce: 19q-eg
.. section: Library

Change deprecate warning message in :mod:`unittest` from

``It is deprecated to return a value!=None``

to

``It is deprecated to return a value that is not None from a test case``

..

.. date: 2022-10-04-07-55-19
.. gh-issue: 97825
.. nonce: mNdv1l
.. section: Library

Fixes :exc:`AttributeError` when :meth:`subprocess.check_output` is used
with argument ``input=None`` and either of the arguments *encoding* or
*errors* are used.

..

.. date: 2022-10-02-12-38-22
.. gh-issue: 82836
.. nonce: OvYLmC
.. section: Library

Fix :attr:`~ipaddress.IPv4Address.is_private` properties in the
:mod:`ipaddress` module. Previously non-private networks (0.0.0.0/0) would
return True from this method; now they correctly return False.

..

.. date: 2022-09-30-15-56-20
.. gh-issue: 96827
.. nonce: lzy1iw
.. section: Library

Avoid spurious tracebacks from :mod:`asyncio` when default executor cleanup
is delayed until after the event loop is closed (e.g. as the result of a
keyboard interrupt).

..

.. date: 2022-09-29-23-22-24
.. gh-issue: 97592
.. nonce: tpJg_J
.. section: Library

Avoid a crash in the C version of
:meth:`asyncio.Future.remove_done_callback` when an evil argument is passed.

..

.. date: 2022-09-29-08-15-55
.. gh-issue: 97639
.. nonce: JSjWYW
.. section: Library

Remove ``tokenize.NL`` check from :mod:`tabnanny`.

..

.. date: 2022-09-25-20-42-33
.. gh-issue: 73588
.. nonce: uVtjEA
.. section: Library

Fix generation of the default name of :class:`tkinter.Checkbutton`.
Previously, checkbuttons in different parent widgets could have the same
short name and share the same state if arguments "name" and "variable" are
not specified. Now they are globally unique.

..

.. date: 2022-09-22-14-35-02
.. gh-issue: 97005
.. nonce: yf21Q7
.. section: Library

Update bundled libexpat to 2.4.9

..

.. date: 2022-09-22-11-50-29
.. gh-issue: 85760
.. nonce: DETTPd
.. section: Library

Fix race condition in :mod:`asyncio` where
:meth:`~asyncio.SubprocessProtocol.process_exited` called before the
:meth:`~asyncio.SubprocessProtocol.pipe_data_received` leading to
inconsistent output. Patch by Kumar Aditya.

..

.. date: 2022-09-17-13-15-10
.. gh-issue: 96819
.. nonce: 6RfqM7
.. section: Library

Fixed check in :mod:`multiprocessing.resource_tracker` that guarantees that
the length of a write to a pipe is not greater than ``PIPE_BUF``.

..

.. date: 2022-09-15-00-37-33
.. gh-issue: 96741
.. nonce: 4b6czN
.. section: Library

Corrected type annotation for dataclass attribute
``pstats.FunctionProfile.ncalls`` to be ``str``.

..

.. date: 2022-08-30-11-46-36
.. gh-issue: 95987
.. nonce: CV7_u4
.. section: Library

Fix ``repr`` of ``Any`` subclasses.

..

.. date: 2022-08-29-16-54-36
.. gh-issue: 96388
.. nonce: dCpJcu
.. section: Library

Work around missing socket functions in :class:`~socket.socket`'s
``__repr__``.

..

.. date: 2022-08-29-12-35-28
.. gh-issue: 96073
.. nonce: WaGstf
.. section: Library

In :mod:`inspect`, fix overeager replacement of "``typing.``" in formatting
annotations.

..

.. 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-08-20-10-31-01
.. gh-issue: 96052
.. nonce: a6FhaD
.. section: Library

Fix handling compiler warnings (SyntaxWarning and DeprecationWarning) in
:func:`codeop.compile_command` when checking for incomplete input.
Previously it emitted warnings and raised a SyntaxError. Now it always
returns ``None`` for incomplete input without emitting any warnings.

..

.. date: 2022-08-06-12-18-07
.. gh-issue: 88863
.. nonce: NnqsuJ
.. section: Library

To avoid apparent memory leaks when :func:`asyncio.open_connection` raises,
break reference cycles generated by local exception and future instances
(which has exception instance as its member var). Patch by Dong Uk, Kang.

..

.. date: 2022-07-22-09-09-08
.. gh-issue: 91212
.. nonce: 53O8Ab
.. section: Library

Fixed flickering of the turtle window when the tracer is turned off. Patch
by Shin-myoung-serp.

..

.. date: 2022-07-08-08-39-35
.. gh-issue: 88050
.. nonce: 0aOC_m
.. section: Library

Fix :mod:`asyncio` subprocess transport to kill process cleanly when process
is blocked and avoid ``RuntimeError`` when loop is closed. Patch by Kumar
Aditya.

..

.. date: 2022-06-17-12-02-30
.. gh-issue: 93858
.. nonce: R49ARc
.. section: Library

Prevent error when activating venv in nested fish instances.

..

.. date: 2022-04-23-03-46-37
.. gh-issue: 91078
.. nonce: 87-hkp
.. section: Library

:meth:`TarFile.next` now returns ``None`` when called on an empty tarfile.

..

.. bpo: 47220
.. date: 2022-04-04-22-54-11
.. nonce: L9jYu4
.. section: Library

Document the optional *callback* parameter of :class:`WeakMethod`. Patch by
Géry Ogam.

..

.. bpo: 46364
.. date: 2022-01-14-10-49-20
.. nonce: SzhlU9
.. section: Library

Restrict use of sockets instead of pipes for stdin of subprocesses created
by :mod:`asyncio` to AIX platform only.

..

.. 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: 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-11-16-12-52-23
.. gh-issue: 92892
.. nonce: TS-P0j
.. section: Documentation

Document that calling variadic functions with ctypes requires special care
on macOS/arm64 (and possibly other platforms).

..

.. date: 2022-10-16-17-34-45
.. gh-issue: 85525
.. nonce: DvkD0v
.. section: Documentation

Remove extra row

..

.. date: 2022-08-12-01-12-52
.. gh-issue: 95588
.. nonce: PA0FI7
.. section: Documentation

Clarified the conflicting advice given in the :mod:`ast` documentation about
:func:`ast.literal_eval` being "safe" for use on untrusted input while at
the same time warning that it can crash the process. The latter statement is
true and is deemed unfixable without a large amount of work unsuitable for a
bugfix. So we keep the warning and no longer claim that ``literal_eval`` is
safe.

..

.. bpo: 41825
.. date: 2020-09-22-12-32-16
.. nonce: npcaCb
.. section: Documentation

Restructured the documentation for the :func:`os.wait* <os.wait>` family of
functions, and improved the docs for :func:`os.waitid` with more explanation
of the possible argument constants.

..

.. date: 2022-12-05-16-12-56
.. gh-issue: 99892
.. nonce: sz_eW8
.. section: Tests

Skip test_normalization() of test_unicodedata if it fails to download
NormalizationTest.txt file from pythontest.net. Patch by Victor Stinner.

..

.. date: 2022-12-01-18-55-18
.. gh-issue: 99934
.. nonce: Ox3Fqf
.. section: Tests

Correct test_marsh on (32 bit) x86: test_deterministic sets was failing.

..

.. date: 2022-11-21-19-21-30
.. gh-issue: 99659
.. nonce: 4gP0nm
.. section: Tests

Optional big memory tests in ``test_sqlite3`` now catch the correct
:exc:`sqlite.DataError` exception type in case of too large strings and/or
blobs passed.

..

.. 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-24-02-58-10
.. gh-issue: 99086
.. nonce: DV_4Br
.. section: Build

Fix ``-Wimplicit-int``, ``-Wstrict-prototypes``, and
``-Wimplicit-function-declaration`` compiler warnings in
:program:`configure` checks.

..

.. date: 2022-11-15-08-40-22
.. gh-issue: 99337
.. nonce: 5LoQDE
.. section: Build

Fix a compilation issue with GCC 12 on macOS.

..

.. 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-03-08-10-49
.. gh-issue: 98872
.. nonce: gdsR8X
.. section: Build

Fix a possible fd leak in ``Programs/_freeze_module.c`` introduced in Python
3.11.

..

.. 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-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-09-20-12-43-44
.. gh-issue: 96761
.. nonce: IF29kR
.. section: Build

Fix the build process of clang compiler for :program:`_bootstrap_python` if
LTO optimization is applied. Patch by Matthias Görgens and Dong-hee Na.

..

.. date: 2022-09-17-11-19-24
.. gh-issue: 96883
.. nonce: p_gr62
.. section: Build

``wasm32-emscripten`` builds for browsers now include
:mod:`concurrent.futures` for :mod:`asyncio` and :mod:`unittest.mock`.

..

.. date: 2022-08-26-11-09-11
.. gh-issue: 84461
.. nonce: Nsdn_R
.. section: Build

``wasm32-emscripten`` platform no longer builds :mod:`resource` module,
:func:`~os.getresuid`, :func:`~os.getresgid`, and their setters. The APIs
are stubs and not functional.

..

.. date: 2022-06-25-23-25-47
.. gh-issue: 94280
.. nonce: YhEyW_
.. section: Build

Updated pegen regeneration script on Windows to find and use Python 3.9 or
higher.  Prior to this, pegen regeneration already required 3.9 or higher,
but the script may have used lower versions of Python.

..

.. date: 2022-11-23-17-17-16
.. gh-issue: 99345
.. nonce: jOa3-f
.. section: Windows

Use faster initialization functions to detect install location for Windows
Store package

..

.. date: 2022-11-21-19-50-18
.. gh-issue: 98629
.. nonce: tMmB_B
.. section: Windows

Fix initialization of :data:`sys.version` and ``sys._git`` on Windows

..

.. date: 2022-11-16-19-03-21
.. gh-issue: 99442
.. nonce: 6Dgk3Q
.. section: Windows

Fix handling in :ref:`launcher` when ``argv[0]`` does not include a file
extension.

..

.. 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-02-11-59-23
.. gh-issue: 97728
.. nonce: dIdlPE
.. section: Windows

Fix possible crashes caused by the use of uninitialized variables when pass
invalid arguments in :func:`os.system` on Windows and in Windows-specific
modules (like ``winreg``).

..

.. date: 2022-09-23-15-40-04
.. gh-issue: 96965
.. nonce: CsnEGs
.. section: Windows

Update libffi to 3.4.3

..

.. date: 2022-08-30-12-01-51
.. gh-issue: 94781
.. nonce: OxO-Gr
.. section: Windows

Fix :file:`pcbuild.proj` to clean previous instances of ouput files in
``Python\deepfreeze`` and ``Python\frozen_modules`` directories on Windows.
Patch by Charlie Zhao.

..

.. bpo: 40882
.. date: 2020-06-06-15-10-37
.. nonce: UvNbdj
.. section: Windows

Fix a memory leak in :class:`multiprocessing.shared_memory.SharedMemory` on
Windows.

..

.. date: 2022-11-25-09-23-20
.. gh-issue: 87235
.. nonce: SifjCD
.. section: macOS

On macOS ``python3 /dev/fd/9 9</path/to/script.py`` failed for any script
longer than a couple of bytes.

..

.. date: 2022-11-01-10-32-23
.. gh-issue: 98940
.. nonce: W3YzC_
.. section: macOS

Fix ``Mac/Extras.install.py`` file filter bug.

..

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

Update macOS installer to SQLite 3.39.4.

..

.. date: 2022-10-15-21-20-40
.. gh-issue: 97527
.. nonce: otAHJM
.. section: IDLE

Fix a bug in the previous bugfix that caused IDLE to not start when run with
3.10.8, 3.12.0a1, and at least Microsoft Python 3.10.2288.0 installed
without the Lib/test package.  3.11.0 was never affected.

..

.. date: 2022-08-29-17-25-13
.. gh-issue: 95853
.. nonce: Ce17cT
.. section: Tools/Demos

The ``wasm_build.py`` script now pre-builds Emscripten ports, checks for
broken EMSDK versions, and warns about pkg-config env vars.

..

.. date: 2022-08-10-17-08-43
.. gh-issue: 95853
.. nonce: HCjC2m
.. section: Tools/Demos

The new tool ``Tools/wasm/wasm_builder.py`` automates configure, compile,
and test steps for building CPython on WebAssembly platforms.

..

.. date: 2022-08-05-23-25-59
.. gh-issue: 95731
.. nonce: N2KohU
.. section: Tools/Demos

Fix handling of module docstrings in :file:`Tools/i18n/pygettext.py`.

..

.. date: 2022-12-05-17-30-13
.. gh-issue: 98680
.. nonce: FiMCxZ
.. section: C API

``PyBUF_*`` constants were marked as part of Limited API of Python 3.11+.
These were available in 3.11.0 with :c:macro:`Py_LIMITED_API` defined for
3.11, and are necessary to use the buffer API.

..

.. 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-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)