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
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
|
.. date: 2024-09-24-10-48-46
.. gh-issue: 124448
.. nonce: bFMrS6
.. release date: 2024-10-15
.. section: macOS
Update bundled Tcl/Tk in macOS installer to 8.6.15.
..
.. date: 2024-09-07-12-14-54
.. gh-issue: 123797
.. nonce: yFDeug
.. section: macOS
Check for runtime availability of ``ptsname_r`` function on macos.
..
.. date: 2024-09-04-11-55-29
.. gh-issue: 123418
.. nonce: 8P4bmN
.. section: macOS
Updated macOS installer build to use OpenSSL 3.0.15.
..
.. date: 2024-09-27-15-07-30
.. gh-issue: 124487
.. nonce: 7LrwHC
.. section: Windows
Increases Windows required OS and API level to Windows 10.
..
.. date: 2024-09-27-13-40-25
.. gh-issue: 124609
.. nonce: WaKk8G
.. section: Windows
Fix ``_Py_ThreadId`` for Windows builds using MinGW. Patch by Tony Roberts.
..
.. date: 2024-09-24-19-04-56
.. gh-issue: 124448
.. nonce: srVT3d
.. section: Windows
Updated bundled Tcl/Tk to 8.6.15.
..
.. date: 2024-09-20-11-18-50
.. gh-issue: 124254
.. nonce: iPin-L
.. section: Windows
Ensures experimental free-threaded binaries remain installed when updating.
..
.. date: 2024-09-10-19-23-00
.. gh-issue: 123915
.. nonce: yZMEDO
.. section: Windows
Ensure that ``Tools\msi\buildrelease.bat`` uses different directories for
AMD64 and ARM64 builds.
..
.. date: 2024-09-04-09-59-18
.. gh-issue: 123418
.. nonce: QaMC12
.. section: Windows
Updated Windows build to use OpenSSL 3.0.15.
..
.. date: 2024-08-29-16-13-45
.. gh-issue: 123476
.. nonce: m2DFS4
.. section: Windows
Add support for ``socket.TCP_QUICKACK`` on Windows platforms.
..
.. date: 2024-08-01-10-55-15
.. gh-issue: 122573
.. nonce: 4-UCFY
.. section: Windows
The Windows build of CPython now requires 3.10 or newer.
..
.. date: 2024-07-19-21-50-54
.. gh-issue: 100256
.. nonce: GDrKba
.. section: Windows
:mod:`mimetypes` no longer fails when it encounters an inaccessible registry
key.
..
.. date: 2024-05-30-17-39-25
.. gh-issue: 119679
.. nonce: mZC87w
.. section: Windows
Ensures correct import libraries are included in Windows installs.
..
.. date: 2024-05-29-11-06-12
.. gh-issue: 119690
.. nonce: 8q6e1p
.. section: Windows
Adds Unicode support and fixes audit events for ``_winapi.CreateNamedPipe``.
..
.. date: 2024-05-25-18-43-10
.. gh-issue: 111201
.. nonce: SLPJIx
.. section: Windows
Add support for new pyrepl on Windows
..
.. date: 2024-05-22-19-43-29
.. gh-issue: 119070
.. nonce: _enton
.. section: Windows
Fixes ``py.exe`` handling of shebangs like ``/usr/bin/env python3.12``,
which were previously interpreted as ``python3.exe`` instead of
``python3.12.exe``.
..
.. date: 2024-04-24-22-50-33
.. gh-issue: 117505
.. nonce: gcTb_p
.. section: Windows
Fixes an issue with the Windows installer not running ensurepip in a fully
isolated environment. This could cause unexpected interactions with the user
site-packages.
..
.. date: 2024-04-24-05-16-32
.. gh-issue: 118209
.. nonce: Ryyzlz
.. section: Windows
Avoid crashing in :mod:`mmap` on Windows when the mapped memory is
inaccessible due to file system errors or access violations.
..
.. date: 2022-04-20-18-32-30
.. gh-issue: 79846
.. nonce: Vggv3f
.. section: Windows
Makes :code:`ssl.create_default_context()` ignore invalid certificates in
the Windows certificate store
..
.. date: 2024-09-04-10-07-51
.. gh-issue: 123418
.. nonce: 1eIFZb
.. section: Tools/Demos
Update GitHub CI workflows to use OpenSSL 3.0.15 and multissltests to use
3.0.15, 3.1.7, and 3.2.3.
..
.. date: 2024-10-07-14-13-38
.. gh-issue: 125041
.. nonce: PKLWDf
.. section: Tests
Re-enable skipped tests for :mod:`zlib` on the s390x architecture: only skip
checks of the compressed bytes, which can be different between zlib's
software implementation and the hardware-accelerated implementation.
..
.. date: 2024-09-25-12-39-34
.. gh-issue: 124378
.. nonce: Ywwgia
.. section: Tests
Updated ``test_ttk`` to pass with Tcl/Tk 8.6.15.
..
.. date: 2024-09-18-18-39-21
.. gh-issue: 124213
.. nonce: AQq_xg
.. section: Tests
Detect whether the test suite is running inside a systemd-nspawn container
with ``--suppress-sync=true`` option, and skip the ``test_os`` and
``test_mmap`` tests that are failing in this scenario.
..
.. date: 2024-09-17-22-21-58
.. gh-issue: 124190
.. nonce: 3fWhiX
.. section: Tests
Add capability to ignore entire files or directories in check warning CI
tool
..
.. date: 2024-07-17-08-25-06
.. gh-issue: 121921
.. nonce: HW8CIS
.. section: Tests
Update ``Lib/test/crashers/bogus_code_obj.py`` so that it crashes properly
again.
..
.. date: 2024-07-13-21-55-58
.. gh-issue: 112301
.. nonce: YJS1dl
.. section: Tests
Add tooling to check for changes in compiler warnings. Patch by Nate Ohlson.
..
.. date: 2024-07-13-11-48-20
.. gh-issue: 59022
.. nonce: fYNbQ8
.. section: Tests
Add tests for :func:`pkgutil.extend_path`. Patch by Andreas Stocker.
..
.. date: 2024-07-13-11-04-44
.. gh-issue: 99242
.. nonce: aGxnwz
.. section: Tests
:func:`os.getloadavg` may throw :exc:`OSError` when running regression tests
under certain conditions (e.g. chroot). This error is now caught and
ignored, since reporting load average is optional.
..
.. date: 2024-07-04-15-10-29
.. gh-issue: 121084
.. nonce: qxcd5d
.. section: Tests
Fix test_typing random leaks. Clear typing ABC caches when running tests for
refleaks (``-R`` option): call ``_abc_caches_clear()`` on typing abstract
classes and their subclasses. Patch by Victor Stinner.
..
.. date: 2024-07-03-14-41-00
.. gh-issue: 121160
.. nonce: LEtiTd
.. section: Tests
Add a test for :func:`readline.set_history_length`. Note that this test may
fail on readline libraries.
..
.. date: 2024-07-01-16-15-06
.. gh-issue: 121200
.. nonce: 4Pc-gc
.. section: Tests
Fix ``test_expanduser_pwd2()`` of ``test_posixpath``. Call ``getpwnam()``
to get ``pw_dir``, since it can be different than ``getpwall()`` ``pw_dir``.
Patch by Victor Stinner.
..
.. date: 2024-07-01-09-04-32
.. gh-issue: 121188
.. nonce: XbuTVa
.. section: Tests
When creating the JUnit XML file, regrtest now escapes characters which are
invalid in XML, such as the chr(27) control character used in ANSI escape
sequences. Patch by Victor Stinner.
..
.. date: 2024-06-20-12-51-26
.. gh-issue: 120801
.. nonce: lMVXC9
.. section: Tests
Cleaned up fixtures for importlib.metadata tests and consolidated behavior
with 'test.support.os_helper'.
..
.. date: 2024-05-29-15-28-08
.. gh-issue: 119727
.. nonce: dVkaZM
.. section: Tests
Add ``--single-process`` command line option to Python test runner
(regrtest). Patch by Victor Stinner.
..
.. date: 2024-05-20-18-06-31
.. gh-issue: 119273
.. nonce: hf-yhX
.. section: Tests
Python test runner no longer runs tests using TTY (ex: test_ioctl) in a
process group (using ``setsid()``). Previously, tests using TTY were
skipped. Patch by Victor Stinner.
..
.. date: 2024-05-18-10-59-27
.. gh-issue: 119050
.. nonce: g4qiH7
.. section: Tests
regrtest test runner: Add XML support to the refleak checker (-R option).
Patch by Victor Stinner.
..
.. date: 2024-05-04-22-56-41
.. gh-issue: 101525
.. nonce: LHK166
.. section: Tests
Skip ``test_gdb`` if the binary is relocated by BOLT. Patch by Donghee Na.
..
.. date: 2023-08-03-17-26-55
.. gh-issue: 107562
.. nonce: ZnbscS
.. section: Tests
Test certificates have been updated to expire far in the future. This allows
testing Y2038 with system time set to after that, so that actual Y2038
issues can be exposed, and not masked by expired certificate errors.
..
.. date: 2024-10-09-20-08-13
.. gh-issue: 125140
.. nonce: YgNWRB
.. section: Security
Remove the current directory from ``sys.path`` when using PyREPL.
..
.. date: 2024-09-04-12-41-35
.. gh-issue: 123678
.. nonce: N41y9n
.. section: Security
Upgrade libexpat to 2.6.3
..
.. date: 2024-08-14-19-43-57
.. gh-issue: 112301
.. nonce: IQUcOy
.. section: Security
Enable compiler options that warn of potential security vulnerabilities.
..
.. date: 2024-08-07-10-42-13
.. gh-issue: 122792
.. nonce: oiTMo9
.. section: Security
Changed IPv4-mapped ``ipaddress.IPv6Address`` to consistently use the mapped
IPv4 address value for deciding properties. Properties which have their
behavior fixed are ``is_multicast``, ``is_reserved``, ``is_link_local``,
``is_global``, and ``is_unspecified``.
..
.. date: 2024-08-06-00-06-23
.. gh-issue: 112301
.. nonce: 4k4lw6
.. section: Security
Add ability to ignore warnings per file with warning count in warning
checking tooling. Patch by Nate Ohlson.
..
.. date: 2024-07-24-05-18-25
.. gh-issue: 112301
.. nonce: lfINgZ
.. section: Security
Add macOS warning tracking to warning check tooling. Patch by Nate Ohlson.
..
.. date: 2024-07-22-13-11-28
.. gh-issue: 122133
.. nonce: 0mPeta
.. section: Security
Authenticate the socket connection for the ``socket.socketpair()`` fallback
on platforms where ``AF_UNIX`` is not available like Windows.
Patch by Gregory P. Smith <greg@krypto.org> and Seth Larson
<seth@python.org>. Reported by Ellie <el@horse64.org>
..
.. date: 2024-07-18-13-17-47
.. gh-issue: 121957
.. nonce: QemKLU
.. section: Security
Fixed missing audit events around interactive use of Python, now also
properly firing for ``python -i``, as well as for ``python -m asyncio``. The
events in question are ``cpython.run_stdin`` and ``cpython.run_startup``.
..
.. date: 2024-07-08-23-39-04
.. gh-issue: 112301
.. nonce: TD8G01
.. section: Security
Enable runtime protections for glibc to abort execution when unsafe behavior
is encountered, for all platforms except Windows.
..
.. date: 2024-07-02-13-39-20
.. gh-issue: 121285
.. nonce: hrl-yI
.. section: Security
Remove backtracking from tarfile header parsing for ``hdrcharset``, PAX, and
GNU sparse headers.
..
.. date: 2024-06-25-04-42-43
.. gh-issue: 112301
.. nonce: god4IC
.. section: Security
Add default compiler options to improve security. Enable
-Wimplicit-fallthrough, -fstack-protector-strong, -Wtrampolines.
..
.. date: 2024-05-08-21-59-38
.. gh-issue: 118773
.. nonce: 7dFRJY
.. section: Security
Fixes creation of ACLs in :func:`os.mkdir` on Windows to work correctly on
non-English machines.
..
.. date: 2024-05-01-20-57-09
.. gh-issue: 118486
.. nonce: K44KJG
.. section: Security
:func:`os.mkdir` on Windows now accepts *mode* of ``0o700`` to restrict the
new directory to the current user. This fixes :cve:`2024-4030` affecting
:func:`tempfile.mkdtemp` in scenarios where the base temporary directory is
more permissive than the default.
..
.. date: 2024-10-14-04-44-12
.. gh-issue: 125422
.. nonce: MlVuC6
.. section: Library
Fixed the bug where :mod:`pdb` and :mod:`bdb` can step into the bottom
caller frame.
..
.. date: 2024-10-14-02-27-03
.. gh-issue: 100141
.. nonce: NuAcwa
.. section: Library
Fixed the bug where :mod:`pdb` will be stuck in an infinite loop when
debugging an empty file.
..
.. date: 2024-10-13-20-21-35
.. gh-issue: 53203
.. nonce: Rz1c8A
.. section: Library
Fix :func:`time.strptime` for ``%c``, ``%x`` and ``%X`` formats in many
locales that use non-ASCII digits, like Persian, Burmese, Odia and Shan.
..
.. date: 2024-10-11-18-03-05
.. gh-issue: 125206
.. nonce: pWRRK6
.. section: Library
Workaround for old libffi versions is added. Module ctypes supports
:c:expr:`double complex` only with libffi >= 3.3.0. Patch by Mikhail Efimov.
..
.. date: 2024-10-11-16-19-46
.. gh-issue: 89967
.. nonce: vhWUOR
.. section: Library
Make :class:`~weakref.WeakKeyDictionary` and
:class:`~weakref.WeakValueDictionary` safe against concurrent mutations from
other threads. Patch by Kumar Aditya.
..
.. date: 2024-10-11-04-04-38
.. gh-issue: 125260
.. nonce: PeZ0Mb
.. section: Library
The :func:`gzip.compress` *mtime* parameter now defaults to 0 for
reproducible output. Patch by Bernhard M. Wiedemann and Adam Turner.
..
.. date: 2024-10-10-20-39-57
.. gh-issue: 125243
.. nonce: eUbbtu
.. section: Library
Fix data race when creating :class:`zoneinfo.ZoneInfo` objects in the free
threading build.
..
.. date: 2024-10-10-19-57-35
.. gh-issue: 125254
.. nonce: RtZxXS
.. section: Library
Fix a bug where ArgumentError includes the incorrect ambiguous option in
:mod:`argparse`.
..
.. date: 2024-10-10-18-33-31
.. gh-issue: 125235
.. nonce: 0kOB5I
.. section: Library
Keep :mod:`tkinter` TCL paths in venv pointing to base installation on
Windows.
..
.. date: 2024-10-09-21-42-43
.. gh-issue: 61011
.. nonce: pQXZb1
.. section: Library
Fix inheritance of nested mutually exclusive groups from parent parser in
:class:`argparse.ArgumentParser`. Previously, all nested mutually exclusive
groups lost their connection to the group containing them and were displayed
as belonging directly to the parser.
..
.. date: 2024-10-09-07-09-00
.. gh-issue: 125118
.. nonce: J9rQ1S
.. section: Library
Don't copy arbitrary values to :c:expr:`_Bool` in the :mod:`struct` module.
..
.. date: 2024-10-08-21-17-16
.. gh-issue: 125069
.. nonce: 0RP0Mx
.. section: Library
Fix an issue where providing a :class:`pathlib.PurePath` object as an
initializer argument to a second :class:`~pathlib.PurePath` object with a
different :attr:`~pathlib.PurePath.parser` resulted in arguments to the
former object's initializer being joined by the latter object's parser.
..
.. date: 2024-10-08-13-28-22
.. gh-issue: 125096
.. nonce: Vz0W5g
.. section: Library
If the :envvar:`PYTHON_BASIC_REPL` environment variable is set, the
:mod:`site` module no longer imports the :mod:`!_pyrepl` module. Moreover,
the :mod:`site` module now respects :option:`-E` and :option:`-I` command
line options: ignore :envvar:`PYTHON_BASIC_REPL` in this case. Patch by
Victor Stinner.
..
.. date: 2024-10-08-12-09-09
.. gh-issue: 124969
.. nonce: _VBQLq
.. section: Library
Fix ``locale.nl_langinfo(locale.ALT_DIGITS)``. Now it returns a tuple of up
to 100 strings (an empty tuple on most locales). Previously it returned the
first item of that tuple or an empty string.
..
.. date: 2024-10-05-15-49-53
.. gh-issue: 124960
.. nonce: Bol9hT
.. section: Library
Fix support for the ``barry_as_FLUFL`` future flag in the new REPL.
..
.. date: 2024-10-04-12-43-03
.. gh-issue: 69998
.. nonce: DVqOXX
.. section: Library
Fix :func:`locale.nl_langinfo` in case when different categories have
different locales. The function now sets temporarily the ``LC_CTYPE`` locale
in some cases. This temporary change affects other threads.
..
.. date: 2024-10-04-08-46-00
.. gh-issue: 124958
.. nonce: rea9-x
.. section: Library
Fix refcycles in exceptions raised from :class:`asyncio.TaskGroup` and the
python implementation of :class:`asyncio.Future`
..
.. date: 2024-10-03-20-45-57
.. gh-issue: 53203
.. nonce: 3Sk4Ia
.. section: Library
Fix :func:`time.strptime` for ``%c`` and ``%x`` formats in many locales:
Arabic, Bislama, Breton, Bodo, Kashubian, Chuvash, Estonian, French, Irish,
Ge'ez, Gurajati, Manx Gaelic, Hebrew, Hindi, Chhattisgarhi, Haitian Kreyol,
Japanese, Kannada, Korean, Marathi, Malay, Norwegian, Nynorsk, Punjabi,
Rajasthani, Tok Pisin, Yoruba, Yue Chinese, Yau/Nungon and Chinese.
..
.. date: 2024-10-03-19-16-38
.. gh-issue: 123961
.. nonce: ik1Dgs
.. section: Library
Convert :mod:`curses` to multi-phase initialization (:pep:`489`), thereby
fixing reference leaks at interpreter shutdown. Patch by Bénédikt Tran.
..
.. date: 2024-10-03-17-13-22
.. gh-issue: 124944
.. nonce: YyLAzf
.. section: Library
Add ``SO_ORIGINAL_DST`` to the :mod:`socket` module.
..
.. date: 2024-10-03-05-00-25
.. gh-issue: 117151
.. nonce: Prdw_W
.. section: Library
The default buffer size used by :func:`shutil.copyfileobj` has been
increased from 64k to 256k on non-Windows platforms. It was already larger
on Windows.
..
.. date: 2024-10-02-22-53-48
.. gh-issue: 90102
.. nonce: 4qX52R
.. section: Library
Skip the ``isatty`` system call during open() when the file is known to not
be a character device. This provides a slight performance improvement when
reading whole files.
..
.. date: 2024-10-02-21-11-18
.. gh-issue: 124917
.. nonce: Lnwh5b
.. section: Library
Allow calling :func:`os.path.exists` and :func:`os.path.lexists` with
keyword arguments on Windows. Fixes a regression in 3.13.0.
..
.. date: 2024-10-02-16-35-07
.. gh-issue: 65865
.. nonce: S2D4wq
.. section: Library
:mod:`argparse` now raises early error for invalid ``help`` arguments to
:meth:`~argparse.ArgumentParser.add_argument`,
:meth:`~argparse.ArgumentParser.add_subparsers` and :meth:`!add_parser`.
..
.. date: 2024-10-02-15-05-45
.. gh-issue: 124653
.. nonce: tqsTu9
.. section: Library
Fix detection of the minimal Queue API needed by the :mod:`logging` module.
Patch by Bénédikt Tran.
..
.. date: 2024-10-01-23-29-09
.. gh-issue: 91818
.. nonce: Kz8cPI
.. section: Library
The CLI of many modules (:mod:`ast`, :mod:`ensurepip`, :mod:`json`,
:mod:`pdb`, :mod:`sqlite3`, :mod:`tokenize`, :mod:`venv`) now uses the
actual executable name instead of simply "python" to display in the usage
message.
..
.. date: 2024-10-01-17-12-20
.. gh-issue: 124858
.. nonce: Zy0tvT
.. section: Library
Fix reference cycles left in tracebacks in :func:`asyncio.open_connection`
when used with ``happy_eyeballs_delay``
..
.. date: 2024-10-01-13-46-58
.. gh-issue: 124390
.. nonce: dK1Zcm
.. section: Library
Fixed :exc:`AssertionError` when using
:func:`!asyncio.staggered.staggered_race` with
:attr:`asyncio.eager_task_factory`.
..
.. date: 2024-10-01-13-11-53
.. gh-issue: 85935
.. nonce: CTwJUy
.. section: Library
:meth:`argparse.ArgumentParser.add_argument` now raises an exception if an
:ref:`action` that does not consume arguments (like 'store_const' or
'store_true') or explicit ``nargs=0`` are specified for positional
arguments.
..
.. date: 2024-10-01-12-43-42
.. gh-issue: 124835
.. nonce: SVyp3K
.. section: Library
Make :func:`tomllib.loads` raise :exc:`TypeError` not :exc:`AttributeError`
on bad input types that do not have the ``replace`` attribute. Improve error
message when :class:`bytes` is received.
..
.. date: 2024-10-01-02-31-13
.. gh-issue: 124693
.. nonce: qzbXKB
.. section: Library
Fix a bug where :mod:`argparse` doesn't recognize negative complex numbers
or negative numbers using scientific notation.
..
.. date: 2024-09-30-20-46-32
.. gh-issue: 124787
.. nonce: 3FnJnP
.. section: Library
Fix :class:`typing.TypeAliasType` with incorrect ``type_params`` argument.
Now it raises a :exc:`TypeError` when a type parameter without a default
follows one with a default, and when an entry in the ``type_params`` tuple
is not a type parameter object.
..
.. date: 2024-09-30-19-59-28
.. gh-issue: 66436
.. nonce: 4gYN_n
.. section: Library
Improved :ref:`prog` default value for :class:`argparse.ArgumentParser`. It
will now include the name of the Python executable along with the module or
package name, or the path to a directory, ZIP file, or directory within a
ZIP file if the code was run that way.
..
.. date: 2024-09-27-15-16-04
.. gh-issue: 116850
.. nonce: dBkR0-
.. section: Library
Fix :mod:`argparse` for namespaces with not directly writable dict (e.g.
classes).
..
.. date: 2024-09-27-06-39-32
.. gh-issue: 101552
.. nonce: xYkzag
.. section: Library
Add an *annoation_format* parameter to :func:`inspect.signature`. Add an
*quote_annotation_strings* parameter to :meth:`inspect.Signature.format`.
Use the new functionality to improve the display of annotations in
signatures in :mod:`pydoc`. Patch by Jelle Zijlstra.
..
.. date: 2024-09-26-22-14-12
.. gh-issue: 58573
.. nonce: hozbm9
.. section: Library
Fix conflicts between abbreviated long options in the parent parser and
subparsers in :mod:`argparse`.
..
.. date: 2024-09-26-13-43-39
.. gh-issue: 124594
.. nonce: peYhsP
.. section: Library
All :mod:`asyncio` REPL prompts run in the same :class:`context
<contextvars.Context>`. Contributed by Bartosz Sławecki.
..
.. date: 2024-09-26-09-18-09
.. gh-issue: 61181
.. nonce: dwjmch
.. section: Library
Fix support of :ref:`choices` with string value in :mod:`argparse`.
Substrings of the specified string no longer considered valid values.
..
.. date: 2024-09-26-00-35-24
.. gh-issue: 116750
.. nonce: X1aMHI
.. section: Library
Provide :func:`sys.monitoring.clear_tool_id` to unregister all events and
callbacks set by the tool.
..
.. date: 2024-09-25-22-06-52
.. gh-issue: 124552
.. nonce: 1nQKNM
.. section: Library
Improve the accuracy of :mod:`bdb`'s check for the possibility of breakpoint
in a frame. This makes it possible to disable unnecessary events in
functions.
..
.. date: 2024-09-25-18-34-48
.. gh-issue: 124538
.. nonce: nXZk4R
.. section: Library
Fixed crash when using :func:`gc.get_referents` on a capsule object.
..
.. date: 2024-09-25-18-08-29
.. gh-issue: 80259
.. nonce: kO5Tw7
.. section: Library
Fix :mod:`argparse` support of positional arguments with ``nargs='?'``,
``default=argparse.SUPPRESS`` and specified ``type``.
..
.. date: 2024-09-25-18-07-51
.. gh-issue: 120378
.. nonce: NlBSz_
.. section: Library
Fix a crash related to an integer overflow in :func:`curses.resizeterm` and
:func:`curses.resize_term`.
..
.. date: 2024-09-25-12-14-58
.. gh-issue: 124498
.. nonce: Ozxs55
.. section: Library
Fix :class:`typing.TypeAliasType` not to be generic, when ``type_params`` is
an empty tuple.
..
.. date: 2024-09-25-10-25-57
.. gh-issue: 53834
.. nonce: uyIckw
.. section: Library
Fix support of arguments with :ref:`choices` in :mod:`argparse`. Positional
arguments with :ref:`nargs` equal to ``'?'`` or ``'*'`` no longer check
:ref:`default` against ``choices``. Optional arguments with ``nargs`` equal
to ``'?'`` no longer check :ref:`const` against ``choices``.
..
.. date: 2024-09-24-22-38-51
.. gh-issue: 123884
.. nonce: iEPTK4
.. section: Library
Fixed bug in itertools.tee() handling of other tee inputs (a tee in a tee).
The output now has the promised *n* independent new iterators. Formerly,
the first iterator was identical (not independent) to the input iterator.
This would sometimes give surprising results.
..
.. date: 2024-09-24-21-15-27
.. gh-issue: 123017
.. nonce: dSAr2f
.. section: Library
Due to unreliable results on some devices, :func:`time.strftime` no longer
accepts negative years on Android.
..
.. date: 2024-09-24-19-32-14
.. gh-issue: 123014
.. nonce: zVcfkZ
.. section: Library
:func:`os.pidfd_open` and :func:`signal.pidfd_send_signal` are now
unavailable when building against Android API levels older than 31, since
the underlying system calls may cause a crash.
..
.. date: 2024-09-24-13-32-16
.. gh-issue: 124176
.. nonce: 6hmOPz
.. section: Library
Add support for :func:`dataclasses.dataclass` in
:func:`unittest.mock.create_autospec`. Now ``create_autospec`` will check
for potential dataclasses and use :func:`dataclasses.fields` function to
retrieve the spec information.
..
.. date: 2024-09-24-12-34-48
.. gh-issue: 124345
.. nonce: s3vKql
.. section: Library
:mod:`argparse` vim supports abbreviated single-dash long options separated
by ``=`` from its value.
..
.. date: 2024-09-24-00-01-24
.. gh-issue: 124400
.. nonce: 0XCgfe
.. section: Library
Fixed a :mod:`pdb` bug where ``until`` has no effect when it appears in a
``commands`` sequence. Also avoid printing the frame information at a
breakpoint that has a command list containing a command that resumes
execution.
..
.. date: 2024-09-23-18-26-17
.. gh-issue: 90562
.. nonce: Yj566G
.. section: Library
Modify dataclasses to support zero-argument super() when ``slots=True`` is
specified. This works by modifying all references to ``__class__`` to point
to the newly created class.
..
.. date: 2024-09-23-17-33-47
.. gh-issue: 104860
.. nonce: O86OSc
.. section: Library
Fix disallowing abbreviation of single-dash long options in :mod:`argparse`
with ``allow_abbrev=False``.
..
.. date: 2024-09-21-23-56-41
.. gh-issue: 63143
.. nonce: YKu-LQ
.. section: Library
Fix parsing mutually exclusive arguments in :mod:`argparse`. Arguments with
the value identical to the default value (e.g. booleans, small integers,
empty or 1-character strings) are no longer considered "not present".
..
.. date: 2024-09-21-22-32-21
.. gh-issue: 72795
.. nonce: naLmkX
.. section: Library
Positional arguments with :ref:`nargs` equal to ``'*'`` or
:data:`!argparse.REMAINDER` are no longer required. This allows to use
positional argument with ``nargs='*'`` and without ``default`` in mutually
exclusive group and improves error message about required arguments.
..
.. date: 2024-09-21-19-02-37
.. gh-issue: 59317
.. nonce: OAhNZZ
.. section: Library
Fix parsing positional argument with :ref:`nargs` equal to ``'?'`` or
``'*'`` if it is preceded by an option and another positional argument.
..
.. date: 2024-09-20-18-23-19
.. gh-issue: 100980
.. nonce: 8nVAB6
.. section: Library
The :attr:`~ctypes.Structure._fields_` attribute of
:class:`ctypes.Structure` and :class:`~ctypes.Union` is no longer set if the
setattr operation raises an error.
..
.. date: 2024-09-20-12-23-11
.. gh-issue: 53780
.. nonce: mrV1zi
.. section: Library
:mod:`argparse` now ignores the first ``"--"`` (double dash) between an
option and command.
..
.. date: 2024-09-19-20-15-00
.. gh-issue: 124217
.. nonce: j0KlQB
.. section: Library
Add RFC 9637 reserved IPv6 block ``3fff::/20`` in :mod:`ipaddress` module.
..
.. date: 2024-09-19-16-00-22
.. gh-issue: 111513
.. nonce: 6jHm02
.. section: Library
Improve the error message that may be raised by
:meth:`datetime.date.fromtimestamp`.
..
.. date: 2024-09-19-11-47-39
.. gh-issue: 124248
.. nonce: g7rufd
.. section: Library
Fixed potential crash when using :mod:`struct` to process zero-width 'Pascal
string' fields (``0p``).
..
.. date: 2024-09-19-10-36-18
.. gh-issue: 81691
.. nonce: Hyhp_U
.. section: Library
Fix handling of multiple ``"--"`` (double dashes) in :mod:`argparse`. Only
the first one has now been removed, all subsequent ones are now taken
literally.
..
.. date: 2024-09-19-03-46-59
.. gh-issue: 87041
.. nonce: 9Ox7Bv
.. section: Library
Fix a bug in :mod:`argparse` where lengthy subparser argument help is
incorrectly indented.
..
.. date: 2024-09-19-00-09-48
.. gh-issue: 84559
.. nonce: IrxvQe
.. section: Library
The default :mod:`multiprocessing` start method on Linux and other POSIX
systems has been changed away from often unsafe ``"fork"`` to
``"forkserver"`` (when the platform supports sending file handles over pipes
as most do) or ``"spawn"``. Mac and Windows are unchanged as they already
default to ``"spawn"``.
..
.. date: 2024-09-18-17-45-52
.. gh-issue: 124212
.. nonce: n6kIby
.. section: Library
Fix invalid variable in :mod:`venv` handling of failed symlink on Windows
..
.. date: 2024-09-17-18-06-42
.. gh-issue: 124171
.. nonce: PHCvRJ
.. section: Library
Add workaround for broken :c:func:`!fmod()` implementations on Windows, that
loose zero sign (e.g. ``fmod(-10, 1)`` returns ``0.0``). Patch by Sergey B
Kirpichev.
..
.. date: 2024-09-16-12-31-48
.. gh-issue: 123978
.. nonce: z3smEu
.. section: Library
Remove broken :func:`time.thread_time` and :func:`time.thread_time_ns` on
NetBSD.
..
.. date: 2024-09-13-10-34-19
.. gh-issue: 123934
.. nonce: yMe7mL
.. section: Library
Fix :class:`unittest.mock.MagicMock` resetting magic methods return values
after ``.reset_mock(return_value=True)`` was called.
..
.. date: 2024-09-12-10-55-19
.. gh-issue: 124016
.. nonce: ncs0hd
.. section: Library
Update :mod:`unicodedata` database to Unicode 16.0.0.
..
.. date: 2024-09-11-19-12-23
.. gh-issue: 123968
.. nonce: OwHON_
.. section: Library
Fix the command-line interface for the :mod:`random` module to select floats
between 0 and N, not 1 and N.
..
.. date: 2024-09-11-19-05-32
.. gh-issue: 123945
.. nonce: jLwybB
.. section: Library
Fix a bug where :mod:`argparse` doesn't recognize negative numbers with
underscores
..
.. date: 2024-09-11-13-33-19
.. gh-issue: 123935
.. nonce: fRZ_56
.. section: Library
Fix parent slots detection for dataclasses that inherit from classes with
``__dictoffset__``.
..
.. date: 2024-09-10-11-26-14
.. gh-issue: 123892
.. nonce: 2gzIrz
.. section: Library
Add ``"_wmi"`` to :data:`sys.stdlib_module_names`. Patch by Victor Stinner.
..
.. date: 2024-09-06-10-17-54
.. gh-issue: 84808
.. nonce: ION67Z
.. section: Library
Fix error handling in :py:class:`~socket.socket` method
:py:func:`~socket.socket.connect_ex` on platforms where :c:data:`errno` can
be negative.
..
.. date: 2024-09-06-01-35-11
.. gh-issue: 123756
.. nonce: Ozbhke
.. section: Library
Added a new argument ``mode`` to :class:`pdb.Pdb`. Only allow :mod:`pdb`
from command line to use ``restart`` command.
..
.. date: 2024-09-06-00-00-43
.. gh-issue: 122765
.. nonce: tx4hsr
.. section: Library
Fix unbalanced quote errors occurring when activate.csh in :mod:`venv` was
sourced with a custom prompt containing unpaired quotes or newlines.
..
.. date: 2024-09-04-18-23-43
.. gh-issue: 123657
.. nonce: Oks4So
.. section: Library
Fix crash and memory leak in :func:`decimal.getcontext`. It crashed when
using a thread-local context by ``--with-decimal-contextvar=no``.
..
.. date: 2024-09-02-20-34-04
.. gh-issue: 123339
.. nonce: czgcSu
.. section: Library
Fix :func:`inspect.getsource` for classes in :mod:`collections.abc` and
:mod:`decimal` (for pure Python implementation) modules.
:func:`inspect.getcomments` now raises OSError instead of IndexError if the
``__firstlineno__`` value for a class is out of bound.
..
.. date: 2024-08-31-12-34-44
.. gh-issue: 123374
.. nonce: 3kE7rb
.. section: Library
Remove check for redefined memo entry in :func:`pickletools.dis`.
..
.. date: 2024-08-30-09-01-35
.. gh-issue: 123504
.. nonce: lJ9_BB
.. section: Library
Fixed reference leak in the finalization of :mod:`tkinter`.
..
.. date: 2024-08-29-14-51-36
.. gh-issue: 123430
.. nonce: M7wXl9
.. section: Library
Pages generated by the :mod:`http.server` module allow the browser to apply
its default dark mode.
..
.. date: 2024-08-29-09-27-12
.. gh-issue: 123446
.. nonce: _I_mMr
.. section: Library
Fix empty function name in :exc:`TypeError` when :func:`csv.reader`,
:func:`csv.writer`, or :func:`csv.register_dialect` are used without the
required args.
..
.. date: 2024-08-28-20-08-19
.. gh-issue: 123448
.. nonce: tItJlp
.. section: Library
Fixed memory leak of :class:`typing.NoDefault` by moving it to the static
types array.
..
.. date: 2024-08-28-13-03-36
.. gh-issue: 123409
.. nonce: lW0YF-
.. section: Library
Fix :attr:`ipaddress.IPv6Address.reverse_pointer` output according to
:rfc:`RFC 3596, §2.5 <3596#section-2.5>`. Patch by Bénédikt Tran.
..
.. date: 2024-08-27-12-38-42
.. gh-issue: 123089
.. nonce: vA7iFR
.. section: Library
Make :class:`weakref.WeakSet` safe against concurrent mutations while it is
being iterated. Patch by Kumar Aditya.
..
.. date: 2024-08-27-12-11-00
.. gh-issue: 123363
.. nonce: gKuJp6
.. section: Library
Show string value of :opcode:`CONTAINS_OP` oparg in :mod:`dis` output. Patch
by Alexandr153.
..
.. date: 2024-08-27-10-30-37
.. gh-issue: 123341
.. nonce: 5e-fjt
.. section: Library
Add :meth:`~object.__class_getitem__` to :class:`!tkinter.Event` for type
subscript support at runtime. Patch by Adonis Rakateli.
..
.. date: 2024-08-26-19-36-00
.. gh-issue: 123340
.. nonce: mQKI1H
.. section: Library
Show string value of :opcode:`IS_OP` oparg in :mod:`dis` output.
..
.. date: 2024-08-26-18-48-13
.. gh-issue: 119518
.. nonce: QFYH9q
.. section: Library
Speed up normalization of :class:`pathlib.PurePath` and
:class:`~pathlib.Path` objects by not interning string parts.
..
.. date: 2024-08-26-13-45-20
.. gh-issue: 123270
.. nonce: gXHvNJ
.. section: Library
Applied a more surgical fix for malformed payloads in :class:`zipfile.Path`
causing infinite loops (gh-122905) without breaking contents using
legitimate characters.
..
.. date: 2024-08-25-16-59-20
.. gh-issue: 73991
.. nonce: 1w8u3K
.. section: Library
Add :meth:`pathlib.Path.copy_into` and :meth:`~pathlib.Path.move_into`,
which copy and move files and directories into *existing* directories.
..
.. date: 2024-08-24-06-05-41
.. gh-issue: 123228
.. nonce: jR_5O5
.. section: Library
Fix return type for
:func:`!_pyrepl.readline._ReadlineWrapper.get_line_buffer` to be
:func:`str`. Patch by Sergey B Kirpichev.
..
.. date: 2024-08-24-00-03-01
.. gh-issue: 123240
.. nonce: uFPG3l
.. section: Library
Raise audit events for the :func:`input` in the new REPL.
..
.. date: 2024-08-23-22-01-30
.. gh-issue: 76960
.. nonce: vsANPu
.. section: Library
Fix :func:`urllib.parse.urljoin` and :func:`urllib.parse.urldefrag` for URIs
containing empty components. For example, :func:`!urljoin` with relative
reference "?" now sets empty query and removes fragment. Preserve empty
components (authority, params, query, fragment) in :func:`!urljoin`.
Preserve empty components (authority, params, query) in :func:`!urldefrag`.
..
.. date: 2024-08-23-15-49-10
.. gh-issue: 116810
.. nonce: QLBUU8
.. section: Library
Resolve a memory leak introduced in CPython 3.10's :mod:`ssl` when the
:attr:`ssl.SSLSocket.session` property was accessed. Speeds up read and
write access to said property by no longer unnecessarily cloning session
objects via serialization.
..
.. date: 2024-08-22-20-10-13
.. gh-issue: 123243
.. nonce: Kifj1L
.. section: Library
Fix memory leak in :mod:`!_decimal`.
..
.. date: 2024-08-22-11-25-19
.. gh-issue: 122546
.. nonce: BSmeE7
.. section: Library
Consistently use same file name for different exceptions in the new repl.
Patch by Sergey B Kirpichev.
..
.. date: 2024-08-22-09-37-48
.. gh-issue: 123213
.. nonce: owmXnP
.. section: Library
:meth:`xml.etree.ElementTree.Element.extend` and
:class:`~xml.etree.ElementTree.Element` assignment no longer hide the
internal exception if an erroneous generator is passed. Patch by Bar Harel.
..
.. date: 2024-08-20-18-02-27
.. gh-issue: 85110
.. nonce: 8_iDQy
.. section: Library
Preserve relative path in URL without netloc in
:func:`urllib.parse.urlunsplit` and :func:`urllib.parse.urlunparse`.
..
.. date: 2024-08-20-14-22-49
.. gh-issue: 123165
.. nonce: vOZZOA
.. section: Library
Add support for rendering :class:`~dis.Positions` in :mod:`dis`.
..
.. date: 2024-08-19-17-37-18
.. gh-issue: 122909
.. nonce: kP12SK
.. section: Library
In urllib.request when URLError is raised opening an ftp URL, the exception
argument is now consistently a string. Earlier versions passed either a
string or an ftplib exception instance as the argument to URLError.
..
.. date: 2024-08-18-08-25-32
.. gh-issue: 123084
.. nonce: rf8izX
.. section: Library
Deprecate :class:`!shutil.ExecError`, which hasn't been raised by any
:mod:`shutil` function since Python 3.4. It's now an alias for
:exc:`RuntimeError`.
..
.. date: 2024-08-17-08-17-20
.. gh-issue: 123085
.. nonce: 7Io2yH
.. section: Library
In a bare call to :func:`importlib.resources.files`, ensure the caller's
frame is properly detected when ``importlib.resources`` is itself available
as a compiled module only (no source).
..
.. date: 2024-08-16-19-13-21
.. gh-issue: 123067
.. nonce: Nx9O4R
.. section: Library
Fix quadratic complexity in parsing ``"``-quoted cookie values with
backslashes by :mod:`http.cookies`.
..
.. date: 2024-08-16-16-53-52
.. gh-issue: 123049
.. nonce: izx_fH
.. section: Library
Add support for :const:`~configparser.UNNAMED_SECTION` in
:meth:`configparser.ConfigParser.add_section`.
..
.. date: 2024-08-15-09-45-34
.. gh-issue: 121735
.. nonce: _1q0qf
.. section: Library
When working with zip archives, importlib.resources now properly honors
module-adjacent references (e.g. ``files(pkg.mod)`` and not just
``files(pkg)``).
..
.. date: 2024-08-14-10-41-11
.. gh-issue: 122981
.. nonce: BHV0Z9
.. section: Library
Fix :func:`inspect.getsource` for generated classes with Python base classes
(e.g. enums).
..
.. date: 2024-08-11-14-23-07
.. gh-issue: 122903
.. nonce: xktZta
.. section: Library
``zipfile.Path.glob`` now correctly matches directories instead of silently
omitting them.
..
.. date: 2024-08-11-14-08-04
.. gh-issue: 122905
.. nonce: 7tDsxA
.. section: Library
:class:`zipfile.Path` objects now sanitize names from the zipfile.
..
.. date: 2024-08-10-14-16-59
.. gh-issue: 122873
.. nonce: XlHaUn
.. section: Library
Enable :mod:`json` module to work as a script using the :option:`-m` switch:
``python -m json``. See the :ref:`JSON command-line interface
<json-commandline>` documentation. Patch by Trey Hunner.
..
.. date: 2024-08-10-10-21-44
.. gh-issue: 122858
.. nonce: ZC1rJD
.. section: Library
Deprecate :func:`!asyncio.iscoroutinefunction` in favor of
:func:`inspect.iscoroutinefunction`.
..
.. date: 2024-08-07-17-41-16
.. gh-issue: 116263
.. nonce: EcXir0
.. section: Library
:class:`logging.handlers.RotatingFileHandler` no longer rolls over empty log
files.
..
.. date: 2024-08-07-14-12-19
.. gh-issue: 105376
.. nonce: QbGPdE
.. section: Library
Restore the deprecated :mod:`logging` ``warn()`` method. It was removed in
Python 3.13 alpha 1. Keep the deprecated ``warn()`` method in Python 3.13.
Patch by Victor Stinner.
..
.. date: 2024-08-07-11-57-41
.. gh-issue: 122311
.. nonce: LDExnJ
.. section: Library
Improve errors in the :mod:`pickle` module. :exc:`~pickle.PicklingError` is
now raised more often instead of :exc:`UnicodeEncodeError`,
:exc:`ValueError` and :exc:`AttributeError`, and the original exception is
chained to it. Improve and unify error messages in Python and C
implementations.
..
.. date: 2024-08-06-18-07-19
.. gh-issue: 122744
.. nonce: kCzNDI
.. section: Library
Bump the version of pip bundled in ensurepip to version 24.2.
..
.. date: 2024-08-06-10-36-55
.. gh-issue: 118761
.. nonce: q_x_1A
.. section: Library
Improve import time of :mod:`pprint` by around seven times. Patch by Hugo
van Kemenade.
..
.. date: 2024-08-06-07-24-00
.. gh-issue: 118974
.. nonce: qamsCQ
.. section: Library
Add ``decorator`` parameter to :func:`dataclasses.make_dataclass` to
customize the functional creation of dataclasses.
..
.. date: 2024-08-04-14-07-18
.. gh-issue: 118814
.. nonce: uiyks1
.. section: Library
Fix the :class:`typing.TypeVar` constructor when name is passed by keyword.
..
.. date: 2024-08-03-06-51-08
.. gh-issue: 122637
.. nonce: gpas8J
.. section: Library
Adjust ``cmath.tanh(nanj)`` and ``cmath.tanh(infj)`` for recent C standards.
..
.. date: 2024-07-31-20-43-21
.. gh-issue: 122478
.. nonce: sCU2Le
.. section: Library
Remove internal frames from tracebacks shown in
:class:`code.InteractiveInterpreter` with non-default
:func:`sys.excepthook`. Save correct tracebacks in
:attr:`sys.last_traceback` and update ``__traceback__`` attribute of
:attr:`sys.last_value` and :attr:`sys.last_exc`.
..
.. date: 2024-07-31-15-08-42
.. gh-issue: 116622
.. nonce: aKxIQA
.. section: Library
On Android, the ``FICLONE`` and ``FICLONERANGE`` constants are no longer
exposed by :mod:`fcntl`, as these ioctls are blocked by SELinux.
..
.. date: 2024-07-31-14-55-41
.. gh-issue: 82378
.. nonce: eZvYmR
.. section: Library
Make sure that the new :term:`REPL` interprets :data:`sys.tracebacklimit` in
the same way that the classic REPL did.
..
.. date: 2024-07-30-21-29-30
.. gh-issue: 122334
.. nonce: LeoE1x
.. section: Library
Fix crash when importing :mod:`ssl` after the main interpreter restarts.
..
.. date: 2024-07-30-15-57-07
.. gh-issue: 122459
.. nonce: AYIoeN
.. section: Library
Optimize :mod:`pickling <pickle>` by name objects without the ``__module__``
attribute.
..
.. date: 2024-07-30-14-46-16
.. gh-issue: 87320
.. nonce: -Yk1wb
.. section: Library
In :class:`code.InteractiveInterpreter`, handle exceptions caused by calling
a non-default :func:`sys.excepthook`. Before, the exception bubbled up to
the caller, ending the :term:`REPL`.
..
.. date: 2024-07-30-04-27-55
.. gh-issue: 122272
.. nonce: 6Wwa1V
.. section: Library
On some platforms such as Linux, year with century was not 0-padded when
formatted by :meth:`~.datetime.strftime` with C99-specific specifiers
``'%C'`` or ``'%F'``. The 0-padding behavior is now guaranteed when the
format specifiers ``'%C'`` and ``'%F'`` are supported by the C library.
Patch by Ben Hsing
..
.. date: 2024-07-29-16-47-08
.. gh-issue: 122400
.. nonce: fM0YSv
.. section: Library
Handle :exc:`ValueError`\s raised by :func:`os.stat` in
:class:`filecmp.dircmp` and :func:`filecmp.cmpfiles`. Patch by Bénédikt
Tran.
..
.. date: 2024-07-29-10-24-48
.. gh-issue: 122311
.. nonce: xChV1b
.. section: Library
Fix some error messages in :mod:`pickle`.
..
.. date: 2024-07-27-16-10-41
.. gh-issue: 121650
.. nonce: nf6oc9
.. section: Library
:mod:`email` headers with embedded newlines are now quoted on output. The
:mod:`~email.generator` will now refuse to serialize (write) headers that
are unsafely folded or delimited; see
:attr:`~email.policy.Policy.verify_generated_headers`. (Contributed by Bas
Bloemsaat and Petr Viktorin in :gh:`121650`.)
..
.. date: 2024-07-26-21-21-13
.. gh-issue: 122332
.. nonce: fvw88r
.. section: Library
Fixed segfault with :meth:`asyncio.Task.get_coro` when using an eager task
factory.
..
.. date: 2024-07-25-15-41-14
.. gh-issue: 105733
.. nonce: o3koJA
.. section: Library
:func:`ctypes.ARRAY` is now :term:`soft deprecated`: it no longer emits
deprecation warnings and is not scheduled for removal.
..
.. date: 2024-07-24-08-48-22
.. gh-issue: 122213
.. nonce: o3pdgA
.. section: Library
Add notes for pickle serialization errors that allow to identify the source
of the error.
..
.. date: 2024-07-23-22-26-00
.. gh-issue: 119180
.. nonce: B2IVT8
.. section: Library
As part of :pep:`749`, add the following attributes for customizing
evaluation of annotation scopes:
* ``evaluate_value`` on :class:`typing.TypeAliasType`
* ``evaluate_bound``, ``evaluate_constraints``, and ``evaluate_default`` on :class:`typing.TypeVar`
* ``evaluate_default`` on :class:`typing.ParamSpec`
* ``evaluate_default`` on :class:`typing.TypeVarTuple`
..
.. date: 2024-07-23-17-13-10
.. gh-issue: 119180
.. nonce: 5PZELo
.. section: Library
Fix handling of classes with custom metaclasses in
``annotationlib.get_annotations``.
..
.. date: 2024-07-23-15-30-23
.. gh-issue: 122170
.. nonce: Z9gi3Y
.. section: Library
Handle :exc:`ValueError`\s raised by :func:`os.stat` in :mod:`linecache`.
Patch by Bénédikt Tran.
..
.. date: 2024-07-23-15-11-13
.. gh-issue: 122163
.. nonce: 4wRUuM
.. section: Library
Add notes for JSON serialization errors that allow to identify the source of
the error.
..
.. date: 2024-07-23-13-07-12
.. gh-issue: 122129
.. nonce: PwbC8q
.. section: Library
Improve support of method descriptors and wrappers in the help title.
..
.. date: 2024-07-23-12-38-14
.. gh-issue: 122145
.. nonce: sTO8nX
.. section: Library
Fix an issue when reporting tracebacks corresponding to Python code emitting
an empty AST body. Patch by Nikita Sobolev and Bénédikt Tran.
..
.. date: 2024-07-23-10-59-38
.. gh-issue: 121723
.. nonce: iJEf7e
.. section: Library
Make :func:`logging.config.dictConfig` accept any object implementing the
Queue public API. See the :ref:`queue configuration <configure-queue>`
section for details. Patch by Bénédikt Tran.
..
.. date: 2024-07-23-09-14-44
.. gh-issue: 82951
.. nonce: -F5p5A
.. section: Library
Serializing objects with complex ``__qualname__`` (such as unbound methods
and nested classes) by name no longer involves serializing parent objects by
value in pickle protocols < 4.
..
.. date: 2024-07-22-08-57-28
.. gh-issue: 120754
.. nonce: Eo5puP
.. section: Library
``Pathlib.read_bytes`` no longer opens the file in Python's buffered I/O
mode. This reduces overheads as the code reads a file in whole leading to a
modest speedup.
..
.. date: 2024-07-22-08-14-04
.. gh-issue: 113785
.. nonce: 6B_KNB
.. section: Library
:mod:`csv` now correctly parses numeric fields (when used with
:const:`csv.QUOTE_NONNUMERIC` or :const:`csv.QUOTE_STRINGS`) which start
with an escape character.
..
.. date: 2024-07-21-18-03-30
.. gh-issue: 122088
.. nonce: vi2bP-
.. section: Library
:func:`@warnings.deprecated <warnings.deprecated>` now copies the coroutine
status of functions and methods so that :func:`inspect.iscoroutinefunction`
returns the correct result.
..
.. date: 2024-07-21-10-45-24
.. gh-issue: 122081
.. nonce: dNrYMq
.. section: Library
Fix a crash in the :func:`!decimal.IEEEContext` optional function available
via the ``EXTRA_FUNCTIONALITY`` configuration flag.
..
.. date: 2024-07-21-02-00-46
.. gh-issue: 73991
.. nonce: pLxdtJ
.. section: Library
Add :meth:`pathlib.Path.move`, which moves a file or directory tree.
..
.. date: 2024-07-17-12-55-22
.. gh-issue: 121268
.. nonce: 41RmjR
.. section: Library
Remove workarounds for non-IEEE 754 systems in :mod:`cmath`.
..
.. date: 2024-07-17-09-44-35
.. gh-issue: 119698
.. nonce: WlygzR
.. section: Library
Due to the lack of interest for :meth:`symtable.Class.get_methods`, the
method is marked as deprecated and will be removed in Python 3.16. Patch by
Bénédikt Tran.
..
.. date: 2024-07-17-09-23-03
.. gh-issue: 121889
.. nonce: 6se9jS
.. section: Library
Adjusts ``cmath.acosh(complex('0+nanj'))`` for recent C standards.
..
.. date: 2024-07-16-20-49-07
.. gh-issue: 121804
.. nonce: gYN-In
.. section: Library
Correctly show error locations, when :exc:`SyntaxError` raised in new repl.
Patch by Sergey B Kirpichev.
..
.. date: 2024-07-15-19-34-56
.. gh-issue: 121797
.. nonce: qDqj59
.. section: Library
Add alternative :class:`~fractions.Fraction` constructor
:meth:`Fraction.from_number() <fractions.Fraction.from_number>`.
..
.. date: 2024-07-15-19-25-25
.. gh-issue: 121798
.. nonce: GmuBDu
.. section: Library
Add alternative :class:`~decimal.Decimal` constructor
:meth:`Decimal.from_number() <decimal.Decimal.from_number>`.
..
.. date: 2024-07-14-11-18-28
.. gh-issue: 120930
.. nonce: Kuo4L0
.. section: Library
Fixed a bug introduced by gh-92081 that added an incorrect extra blank to
encoded words occurring in wrapped headers.
..
.. date: 2024-07-14-06-24-02
.. gh-issue: 57141
.. nonce: C3jhDh
.. section: Library
The *shallow* argument to :class:`filecmp.dircmp` (new in Python 3.13) is
now keyword-only.
..
.. date: 2024-07-13-06-23-24
.. gh-issue: 121245
.. nonce: RfOgf4
.. section: Library
Simplify handling of the history file in ``site.register_readline()``
helper. The ``CAN_USE_PYREPL`` variable now will be initialized, when
imported. Patch by Sergey B Kirpichev.
..
.. date: 2024-07-10-08-13-34
.. gh-issue: 121249
.. nonce: W9Gd09
.. section: Library
Support the :c:expr:`float complex` and :c:expr:`double complex` C types in
the :mod:`struct` module if the compiler has C11 complex arithmetic. Patch
by Sergey B Kirpichev.
..
.. date: 2024-07-09-12-23-32
.. gh-issue: 121486
.. nonce: Iultjh
.. section: Library
:mod:`math` functions :func:`~math.isqrt`, :func:`~math.log`,
:func:`~math.log2` and :func:`~math.log10` now support integers larger than
``2**2**32`` on 32-bit platforms.
..
.. date: 2024-07-08-03-45-34
.. gh-issue: 121474
.. nonce: NsvrUN
.. section: Library
Fix missing sanity check for ``parties`` arg in :class:`threading.Barrier`
constructor. Patch by Clinton Christian (pygeek).
..
.. date: 2024-07-06-23-39-38
.. gh-issue: 121450
.. nonce: vGqb3c
.. section: Library
Hard-coded breakpoints (:func:`breakpoint` and :func:`pdb.set_trace`) now
reuse the most recent ``Pdb`` instance that calls ``Pdb.set_trace()``,
instead of creating a new one each time. As a result, all the instance
specific data like ``display`` and ``commands`` are preserved across
Hard-coded breakpoints.
..
.. date: 2024-07-06-16-08-39
.. gh-issue: 119169
.. nonce: o0YymL
.. section: Library
Slightly speed up :func:`os.walk` by simplifying exception handling.
..
.. date: 2024-07-06-12-37-10
.. gh-issue: 121423
.. nonce: vnxrl4
.. section: Library
Improve import time of :mod:`socket` by lazy importing modules and writing
:data:`!socket.errorTab` as a constant.
..
.. date: 2024-07-04-17-36-03
.. gh-issue: 59110
.. nonce: IlI9Fz
.. section: Library
:mod:`zipimport` supports now namespace packages when no directory entry
exists.
..
.. date: 2024-07-03-14-23-04
.. gh-issue: 119004
.. nonce: L5MoUu
.. section: Library
Fix a crash in :ref:`OrderedDict.__eq__ <collections_OrderedDict__eq__>`
when operands are mutated during the check. Patch by Bénédikt Tran.
..
.. date: 2024-07-03-10-11-53
.. gh-issue: 121313
.. nonce: D7gARW
.. section: Library
Limit the reading size in the :class:`multiprocessing.connection.Connection`
class to 64 KiB to prevent memory overallocation and unnecessary memory
management system calls.
..
.. date: 2024-07-03-07-25-21
.. gh-issue: 121332
.. nonce: Iz6FEq
.. section: Library
Fix constructor of :mod:`ast` nodes with custom ``_attributes``. Previously,
passing custom attributes would raise a :py:exc:`DeprecationWarning`.
Passing arguments to the constructor that are not in ``_fields`` or
``_attributes`` remains deprecated. Patch by Jelle Zijlstra.
..
.. date: 2024-07-02-11-34-06
.. gh-issue: 121245
.. nonce: sSkDAr
.. section: Library
Fix a bug in the handling of the command history of the new :term:`REPL`
that caused the history file to be wiped at REPL exit.
..
.. date: 2024-07-01-11-23-18
.. gh-issue: 121210
.. nonce: cD0zfn
.. section: Library
Handle AST nodes with missing runtime fields or attributes in
:func:`ast.compare`. Patch by Bénédikt Tran.
..
.. date: 2024-06-29-19-30-15
.. gh-issue: 121163
.. nonce: SJKDFq
.. section: Library
Add support for ``all`` as an valid ``action`` for
:func:`warnings.simplefilter` and :func:`warnings.filterwarnings`.
..
.. date: 2024-06-29-15-23-26
.. gh-issue: 121151
.. nonce: HeLEvq
.. section: Library
Fix wrapping of long usage text of arguments inside a mutually exclusive
group in :mod:`argparse`.
..
.. date: 2024-06-29-15-21-12
.. gh-issue: 121141
.. nonce: 4evD6q
.. section: Library
Add support for :func:`copy.replace` to AST nodes. Patch by Bénédikt Tran.
..
.. date: 2024-06-29-05-08-59
.. gh-issue: 87744
.. nonce: rpF6Jw
.. section: Library
Fix waitpid race while calling
:meth:`~asyncio.subprocess.Process.send_signal` in asyncio. Patch by Kumar
Aditya.
..
.. date: 2024-06-27-13-47-14
.. gh-issue: 121027
.. nonce: jh55EC
.. section: Library
Add a future warning in :meth:`!functools.partial.__get__`. In future Python
versions :class:`functools.partial` will be a method descriptor.
..
.. date: 2024-06-27-12-27-52
.. gh-issue: 121027
.. nonce: D4K1OX
.. section: Library
Make the :class:`functools.partial` object a method descriptor.
..
.. date: 2024-06-26-17-00-39
.. gh-issue: 117784
.. nonce: inCtAV
.. section: Library
CPython now detects whether its linked TLS library supports TLSv1.3
post-handshake authentication and disables that feature if support is
lacking.
..
.. date: 2024-06-26-10-13-40
.. gh-issue: 121025
.. nonce: M-XXlV
.. section: Library
Improve the :meth:`~object.__repr__` of :class:`functools.partialmethod`.
Patch by Bénédikt Tran.
..
.. date: 2024-06-26-03-04-24
.. gh-issue: 121018
.. nonce: clVSc4
.. section: Library
Fixed issues where :meth:`!argparse.ArgumentParser.parse_args` did not honor
``exit_on_error=False``. Based on patch by Ben Hsing.
..
.. date: 2024-06-23-17-50-40
.. gh-issue: 119614
.. nonce: vwPGLB
.. section: Library
Fix truncation of strings with embedded null characters in some internal
operations in :mod:`tkinter`.
..
.. date: 2024-06-23-11-21-27
.. gh-issue: 120910
.. nonce: t0QXdB
.. section: Library
When reading installed files from an egg, use ``relative_to(walk_up=True)``
to honor files installed outside of the installation root.
..
.. date: 2024-06-23-07-23-08
.. gh-issue: 61103
.. nonce: ca_U_l
.. section: Library
Support :c:expr:`float complex`, :c:expr:`double complex` and :c:expr:`long
double complex` C types in :mod:`ctypes` as
:class:`~ctypes.c_float_complex`, :class:`~ctypes.c_double_complex` and
:class:`~ctypes.c_longdouble_complex` if the compiler has C11 complex
arithmetic. Patch by Sergey B Kirpichev.
..
.. date: 2024-06-22-22-52-24
.. gh-issue: 120888
.. nonce: sd8I3N
.. section: Library
Upgrade pip wheel bundled with ensurepip (pip 24.1.1)
..
.. date: 2024-06-22-22-23-56
.. gh-issue: 101830
.. nonce: 1BAoxH
.. section: Library
Accessing the :mod:`tkinter` object's string representation no longer
converts the underlying Tcl object to a string on Windows.
..
.. date: 2024-06-22-17-01-56
.. gh-issue: 120678
.. nonce: Ik8dCg
.. section: Library
Fix regression in the new REPL that meant that globals from files passed
using the ``-i`` argument would not be included in the REPL's global
namespace. Patch by Alex Waygood.
..
.. date: 2024-06-21-14-32-56
.. gh-issue: 120811
.. nonce: eBmVTV
.. section: Library
Fix possible memory leak in :meth:`contextvars.Context.run`.
..
.. date: 2024-06-21-12-00-16
.. gh-issue: 120782
.. nonce: LOE8tj
.. section: Library
Fix wrong references of the :mod:`datetime` types after reloading the
module.
..
.. date: 2024-06-21-06-37-46
.. gh-issue: 120713
.. nonce: WBbQx4
.. section: Library
:meth:`datetime.datetime.strftime` now 0-pads years with less than four
digits for the format specifiers ``%Y`` and ``%G`` on Linux. Patch by Ben
Hsing
..
.. date: 2024-06-20-01-31-24
.. gh-issue: 120769
.. nonce: PfiMrc
.. section: Library
Make empty line in :mod:`pdb` repeats the last command even when the command
is from ``cmdqueue``.
..
.. date: 2024-06-19-23-08-25
.. gh-issue: 120780
.. nonce: 0Omopb
.. section: Library
Show string value of LOAD_SPECIAL oparg in :mod:`dis` output.
..
.. date: 2024-06-19-19-53-42
.. gh-issue: 41431
.. nonce: gnkUc5
.. section: Library
Add :meth:`datetime.time.strptime` and :meth:`datetime.date.strptime`.
Contributed by Wannes Boeykens.
..
.. date: 2024-06-19-15-43-04
.. gh-issue: 120743
.. nonce: CMMl2P
.. section: Library
:term:`Soft deprecate <soft deprecated>` :func:`os.popen` and
:func:`os.spawn* <os.spawnl>` functions. They should no longer be used to
write new code. The :mod:`subprocess` module is recommended instead. Patch
by Victor Stinner.
..
.. date: 2024-06-19-15-06-58
.. gh-issue: 120732
.. nonce: OvYV9b
.. section: Library
Fix ``name`` passing to :class:`unittest.mock.Mock` object when using
:func:`unittest.mock.create_autospec`.
..
.. date: 2024-06-19-13-20-01
.. gh-issue: 111259
.. nonce: Wki5PV
.. section: Library
:mod:`re` now handles patterns like ``"[\s\S]"`` or ``"\s|\S"`` which match
any character as effectively as a dot with the ``DOTALL`` modifier
(``"(?s:.)"``).
..
.. date: 2024-06-18-19-18-10
.. gh-issue: 120683
.. nonce: xmRez7
.. section: Library
Fix an error in :class:`logging.LogRecord`, when the integer part of the
timestamp is rounded up, while the millisecond calculation truncates,
causing the log timestamp to be wrong by up to 999 ms (affected roughly 1 in
8 million timestamps).
..
.. date: 2024-06-18-14-45-38
.. gh-issue: 118710
.. nonce: 5GZZPX
.. section: Library
:class:`ipaddress.IPv4Address` and :class:`ipaddress.IPv6Address` attributes
``version`` and ``max_prefixlen`` are now available on the class.
..
.. date: 2024-06-17-20-04-13
.. gh-issue: 120633
.. nonce: kZC5wt
.. section: Library
Move scrollbar and remove tear-off menus in turtledemo.
..
.. date: 2024-06-16-21-33-56
.. gh-issue: 120606
.. nonce: kugbwR
.. section: Library
Allow users to use EOF to exit ``commands`` definition in :mod:`pdb`
..
.. date: 2024-06-15-23-38-36
.. gh-issue: 120284
.. nonce: HwsAtY
.. section: Library
Allow :meth:`asyncio.Runner.run` to accept :term:`awaitable` objects instead
of simply :term:`coroutine`\s.
..
.. date: 2024-06-15-12-04-46
.. gh-issue: 120541
.. nonce: d3cc5y
.. section: Library
Improve the prompt in the "less" pager when :func:`help` is called with
non-string argument.
..
.. date: 2024-06-14-20-05-25
.. gh-issue: 120495
.. nonce: OxgZKB
.. section: Library
Fix incorrect exception handling in Tab Nanny. Patch by Wulian233.
..
.. date: 2024-06-12-15-07-58
.. gh-issue: 120388
.. nonce: VuTQMT
.. section: Library
Improve a warning message when a test method in :mod:`unittest` returns
something other than ``None``. Now we show the returned object type and
optional asyncio-related tip.
..
.. date: 2024-06-12-11-54-05
.. gh-issue: 120381
.. nonce: O-BNLs
.. section: Library
Correct :func:`inspect.ismethoddescriptor` to check also for the lack of
:meth:`~object.__delete__`. Patch by Jan Kaliszewski.
..
.. date: 2024-06-12-10-00-31
.. gh-issue: 90425
.. nonce: 5CfkKG
.. section: Library
The OS byte in gzip headers is now always set to 255 when using
:func:`gzip.compress`.
..
.. date: 2024-06-11-16-34-41
.. gh-issue: 120343
.. nonce: hdiXeU
.. section: Library
Fix column offset reporting for tokens that come after multiline f-strings
in the :mod:`tokenize` module.
..
.. date: 2024-06-11-07-17-25
.. gh-issue: 119180
.. nonce: iH-2zy
.. section: Library
As part of implementing :pep:`649` and :pep:`749`, add a new module
``annotationlib``. Add support for unresolved forward references in
annotations to :mod:`dataclasses`, :class:`typing.TypedDict`, and
:class:`typing.NamedTuple`.
..
.. date: 2024-06-10-14-00-40
.. gh-issue: 119600
.. nonce: jJMf4C
.. section: Library
Fix :func:`unittest.mock.patch` to not read attributes of the target when
``new_callable`` is set. Patch by Robert Collins.
..
.. date: 2024-06-09-19-53-11
.. gh-issue: 120289
.. nonce: s4HXR0
.. section: Library
Fixed the use-after-free issue in :mod:`cProfile` by disallowing
``disable()`` and ``clear()`` in external timers.
..
.. date: 2024-06-08-17-41-11
.. gh-issue: 82017
.. nonce: WpSTGi
.. section: Library
Added support for converting any objects that have the
:meth:`!as_integer_ratio` method to a :class:`~fractions.Fraction`.
..
.. date: 2024-06-08-15-46-35
.. gh-issue: 114053
.. nonce: Ub2XgJ
.. section: Library
Fix edge-case bug where :func:`typing.get_type_hints` would produce
incorrect results if type parameters in a class scope were overridden by
assignments in a class scope and ``from __future__ import annotations``
semantics were enabled. Patch by Alex Waygood.
..
.. date: 2024-06-08-15-15-29
.. gh-issue: 114053
.. nonce: WQLAFG
.. section: Library
Fix erroneous :exc:`NameError` when calling :func:`inspect.get_annotations`
with ``eval_str=True``` on a class that made use of :pep:`695` type
parameters in a module that had ``from __future__ import annotations`` at
the top of the file. Patch by Alex Waygood.
..
.. date: 2024-06-08-14-36-40
.. gh-issue: 120268
.. nonce: MNpd1q
.. section: Library
Prohibit passing ``None`` to pure-Python :meth:`datetime.date.fromtimestamp`
to achieve consistency with C-extension implementation.
..
.. date: 2024-06-08-09-45-31
.. gh-issue: 120244
.. nonce: 8o9Dzr
.. section: Library
Fix memory leak in :func:`re.sub` when the replacement string contains
backreferences.
..
.. date: 2024-06-08-03-29-01
.. gh-issue: 120254
.. nonce: h682ke
.. section: Library
Added ``commands`` argument to :func:`pdb.set_trace` which allows users to
send debugger commands from the source file.
..
.. date: 2024-06-07-13-21-11
.. gh-issue: 120211
.. nonce: Rws_gf
.. section: Library
Fix :mod:`tkinter.ttk` with Tcl/Tk 9.0.
..
.. date: 2024-06-07-11-23-31
.. gh-issue: 71587
.. nonce: IjFajE
.. section: Library
Fix crash in C version of :meth:`datetime.datetime.strptime` when called
again on the restarted interpreter.
..
.. date: 2024-06-07-10-10-32
.. gh-issue: 117983
.. nonce: NeMR9n
.. section: Library
Defer the ``threading`` import in ``importlib.util`` until lazy loading is
used.
..
.. date: 2024-06-07-02-00-31
.. gh-issue: 120157
.. nonce: HnWcF9
.. section: Library
Remove unused constant ``concurrent.futures._base._FUTURE_STATES`` in
:mod:`concurrent.futures`. Patch by Clinton Christian (pygeek).
..
.. date: 2024-06-06-17-24-43
.. gh-issue: 120161
.. nonce: DahNXV
.. section: Library
:mod:`datetime` no longer crashes in certain complex reference cycle
situations.
..
.. date: 2024-06-06-12-07-57
.. gh-issue: 119698
.. nonce: rRrprk
.. section: Library
Fix :meth:`symtable.Class.get_methods` and document its behaviour. Patch by
Bénédikt Tran.
..
.. date: 2024-06-05-16-30-28
.. gh-issue: 120121
.. nonce: 9dz8i7
.. section: Library
Add :exc:`concurrent.futures.InvalidStateError` to module's ``__all__``.
..
.. date: 2024-06-05-11-39-21
.. gh-issue: 119933
.. nonce: ooJXQV
.. section: Library
Add the :class:`symtable.SymbolTableType` enumeration to represent the
possible outputs of the :class:`symtable.SymbolTable.get_type` method. Patch
by Bénédikt Tran.
..
.. date: 2024-06-05-11-03-10
.. gh-issue: 120029
.. nonce: QBsw47
.. section: Library
Expose :class:`symtable.Symbol` methods
:meth:`~symtable.Symbol.is_free_class`,
:meth:`~symtable.Symbol.is_comp_iter` and
:meth:`~symtable.Symbol.is_comp_cell`. Patch by Bénédikt Tran.
..
.. date: 2024-06-05-08-02-46
.. gh-issue: 120108
.. nonce: 4U9BL8
.. section: Library
Fix calling :func:`copy.deepcopy` on :mod:`ast` trees that have been
modified to have references to parent nodes. Patch by Jelle Zijlstra.
..
.. date: 2024-06-04-19-49-16
.. gh-issue: 120056
.. nonce: 5aqozw
.. section: Library
Add :data:`!socket.IP_RECVERR` and :data:`!socket.IP_RECVTTL` constants
(both available since Linux 2.2). And :data:`!socket.IP_RECVORIGDSTADDR`
constant (available since Linux 2.6.29).
..
.. date: 2024-06-04-19-03-25
.. gh-issue: 112672
.. nonce: K2XfZH
.. section: Library
Support building :mod:`tkinter` with Tcl 9.0.
..
.. date: 2024-06-04-18-53-10
.. gh-issue: 120057
.. nonce: RSD9_Z
.. section: Library
Added the :data:`os.environ.refresh() <os.environ>` method to update
:data:`os.environ` with changes to the environment made by
:func:`os.putenv`, by :func:`os.unsetenv`, or made outside Python in the
same process. Patch by Victor Stinner.
..
.. date: 2024-06-04-14-54-46
.. gh-issue: 120029
.. nonce: _1YdTf
.. section: Library
Expose :meth:`symtable.Symbol.is_type_parameter` in the :mod:`symtable`
module. Patch by Bénédikt Tran.
..
.. date: 2024-06-04-12-23-01
.. gh-issue: 119819
.. nonce: WKKrYh
.. section: Library
Fix regression to allow logging configuration with multiprocessing queue
types.
..
.. date: 2024-06-04-08-57-02
.. gh-issue: 65454
.. nonce: o9j4wF
.. section: Library
:func:`unittest.mock.Mock.attach_mock` no longer triggers a call to a
``PropertyMock`` being attached.
..
.. date: 2024-06-03-11-18-16
.. gh-issue: 117142
.. nonce: kWTXQo
.. section: Library
The :mod:`ctypes` module may now be imported in all subinterpreters,
including those that have their own GIL.
..
.. date: 2024-06-02-15-09-17
.. gh-issue: 118835
.. nonce: KUAuz6
.. section: Library
Fix _pyrepl crash when using custom prompt with ANSI escape codes.
..
.. date: 2024-06-02-13-35-11
.. gh-issue: 81936
.. nonce: ETeW9x
.. section: Library
:meth:`!help` and :meth:`!showtopic` methods now respect a configured
*output* argument to :class:`!pydoc.Helper` and not use the pager in such
cases. Patch by Enrico Tröger.
..
.. date: 2024-06-01-16-58-43
.. gh-issue: 117398
.. nonce: kR0RW7
.. section: Library
The ``_datetime`` module (C implementation for :mod:`datetime`) now supports
being imported in multiple interpreters.
..
.. date: 2024-05-31-21-17-43
.. gh-issue: 119824
.. nonce: CQlxWV
.. section: Library
Print stack entry in :mod:`pdb` when and only when user input is needed.
..
.. date: 2024-05-31-13-56-21
.. gh-issue: 119838
.. nonce: H6XHlE
.. section: Library
In mixed arithmetic operations with :class:`~fractions.Fraction` and
complex, the fraction is now converted to :class:`float` instead of
:class:`complex`.
..
.. date: 2024-05-31-12-57-31
.. gh-issue: 119770
.. nonce: NCtels
.. section: Library
Make :mod:`termios` ``ioctl()`` constants positive. Patch by Victor Stinner.
..
.. date: 2024-05-30-21-37-05
.. gh-issue: 89727
.. nonce: D6S9ig
.. section: Library
Fix issue with :func:`shutil.rmtree` where a :exc:`RecursionError` is raised
on deep directory trees.
..
.. date: 2024-05-29-21-50-05
.. gh-issue: 119577
.. nonce: S3BlKJ
.. section: Library
The :exc:`DeprecationWarning` emitted when testing the truth value of an
:class:`xml.etree.ElementTree.Element` now describes unconditionally
returning ``True`` in a future version rather than raising an exception in
Python 3.14.
..
.. date: 2024-05-29-20-42-17
.. gh-issue: 89727
.. nonce: 5lPTTW
.. section: Library
Partially fix issue with :func:`shutil.rmtree` where a :exc:`RecursionError`
is raised on deep directory trees. A recursion error is no longer raised
when :data:`!rmtree.avoids_symlink_attacks` is false.
..
.. date: 2024-05-29-12-42-40
.. gh-issue: 93963
.. nonce: cb1oJS
.. section: Library
Remove deprecated names from ``importlib.abc`` as found in
``importlib.resources.abc``.
..
.. date: 2024-05-28-12-15-03
.. gh-issue: 119118
.. nonce: FMKz1F
.. section: Library
Fix performance regression in the :mod:`tokenize` module by caching the
``line`` token attribute and calculating the column offset more efficiently.
..
.. date: 2024-05-28-00-56-59
.. gh-issue: 89727
.. nonce: _bxoL3
.. section: Library
Fix issue with :func:`os.fwalk` where a :exc:`RecursionError` was raised on
deep directory trees by adjusting the implementation to be iterative instead
of recursive.
..
.. date: 2024-05-26-22-22-51
.. gh-issue: 119594
.. nonce: fnQNM8
.. section: Library
If one calls pow(fractions.Fraction, x, module) with modulo not None, the
error message now says that the types are incompatible rather than saying
pow only takes 2 arguments. Patch by Wim Jeantine-Glenn and Mark Dickinson.
..
.. date: 2024-05-26-21-28-11
.. gh-issue: 119588
.. nonce: wlLBK5
.. section: Library
``zipfile.Path.is_symlink`` now assesses if the given path is a symlink.
..
.. date: 2024-05-25-20-20-42
.. gh-issue: 119562
.. nonce: DyplWc
.. section: Library
Remove :class:`!ast.Num`, :class:`!ast.Str`, :class:`!ast.Bytes`,
:class:`!ast.NameConstant` and :class:`!ast.Ellipsis`. They had all emitted
deprecation warnings since Python 3.12. Patch by Alex Waygood.
..
.. date: 2024-05-25-20-15-26
.. gh-issue: 119555
.. nonce: mvHbEL
.. section: Library
Catch :exc:`SyntaxError` from :func:`compile` in the runsource() method of
the InteractiveColoredConsole. Patch by Sergey B Kirpichev.
..
.. date: 2024-05-25-10-40-38
.. gh-issue: 118908
.. nonce: XcZiq4
.. section: Library
Limit exposed globals from internal imports and definitions on new REPL
startup. Patch by Eugene Triguba and Pablo Galindo.
..
.. date: 2024-05-25-07-25-07
.. gh-issue: 117865
.. nonce: 1A0Xpi
.. section: Library
Improve the import time of the :mod:`ast` module by deferring the import of
:mod:`re`. Patch by Jelle Zijlstra.
..
.. date: 2024-05-25-00-54-26
.. gh-issue: 119127
.. nonce: LpPvag
.. section: Library
Positional arguments of :func:`functools.partial` objects now support
placeholders via :data:`functools.Placeholder`.
..
.. date: 2024-05-24-21-54-55
.. gh-issue: 113892
.. nonce: JKDFqq
.. section: Library
Now, the method ``sock_connect`` of :class:`asyncio.ProactorEventLoop`
raises a :exc:`ValueError` if given socket is not in non-blocking mode, as
well as in other loop implementations.
..
.. date: 2024-05-24-14-32-24
.. gh-issue: 119506
.. nonce: -nMNqq
.. section: Library
Fix :meth:`!io.TextIOWrapper.write` method breaks internal buffer when the
method is called again during flushing internal buffer.
..
.. date: 2024-05-24-11-47-08
.. gh-issue: 69214
.. nonce: Grl6zF
.. section: Library
Fix ``fcntl.ioctl()`` *request* parameter: use an ``unsigned long`` instead
of an ``unsigned int`` for the *request* parameter of :func:`fcntl.ioctl` to
support requests larger than ``UINT_MAX``. Patch by Victor Stinner.
..
.. date: 2024-05-24-04-05-37
.. gh-issue: 119105
.. nonce: aDSRFn
.. section: Library
``difflib``'s ``DIffer.compare()`` (and so also ``ndiff``) can no longer be
provoked into cubic-time behavior, or into unbounded recursion, and should
generally be faster in ordinary cases too. Results may change in some cases,
although that should be rare. Correctness of diffs is not affected. Some
similar lines far apart may be reported as deleting one and adding the
other, where before they were displayed on adjacent output lines with markup
showing the intraline differences.
..
.. date: 2024-05-23-22-29-59
.. gh-issue: 119443
.. nonce: KAGz6S
.. section: Library
The interactive REPL no longer runs with ``from __future__ import
annotations`` enabled. Patch by Jelle Zijlstra.
..
.. date: 2024-05-23-15-48-17
.. gh-issue: 119461
.. nonce: 82KqUW
.. section: Library
Add ``socket.VMADDR_CID_LOCAL`` constant. Patch by Victor Stinner.
..
.. date: 2024-05-23-11-52-36
.. gh-issue: 117398
.. nonce: 2FG1Mk
.. section: Library
Objects in the datetime C-API are now all statically allocated, which means
better memory safety, especially when the module is reloaded. This should be
transparent to users.
..
.. date: 2024-05-22-21-20-43
.. gh-issue: 118894
.. nonce: xHdxR_
.. section: Library
:mod:`asyncio` REPL now has the same capabilities as PyREPL.
..
.. date: 2024-05-21-23-39-22
.. gh-issue: 118830
.. nonce: YTqvEo
.. section: Library
Bump :mod:`pickle` default protocol to ``5``.
..
.. date: 2024-05-21-20-13-23
.. gh-issue: 118911
.. nonce: iG8nMq
.. section: Library
In PyREPL, updated ``maybe-accept``'s logic so that if the user hits
:kbd:`Enter` twice, they are able to terminate the block even if there's
trailing whitespace. Also, now when the user hits arrow up, the cursor is on
the last functional line. This matches IPython's behavior. Patch by Aya
Elsayed.
..
.. date: 2024-05-21-19-10-30
.. gh-issue: 115225
.. nonce: eRmfJH
.. section: Library
Raise error on certain technically valid but pathological ISO 8601 strings
passed to :meth:`datetime.time.fromisoformat` that were previously parsed
incorrectly.
..
.. date: 2024-05-20-20-30-57
.. gh-issue: 111201
.. nonce: DAA5lC
.. section: Library
Remove dependency to :mod:`readline` from the new Python REPL.
..
.. date: 2024-05-20-13-48-37
.. gh-issue: 119189
.. nonce: dhJVs5
.. section: Library
When using the ``**`` operator or :func:`pow` with
:class:`~fractions.Fraction` as the base and an exponent that is not
rational, a float, or a complex, the fraction is no longer converted to a
float.
..
.. date: 2024-05-19-18-49-04
.. gh-issue: 119174
.. nonce: 5GTv7d
.. section: Library
Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry
Patch by Wulian233 and Terry Jan Reedy
..
.. date: 2024-05-19-13-05-59
.. gh-issue: 119121
.. nonce: P1gnh1
.. section: Library
Fix a NameError happening in ``asyncio.staggered.staggered_race``. This
function is now tested.
..
.. date: 2024-05-19-12-25-36
.. gh-issue: 119105
.. nonce: VcR4ig
.. section: Library
``difflib.Differ`` is much faster for some cases of diffs where many pairs
of lines are equally similar.
..
.. date: 2024-05-17-17-32-12
.. gh-issue: 119113
.. nonce: kEv1Ll
.. section: Library
Fix issue where :meth:`pathlib.PurePath.with_suffix` didn't raise
:exc:`TypeError` when given ``None`` as a suffix.
..
.. date: 2024-05-16-17-31-46
.. gh-issue: 118643
.. nonce: hAWH4C
.. section: Library
Fix an AttributeError in the :mod:`email` module when re-fold a long address
list. Also fix more cases of incorrect encoding of the address separator in
the address list.
..
.. date: 2024-05-15-01-36-08
.. gh-issue: 73991
.. nonce: CGknDf
.. section: Library
Add :meth:`pathlib.Path.copy`, which copies a file or directory to another.
..
.. date: 2024-05-12-21-38-42
.. gh-issue: 58933
.. nonce: 0kgU2l
.. section: Library
Make :mod:`pdb` return to caller frame correctly when ``f_trace`` of the
caller frame is not set
..
.. date: 2024-05-11-20-23-45
.. gh-issue: 82805
.. nonce: F9bz4J
.. section: Library
Support single-dot file extensions in :attr:`pathlib.PurePath.suffix` and
related attributes and methods. For example, the
:attr:`~pathlib.PurePath.suffixes` of ``PurePath('foo.bar.')`` are now
``['.bar', '.']`` rather than ``[]``. This brings file extension splitting
in line with :func:`os.path.splitext`.
..
.. date: 2024-05-10-22-59-01
.. gh-issue: 118924
.. nonce: 9nyvSH
.. section: Library
Remove :data:`!version` and :data:`!version_info` from :mod:`sqlite3`. Patch
by Hugo van Kemenade.
..
.. date: 2024-05-10-22-36-01
.. gh-issue: 118928
.. nonce: IW7Ukv
.. section: Library
Disallow using a sequence of parameters with named placeholders in
:mod:`sqlite3` queries. Patch by Erlend E. Aasland.
..
.. date: 2024-05-10-05-24-32
.. gh-issue: 118895
.. nonce: wUm5r2
.. section: Library
Setting attributes on :data:`typing.NoDefault` now raises
:exc:`AttributeError` instead of :exc:`TypeError`.
..
.. date: 2024-05-09-21-36-11
.. gh-issue: 118868
.. nonce: uckxxP
.. section: Library
Fixed issue where kwargs were no longer passed to the logging handler
QueueHandler
..
.. date: 2024-05-09-12-33-25
.. gh-issue: 118827
.. nonce: JrzHz1
.. section: Library
Remove deprecated :class:`!Quoter` class from :mod:`urllib.parse`. It had
previously raised a :exc:`DeprecationWarning` since Python 3.11. Patch by
Nikita Sobolev.
..
.. date: 2024-05-09-11-50-26
.. gh-issue: 118824
.. nonce: -jBJQC
.. section: Library
Remove deprecated :func:`!pty.master_open` and :func:`!pty.slave_open`. Use
:func:`pty.openpty` instead. Patch by Nikita Sobolev.
..
.. date: 2024-05-09-08-46-12
.. gh-issue: 118851
.. nonce: aPAoJw
.. section: Library
``ctx`` arguments to the constructors of :mod:`ast` node classes now default
to :class:`ast.Load() <ast.Load>`. Patch by Jelle Zijlstra.
..
.. date: 2024-05-09-02-43-37
.. gh-issue: 101588
.. nonce: 30bNAr
.. section: Library
Remove copy, deepcopy, and pickle from itertools. These had previously
raised a DeprecationWarning since Python 3.12.
..
.. date: 2024-05-09-01-05-52
.. gh-issue: 118805
.. nonce: N7dm07
.. section: Library
Remove *type*, *choices*, and *metavar* parameters of
:class:`!argparse.BooleanOptionalAction`. They were deprecated since Python
3.12.
..
.. date: 2024-05-09-00-52-30
.. gh-issue: 118803
.. nonce: Wv3AvU
.. section: Library
:class:`!typing.ByteString` and :class:`!collections.abc.ByteString` are
removed. They had previously raised a :exc:`DeprecationWarning` since Python
3.12.
..
.. date: 2024-05-08-23-16-50
.. gh-issue: 118798
.. nonce: Q_ybqP
.. section: Library
The *isdst* parameter has been removed from :func:`email.utils.localtime`.
Patch by Hugo van Kemenade.
..
.. date: 2024-05-08-21-30-33
.. gh-issue: 118760
.. nonce: XvyMHn
.. section: Library
Restore the default value of ``tkiter.wantobjects`` to ``1``.
..
.. date: 2024-05-08-21-13-56
.. gh-issue: 118760
.. nonce: mdmH3T
.. section: Library
Fix errors in calling Tkinter bindings on Windows.
..
.. date: 2024-05-08-20-41-48
.. gh-issue: 74033
.. nonce: YebHZj
.. section: Library
Drop support for passing keyword arguments to :class:`pathlib.Path`.
..
.. date: 2024-05-08-19-47-34
.. gh-issue: 101357
.. nonce: e4R_9x
.. section: Library
Suppress all :exc:`OSError` exceptions from :meth:`pathlib.Path.exists` and
``is_*()`` methods, rather than a selection of more common errors. The new
behaviour is consistent with :func:`os.path.exists`, :func:`os.path.isdir`,
etc. Use :meth:`pathlib.Path.stat` to retrieve the file status without
suppressing exceptions.
..
.. date: 2024-05-08-18-59-19
.. gh-issue: 78707
.. nonce: _Lz1sw
.. section: Library
Drop support for passing additional positional arguments to
:meth:`pathlib.PurePath.relative_to` and
:meth:`~pathlib.PurePath.is_relative_to`.
..
.. date: 2024-05-08-18-33-07
.. gh-issue: 118507
.. nonce: OCQsAY
.. section: Library
Fix :func:`os.path.isfile` on Windows for pipes. Speedup
:func:`os.path.isjunction` and :func:`os.path.lexists` on Windows with a
native implementation.
..
.. date: 2024-05-08-09-21-49
.. gh-issue: 118772
.. nonce: c16E8X
.. section: Library
Allow :class:`typing.TypeVar` instances without a default to follow
instances without a default in some cases. Patch by Jelle Zijlstra.
..
.. date: 2024-05-07-17-38-53
.. gh-issue: 118714
.. nonce: XXKpVZ
.. section: Library
Allow ``restart`` in post-mortem debugging of :mod:`pdb`. Removed restart
message when the user quits pdb from post-mortem mode.
..
.. date: 2024-05-06-17-39-52
.. gh-issue: 118673
.. nonce: sTXBit
.. section: Library
Removed executable bits and shebang from stdlib modules.
..
.. date: 2024-05-01-22-24-05
.. gh-issue: 110863
.. nonce: GjYBbq
.. section: Library
:func:`os.path.realpath` now suppresses any :exc:`OSError` from
:func:`os.readlink` when *strict* mode is disabled (the default).
..
.. date: 2024-04-28-19-51-00
.. gh-issue: 118263
.. nonce: Gaap3S
.. section: Library
Speed up :func:`os.path.splitroot` & :func:`os.path.normpath` with a direct
C call.
..
.. date: 2024-04-24-16-23-04
.. gh-issue: 110190
.. nonce: TGd5qx
.. section: Library
Fix ctypes structs with array on SPARC by setting ``MAX_STRUCT_SIZE`` to 32
in stgdict. Patch by Jakub Kulik
..
.. date: 2024-04-19-14-59-53
.. gh-issue: 118033
.. nonce: amS4Gw
.. section: Library
Fix :func:`dataclasses.dataclass` not creating a ``__weakref__`` slot when
subclassing :class:`typing.Generic`.
..
.. date: 2024-04-19-05-58-50
.. gh-issue: 117766
.. nonce: J3xepp
.. section: Library
Always use :func:`str` to print ``choices`` in :mod:`argparse`.
..
.. date: 2024-03-19-21-41-31
.. gh-issue: 106531
.. nonce: Mgd--6
.. section: Library
In :mod:`importlib.resources`, sync with `importlib_resources 6.3.2
<https://importlib-resources.readthedocs.io/en/latest/history.html#v6-3-2>`_,
including: ``MultiplexedPath`` now expects ``Traversable`` paths,
deprecating string arguments to ``MultiplexedPath``; Enabled support for
resources in namespace packages in zip files; Fixed ``NotADirectoryError``
when calling files on a subdirectory of a namespace package.
..
.. date: 2024-02-27-10-22-15
.. gh-issue: 115937
.. nonce: 0cVNur
.. section: Library
Removed extra preprocessing for the ``__signature__`` attribute: the code
just check if it's a :class:`inspect.Signature` instance. Patch by Sergey B
Kirpichev.
..
.. date: 2024-02-22-10-12-59
.. gh-issue: 115808
.. nonce: F2g2Ku
.. section: Library
Add :func:`operator.is_none` and :func:`operator.is_not_none` functions.
..
.. date: 2024-01-18-21-44-23
.. gh-issue: 114264
.. nonce: DBKn29
.. section: Library
Improve performance of :func:`copy.deepcopy` by adding a fast path for
atomic types.
..
.. date: 2024-01-14-11-43-31
.. gh-issue: 113878
.. nonce: dmEIN3
.. section: Library
Add *doc* parameter to :func:`dataclasses.field`, so it can be stored and
shown as a documentation / metadata. If ``@dataclass(slots=True)`` is used,
then the supplied string is availabl in the :attr:`~object.__slots__` dict.
Otherwise, the supplied string is only available in the corresponding
:class:`dataclasses.Field` object.
In order to support this feature we are changing the ``__slots__`` format in
dataclasses from :class:`tuple` to :class:`dict` when documentation /
metadata is present.
..
.. date: 2024-01-12-08-51-03
.. gh-issue: 113978
.. nonce: MqTgB0
.. section: Library
Ignore warnings on text completion inside REPL.
..
.. date: 2023-12-14-13-43-27
.. gh-issue: 113008
.. nonce: jWYn8T
.. section: Library
Correct argparse usage output for required, mutually exclusive groups
containing a positional argument
..
.. date: 2023-12-12-15-19-58
.. gh-issue: 108172
.. nonce: KyDPuG
.. section: Library
``webbrowser`` honors OS preferred browser on Linux when its desktop entry
name contains the text of a known browser name.
..
.. date: 2023-09-19-17-56-24
.. gh-issue: 109109
.. nonce: WJvvX2
.. section: Library
You can now get the raw TLS certificate chains from TLS connections via
:meth:`ssl.SSLSocket.get_verified_chain` and
:meth:`ssl.SSLSocket.get_unverified_chain` methods.
Contributed by Mateusz Nowak.
..
.. date: 2023-06-17-09-07-06
.. gh-issue: 105623
.. nonce: 5G06od
.. section: Library
Fix performance degradation in
:class:`logging.handlers.RotatingFileHandler`. Patch by Craig Robson.
..
.. date: 2023-06-16-14-52-00
.. gh-issue: 102450
.. nonce: MfeR6A
.. section: Library
Add missing ISO-8601 24:00 alternative to midnight of next day to
:meth:`datetime.datetime.fromisoformat` and
:meth:`datetime.time.fromisoformat`. Patch by Izan "TizzySaurus" Robinson
(tizzysaurus@gmail.com)
..
.. date: 2023-04-28-09-54-15
.. gh-issue: 103956
.. nonce: EyLDPS
.. section: Library
Fix lack of newline characters in :mod:`trace` module output when line
tracing is enabled but source code line for current frame is not available.
..
.. date: 2023-04-26-22-24-17
.. gh-issue: 92081
.. nonce: V8xMot
.. section: Library
Fix missing spaces in email headers when the spaces are mixed with encoded
8-bit characters.
..
.. date: 2023-04-24-05-34-23
.. gh-issue: 103194
.. nonce: GwBwWL
.. section: Library
Prepare Tkinter for C API changes in Tcl 8.7/9.0 to avoid
:class:`!_tkinter.Tcl_Obj` being unexpectedly returned instead of
:class:`bool`, :class:`str`, :class:`bytearray`, or :class:`int`.
..
.. date: 2023-04-10-00-04-37
.. gh-issue: 87106
.. nonce: UyBnPQ
.. section: Library
Fixed handling in :meth:`inspect.Signature.bind` of keyword arguments having
the same name as positional-only arguments when a variadic keyword argument
(e.g. ``**kwargs``) is present.
..
.. date: 2023-03-30-18-19-53
.. gh-issue: 103134
.. nonce: bHrn91
.. section: Library
Add additional methods to :ref:`proxy objects
<multiprocessing-proxy_objects>` in the :mod:`!multiprocessing` module:
* :meth:`!clear` and :meth:`!copy` for proxies of :class:`list`
* :meth:`~dict.fromkeys`, ``reversed(d)``, ``d | {}``, ``{} | d``,
``d |= {'b': 2}`` for proxies of :class:`dict`
..
.. bpo: 45767
.. date: 2022-03-10-16-47-57
.. nonce: ywmyo1
.. section: Library
Fix integer conversion in :func:`os.major`, :func:`os.minor`, and
:func:`os.makedev`. Support device numbers larger than ``2**63-1``. Support
non-existent device number (``NODEV``).
..
.. bpo: 44864
.. date: 2021-08-24-19-37-46
.. nonce: KzxaDh
.. section: Library
Do not translate user-provided strings in :class:`argparse.ArgumentParser`.
..
.. bpo: 41843
.. date: 2020-12-22-18-08-12
.. nonce: q9Nh2r
.. section: Library
Solaris now uses :func:`os.sendfile` fast-copy syscall for more efficient
:mod:`shutil` file copy related functions.
..
.. bpo: 15987
.. date: 2020-03-28-21-00-54
.. nonce: aBL8XS
.. section: Library
Implemented :func:`ast.compare` for comparing two ASTs. Patch by Batuhan
Taskaya with some help from Jeremy Hylton.
..
.. date: 2019-08-27-01-16-50
.. gh-issue: 67693
.. nonce: 4NIAiy
.. section: Library
Fix :func:`urllib.parse.urlunparse` and :func:`urllib.parse.urlunsplit` for
URIs with path starting with multiple slashes and no authority. Based on
patch by Ashwin Ramaswami.
..
.. bpo: 14074
.. date: 2018-12-04-07-36-27
.. nonce: fMLKCu
.. section: Library
Fix :mod:`argparse` metavar processing to allow positional arguments to have
a tuple metavar.
..
.. date: 2024-10-04-15-34-34
.. gh-issue: 122392
.. nonce: V8K3w2
.. section: IDLE
Increase currently inadequate vertical spacing for the IDLE browsers (path,
module, and stack) on high-resolution monitors.
..
.. date: 2024-09-21-23-12-18
.. gh-issue: 112938
.. nonce: OeiDru
.. section: IDLE
Fix uninteruptable hang when Shell gets rapid continuous output.
..
.. date: 2024-07-30-18-02-55
.. gh-issue: 122482
.. nonce: TerE0g
.. section: IDLE
Change About IDLE to direct users to discuss.python.org instead of the now
unused idle-dev email and mailing list.
..
.. date: 2024-07-16-16-57-03
.. gh-issue: 78889
.. nonce: U7ghFD
.. section: IDLE
Stop Shell freezes by blocking user access to non-method sys.stdout.shell
attributes, which are all private.
..
.. date: 2024-06-16-21-42-45
.. gh-issue: 120083
.. nonce: nczuyv
.. section: IDLE
Add explicit black IDLE Hovertip foreground color needed for recent macOS.
Fixes Sonoma showing unreadable white on pale yellow. Patch by John
Riggles.
..
.. date: 2024-06-05-14-54-24
.. gh-issue: 120104
.. nonce: j_thj4
.. section: IDLE
Fix padding in config and search dialog windows in IDLE.
..
.. date: 2024-10-10-02-56-24
.. gh-issue: 124872
.. nonce: 0mDDOq
.. section: Documentation
Added definitions for :term:`context`, :term:`current context`, and
:term:`context management protocol`, updated related definitions to be
consistent, and expanded the documentation for :class:`contextvars.Context`.
..
.. date: 2024-10-07-00-31-17
.. gh-issue: 125018
.. nonce: yKnymn
.. section: Documentation
The :mod:`importlib.metadata` documentation now includes semantic
cross-reference targets for the significant documented APIs. This means
intersphinx references like :func:`importlib.metadata.version` will now work
as expected.
..
.. date: 2024-09-27-16-47-48
.. gh-issue: 124720
.. nonce: nVSTVb
.. section: Documentation
Update "Using Python on a Mac" section of the "Python Setup and Usage"
document and include information on installing free-threading support.
..
.. date: 2024-09-24-11-52-36
.. gh-issue: 124457
.. nonce: yrCjSV
.. section: Documentation
Remove coverity scan from the CPython repo. It has not been used since 2020
and is currently unmaintained.
..
.. date: 2024-09-19-19-33-25
.. gh-issue: 116622
.. nonce: M65UZ6
.. section: Documentation
Add an Android platform guide, and flag modules not available on Android.
..
.. date: 2024-09-11-16-52-08
.. gh-issue: 123976
.. nonce: jhOfNR
.. section: Documentation
Refresh docs around custom providers.
..
.. date: 2024-08-01-17-18-21
.. gh-issue: 70870
.. nonce: fZnBM9
.. section: Documentation
Clarified the dual usage of the term "free variable" (both the formal
meaning of any reference to names defined outside the local scope, and the
narrower pragmatic meaning of nonlocal variables named in ``co_freevars``).
..
.. date: 2024-07-19-12-22-48
.. gh-issue: 121277
.. nonce: wF_zKd
.. section: Documentation
Writers of CPython's documentation can now use ``next`` as the version for
the ``versionchanged``, ``versionadded``, ``deprecated`` directives.
..
.. date: 2024-07-14-12-25-53
.. gh-issue: 117765
.. nonce: YFMOUv
.. section: Documentation
Improved documentation for :func:`unittest.mock.patch.dict`
..
.. date: 2024-07-14-11-48-10
.. gh-issue: 121749
.. nonce: nxHoTk
.. section: Documentation
Fix documentation for :c:func:`PyModule_AddObjectRef`.
..
.. date: 2024-06-05-12-36-18
.. gh-issue: 120012
.. nonce: f14DbQ
.. section: Documentation
Clarify the behaviours of :meth:`multiprocessing.Queue.empty` and
:meth:`multiprocessing.SimpleQueue.empty` on closed queues. Patch by
Bénédikt Tran.
..
.. date: 2024-06-03-22-06-26
.. gh-issue: 119574
.. nonce: Ik9kOO
.. section: Documentation
Added some missing environment variables to the output of
:option:`--help-env`.
..
.. bpo: 34008
.. date: 2018-07-04-20-35-25
.. nonce: bqecIb
.. section: Documentation
The :c:func:`Py_Main` documentation moved from the "Very High Level API"
section to the "Initialization and Finalization" section.
Also make it explicit that we expect ``Py_Main`` to typically be called
instead of ``Py_Initialize`` rather than after it (since ``Py_Main`` makes
its own call to ``Py_Initialize``). Document that calling both is supported
but is version dependent on which settings will be applied correctly.
..
.. date: 2024-10-15-15-29-41
.. gh-issue: 124375
.. nonce: wNrWVa
.. section: Core and Builtins
Fix a crash in the free threading build when the GC runs concurrently with a
new thread starting.
..
.. date: 2024-10-10-14-47-13
.. gh-issue: 125221
.. nonce: nfSQzT
.. section: Core and Builtins
Fix possible race condition when calling :meth:`~object.__reduce_ex__` for
the first time in the free threading build.
..
.. date: 2024-10-10-12-04-56
.. gh-issue: 125174
.. nonce: _8h6T7
.. section: Core and Builtins
Make the handling of reference counts of immortal objects more robust.
Immortal objects with reference counts that deviate from their original
reference count by up to a billion (half a billion on 32 bit builds) are
still counted as immortal.
..
.. date: 2024-10-07-23-33-18
.. gh-issue: 125039
.. nonce: MKTyNI
.. section: Core and Builtins
Make ``this_instr`` and ``prev_instr`` const in cases generator.
..
.. date: 2024-10-05-23-53-06
.. gh-issue: 125008
.. nonce: ETANpd
.. section: Core and Builtins
Fix :func:`tokenize.untokenize` producing invalid syntax for double braces
preceded by certain escape characters.
..
.. date: 2024-10-03-22-26-39
.. gh-issue: 124871
.. nonce: tAMF47
.. section: Core and Builtins
Fix compiler bug (in some versions of 3.13) where an assertion fails during
reachability analysis.
..
.. date: 2024-10-03-14-39-41
.. gh-issue: 123378
.. nonce: dCxANf
.. section: Core and Builtins
Fix a crash in the :meth:`~object.__str__` method of :exc:`UnicodeError`
objects when the :attr:`UnicodeError.start` and :attr:`UnicodeError.end`
values are invalid or out-of-range. Patch by Bénédikt Tran.
..
.. date: 2024-09-30-16-39-37
.. gh-issue: 118093
.. nonce: J2A3gz
.. section: Core and Builtins
Improve the experimental JIT compiler's ability to stay "on trace" when
encountering highly-biased branches.
..
.. date: 2024-09-27-17-18-53
.. gh-issue: 124642
.. nonce: OCjhBJ
.. section: Core and Builtins
Fixed scalability issue in free-threaded builds for lock-free reads from
dictionaries in multi-threaded scenarios
..
.. date: 2024-09-26-18-21-06
.. gh-issue: 116510
.. nonce: FacUWO
.. section: Core and Builtins
Fix a crash caused by immortal interned strings being shared between
sub-interpreters that use basic single-phase init. In that case, the string
can be used by an interpreter that outlives the interpreter that created and
interned it. For interpreters that share obmalloc state, also share the
interned dict with the main interpreter.
..
.. date: 2024-09-26-17-55-34
.. gh-issue: 116510
.. nonce: dhn8w8
.. section: Core and Builtins
Fix a bug that can cause a crash when sub-interpreters use "basic"
single-phase extension modules. Shared objects could refer to PyGC_Head
nodes that had been freed as part of interpreter cleanup.
..
.. date: 2024-09-26-13-25-01
.. gh-issue: 119180
.. nonce: k_JCX0
.. section: Core and Builtins
The ``__main__`` module no longer always contains an ``__annotations__``
dictionary in its global namespace.
..
.. date: 2024-09-26-12-19-13
.. gh-issue: 124547
.. nonce: P_SHfU
.. section: Core and Builtins
When deallocating an object with inline values whose ``__dict__`` is still
live: if memory allocation for the inline values fails, clear the
dictionary. Prevents an interpreter crash.
..
.. date: 2024-09-25-14-45-56
.. gh-issue: 124513
.. nonce: ywiXtr
.. section: Core and Builtins
Fix a crash in FrameLocalsProxy constructor: check the number of arguments.
Patch by Victor Stinner.
..
.. date: 2024-09-25-11-53-22
.. gh-issue: 124442
.. nonce: EXC1Ve
.. section: Core and Builtins
Fix nondeterminism in compilation by sorting the value of
:attr:`~type.__static_attributes__`. Patch by kp2pml30.
..
.. date: 2024-09-23-23-06-19
.. gh-issue: 124285
.. nonce: mahGTg
.. section: Core and Builtins
Fix bug where ``bool(a)`` can be invoked more than once during the
evaluation of a compound boolean expression.
..
.. date: 2024-09-23-15-23-14
.. gh-issue: 123856
.. nonce: yrgJ9m
.. section: Core and Builtins
Fix PyREPL failure when a keyboard interrupt is triggered after using a
history search
..
.. date: 2024-09-23-13-25-27
.. gh-issue: 65961
.. nonce: LDqXV2
.. section: Core and Builtins
Deprecate the setting and using ``__package__`` and ``__cached__``.
..
.. date: 2024-09-19-16-57-34
.. gh-issue: 119726
.. nonce: DseseK
.. section: Core and Builtins
The JIT now generates more efficient code for calls to C functions resulting
in up to 0.8% memory savings and 1.5% speed improvement on AArch64. Patch by
Diego Russo.
..
.. date: 2024-09-19-13-17-31
.. gh-issue: 122878
.. nonce: 4iFpsB
.. section: Core and Builtins
Use the ``pager`` binary, if available (e.g. on Debian and derivatives), to
display REPL ``help()``.
..
.. date: 2024-09-17-22-06-01
.. gh-issue: 124188
.. nonce: aFqNAB
.. section: Core and Builtins
Fix reading and decoding a line from the source file witn non-UTF-8 encoding
for syntax errors raised in the compiler.
..
.. date: 2024-09-13-02-25-06
.. gh-issue: 124027
.. nonce: to_9DY
.. section: Core and Builtins
Support ``<page up>``, ``<page down>``, and ``<delete>`` keys in the Python
REPL when ``$TERM`` is set to ``vt100``.
..
.. date: 2024-09-12-21-53-26
.. gh-issue: 124022
.. nonce: fQzUiW
.. section: Core and Builtins
Fix bug where docstring is removed from classes in interactive mode.
..
.. date: 2024-09-11-15-48-36
.. gh-issue: 123958
.. nonce: 5VW2r0
.. section: Core and Builtins
docstrings are now removed from the optimized AST in optimization level 2.
..
.. date: 2024-09-10-20-25-00
.. gh-issue: 123923
.. nonce: A7uxqa
.. section: Core and Builtins
The ``f_executable`` field in the internal :c:struct:`_PyInterpreterFrame`
struct now uses a tagged pointer. Profilers and debuggers that uses this
field should clear the least significant bit to recover the
:c:expr:`PyObject*` pointer.
..
.. date: 2024-09-10-13-27-16
.. gh-issue: 77894
.. nonce: ZC-Olu
.. section: Core and Builtins
Fix possible crash in the garbage collector when it tries to break a
reference loop containing a :class:`memoryview` object. Now a
:class:`!memoryview` object can only be cleared if there are no buffers that
refer it.
..
.. date: 2024-09-06-19-23-44
.. gh-issue: 120221
.. nonce: giJEDT
.. section: Core and Builtins
asyncio REPL is now again properly recognizing KeyboardInterrupts. Display
of exceptions raised in secondary threads is fixed.
..
.. date: 2024-09-06-14-13-01
.. gh-issue: 119310
.. nonce: WQxyDF
.. section: Core and Builtins
Allow the new interactive shell to read history files written with the
editline library that use unicode-escaped entries. Patch by aorcajo and
Łukasz Langa.
..
.. date: 2024-09-03-13-34-35
.. gh-issue: 123572
.. nonce: uuqoYV
.. section: Core and Builtins
Fix key mappings for various F-keys in Windows for the new REPL. Patch by
devdanzin
..
.. date: 2024-09-02-20-39-10
.. gh-issue: 123614
.. nonce: 26TMHp
.. section: Core and Builtins
Add :func:`turtle.save` to easily save Turtle drawings as PostScript files.
Patch by Marie Roald and Yngve Mardal Moe.
..
.. date: 2024-09-02-20-36-45
.. gh-issue: 123339
.. nonce: QcmpSs
.. section: Core and Builtins
Setting the :attr:`!__module__` attribute for a class now removes the
``__firstlineno__`` item from the type's dict, so they will no longer be
inconsistent.
..
.. date: 2024-09-02-17-32-15
.. gh-issue: 119034
.. nonce: HYh5Vj
.. section: Core and Builtins
Change ``<page up>`` and ``<page down>`` keys of the Python REPL to history
search forward/backward. Patch by Victor Stinner.
..
.. date: 2024-09-01-12-08-39
.. gh-issue: 123562
.. nonce: aJPKVu
.. section: Core and Builtins
Improve :exc:`SyntaxError` message for using ``case ... as ...`` with not a
name.
..
.. date: 2024-09-01-00-02-05
.. gh-issue: 123545
.. nonce: 8nQNbL
.. section: Core and Builtins
Fix a double decref in rare cases on experimental JIT builds.
..
.. date: 2024-08-29-19-46-07
.. gh-issue: 123484
.. nonce: rjUn_F
.. section: Core and Builtins
Fix ``_Py_DebugOffsets`` for long objects to be relative to the start of the
object rather than the start of a subobject.
..
.. date: 2024-08-29-13-18-18
.. gh-issue: 123446
.. nonce: KWDrgq
.. section: Core and Builtins
Fix empty function name in :exc:`TypeError` when builtin magic methods are
used without the required args.
..
.. date: 2024-08-28-22-42-51
.. gh-issue: 123440
.. nonce: yOFB0N
.. section: Core and Builtins
Improve :exc:`SyntaxError` message for using ``except as`` with not a name.
..
.. date: 2024-08-27-21-44-14
.. gh-issue: 116017
.. nonce: ZY3yBY
.. section: Core and Builtins
Improved JIT memory consumption by periodically freeing memory used by
infrequently-executed code. This change is especially likely to improve the
memory footprint of long-running programs.
..
.. date: 2024-08-27-13-16-40
.. gh-issue: 123344
.. nonce: 56Or78
.. section: Core and Builtins
Add AST optimizations for type parameter defaults.
..
.. date: 2024-08-26-00-58-26
.. gh-issue: 123321
.. nonce: ApxcnE
.. section: Core and Builtins
Prevent Parser/myreadline race condition from segfaulting on multi-threaded
use. Patch by Bar Harel and Amit Wienner.
..
.. date: 2024-08-25-18-27-49
.. gh-issue: 123177
.. nonce: yLuyqE
.. section: Core and Builtins
Fix a bug causing stray prompts to appear in the middle of wrapped lines in
the new REPL.
..
.. date: 2024-08-25-10-54-22
.. gh-issue: 122982
.. nonce: KLD91q
.. section: Core and Builtins
Extend the deprecation period for bool inversion (``~``) by two years.
..
.. date: 2024-08-23-21-20-34
.. gh-issue: 123271
.. nonce: xeVViR
.. section: Core and Builtins
Make concurrent iterations over the same :func:`zip` iterator safe under
free-threading.
..
.. date: 2024-08-23-18-31-10
.. gh-issue: 123275
.. nonce: DprIrj
.. section: Core and Builtins
Support :option:`-X gil=1 <-X>` and :envvar:`PYTHON_GIL=1 <PYTHON_GIL>` on
non-free-threaded builds.
..
.. date: 2024-08-23-15-59-54
.. gh-issue: 123177
.. nonce: OLcaC5
.. section: Core and Builtins
Deactivate line wrap in the Apple Terminal via a ANSI escape code. Patch by
Pablo Galindo
..
.. date: 2024-08-23-13-08-27
.. gh-issue: 123229
.. nonce: aHm-dw
.. section: Core and Builtins
Fix valgrind warning by initializing the f-string buffers to 0 in the
tokenizer. Patch by Pablo Galindo
..
.. date: 2024-08-23-11-26-54
.. gh-issue: 122298
.. nonce: ZMyln4
.. section: Core and Builtins
Restore printout of GC stats when ``gc.set_debug(gc.DEBUG_STATS)`` is
called. This feature was accidentally removed when implementing incremental
GC.
..
.. date: 2024-08-21-15-22-53
.. gh-issue: 121804
.. nonce: r5K3PS
.. section: Core and Builtins
Correctly show error locations when a :exc:`SyntaxError` is raised in the
basic REPL. Patch by Sergey B Kirpichev.
..
.. date: 2024-08-21-08-53-00
.. gh-issue: 115776
.. nonce: 9A7Dv_
.. section: Core and Builtins
Enables inline values (Python's equivalent of hidden classes) on any class
who's instances are of a fixed size.
..
.. date: 2024-08-20-12-29-52
.. gh-issue: 123142
.. nonce: 3PXiNb
.. section: Core and Builtins
Fix too-wide source location in exception tracebacks coming from broken
iterables in comprehensions.
..
.. date: 2024-08-20-11-09-16
.. gh-issue: 123048
.. nonce: 2TISpv
.. section: Core and Builtins
Fix a bug where pattern matching code could emit a :opcode:`JUMP_FORWARD`
with no source location.
..
.. date: 2024-08-19-15-13-13
.. gh-issue: 118093
.. nonce: dLZ8qS
.. section: Core and Builtins
Break up ``CALL_ALLOC_AND_ENTER_INIT`` into micro-ops and relax requirement
for exact args, in order to increase the amount of code supported by tier 2.
..
.. date: 2024-08-18-18-25-54
.. gh-issue: 123123
.. nonce: 0ZcaEB
.. section: Core and Builtins
Fix displaying :exc:`SyntaxError` exceptions covering multiple lines. Patch
by Pablo Galindo
..
.. date: 2024-08-17-17-26-25
.. gh-issue: 123083
.. nonce: 9xWLJ-
.. section: Core and Builtins
Fix a potential use-after-free in ``STORE_ATTR_WITH_HINT``.
..
.. date: 2024-08-15-19-28-43
.. gh-issue: 123022
.. nonce: m3EF9E
.. section: Core and Builtins
Fix crash in free-threaded build when calling :c:func:`Py_Initialize` from a
non-main thread.
..
.. date: 2024-08-14-11-38-56
.. gh-issue: 118093
.. nonce: 3BywDP
.. section: Core and Builtins
Add three specializations for :opcode:`CALL_KW`:
* :opcode:`!CALL_KW_PY` for calls to Python functions
* :opcode:`!CALL_KW_BOUND_METHOD` for calls to bound methods
* :opcode:`!CALL_KW_NON_PY` for all other calls
..
.. date: 2024-08-12-11-45-47
.. gh-issue: 122821
.. nonce: WnAzTK
.. section: Core and Builtins
Make sure that branches in :keyword:`while` statements have consistent
offsets for :mod:`sys.monitoring`. :keyword:`!while` statements are now
compiled with a simple jump at the end of the body, instead of duplicating
the test.
..
.. date: 2024-08-12-11-19-37
.. gh-issue: 122907
.. nonce: q68096
.. section: Core and Builtins
Building with ``HAVE_DYNAMIC_LOADING`` now works as well as it did in 3.12.
Existing deficiences will be addressed separately. (See
https://github.com/python/cpython/issues/122950.)
..
.. date: 2024-08-10-12-44-03
.. gh-issue: 122888
.. nonce: TUyu9r
.. section: Core and Builtins
Fix crash on certain calls to ``str()`` with positional arguments of the
wrong type. Patch by Jelle Zijlstra.
..
.. date: 2024-08-08-16-02-28
.. gh-issue: 118093
.. nonce: m6Mrvy
.. section: Core and Builtins
Improve the experimental JIT's handling of polymorphic code.
..
.. date: 2024-08-05-19-28-12
.. gh-issue: 122697
.. nonce: 17MvYl
.. section: Core and Builtins
Fixed memory leaks at interpreter shutdown in the free-threaded build, and
also reporting of leaked memory blocks via :option:`-X showrefcount <-X>`.
..
.. date: 2024-08-05-19-04-06
.. gh-issue: 116622
.. nonce: 3LWUzE
.. section: Core and Builtins
Fix Android stdout and stderr messages being truncated or lost.
..
.. date: 2024-08-01-19-13-58
.. gh-issue: 122527
.. nonce: eztso6
.. section: Core and Builtins
Fix a crash that occurred when a ``PyStructSequence`` was deallocated after
its type's dictionary was cleared by the GC. The type's
:c:member:`~PyTypeObject.tp_basicsize` now accounts for non-sequence fields
that aren't included in the :c:macro:`Py_SIZE` of the sequence.
..
.. date: 2024-07-30-11-41-35
.. gh-issue: 122445
.. nonce: Rq0bjS
.. section: Core and Builtins
Add only fields which are modified via self.* to
:attr:`~type.__static_attributes__`.
..
.. date: 2024-07-29-19-20-25
.. gh-issue: 122417
.. nonce: NVgs0a
.. section: Core and Builtins
In the free-threaded build, the reference counts for heap type objects are
now partially stored in a distributed manner in per-thread arrays. This
reduces contention on the heap type's reference count fields when creating
or destroying instances of the same type from multiple threads concurrently.
..
.. date: 2024-07-29-10-55-46
.. gh-issue: 116090
.. nonce: p1MhU0
.. section: Core and Builtins
Fix an issue in JIT builds that prevented some :keyword:`for` loops from
correctly firing :monitoring-event:`RAISE` monitoring events.
..
.. date: 2024-07-26-14-05-51
.. gh-issue: 122300
.. nonce: SVIF-l
.. section: Core and Builtins
Preserve AST nodes for f-string with single-element format specifiers. Patch
by Pablo Galindo
..
.. date: 2024-07-26-13-56-32
.. gh-issue: 120906
.. nonce: qBh2I9
.. section: Core and Builtins
:attr:`frame.f_locals` now supports arbitrary hashable objects as keys.
..
.. date: 2024-07-25-01-45-21
.. gh-issue: 122239
.. nonce: 7zh-sW
.. section: Core and Builtins
When a :class:`list`, :class:`tuple` or :class:`dict` with too many elements
is unpacked, show the actual length in the error message.
..
.. date: 2024-07-24-22-39-07
.. gh-issue: 122245
.. nonce: LVa9v8
.. section: Core and Builtins
Detection of writes to ``__debug__`` is moved from the compiler's codegen
stage to the symtable. This means that these errors are now detected even in
code that is optimized away before codegen (such as assertions with the
:option:`-O` command line option).
..
.. date: 2024-07-24-17-11-51
.. gh-issue: 122234
.. nonce: VxsP_F
.. section: Core and Builtins
Specializations for sums with float and complex inputs in :func:`sum` now
always use compensated summation. Also, for integer items in above
specializations: :c:func:`PyLong_AsDouble` is used, instead of
:c:func:`PyLong_AsLongAndOverflow`. Patch by Sergey B Kirpichev.
..
.. date: 2024-07-23-23-59-04
.. gh-issue: 122208
.. nonce: z8KHsY
.. section: Core and Builtins
Dictionary watchers now only deliver the PyDict_EVENT_ADDED event when the
insertion is in a known good state to succeed.
..
.. date: 2024-07-23-11-57-36
.. gh-issue: 122160
.. nonce: HSnrAP
.. section: Core and Builtins
Remove the ``BUILD_CONST_KEY_MAP`` opcode. Use :opcode:`BUILD_MAP` instead.
..
.. date: 2024-07-21-01-23-54
.. gh-issue: 122029
.. nonce: gKv-e2
.. section: Core and Builtins
Emit ``c_call`` events in :func:`sys.setprofile` when a ``PyMethodObject``
pointing to a ``PyCFunction`` is called.
..
.. date: 2024-07-19-15-28-05
.. gh-issue: 122026
.. nonce: sta2Ca
.. section: Core and Builtins
Fix a bug that caused the tokenizer to not correctly identify mismatched
parentheses inside f-strings in some situations. Patch by Pablo Galindo
..
.. date: 2024-07-19-09-38-01
.. gh-issue: 99108
.. nonce: qzM6gl
.. section: Core and Builtins
Python's hashlib now unconditionally uses the vendored HACL* library for
Blake2. Python no longer accepts libb2 as an optional dependency for Blake2.
We refreshed HACL* to the latest version, and now vendor HACL*'s 128-bit and
256-bit wide vector implementations for Blake2, which are used on x86/x64
toolchains when the required CPU features are available at runtime.
HACL*'s 128-bit wide vector implementation of Blake2 can also run on ARM
NEON and Power8, but lacking evidence of a performance gain, these are not
enabled (yet).
..
.. date: 2024-07-18-21-19-04
.. gh-issue: 121999
.. nonce: 8IBbTK
.. section: Core and Builtins
The default extraction filter for the :mod:`tarfile` module is now set to
:func:`'data' <tarfile.data_filter>`.
..
.. date: 2024-07-16-18-23-22
.. gh-issue: 121860
.. nonce: -FTauD
.. section: Core and Builtins
Fix crash when rematerializing a managed dictionary after it was deleted.
..
.. date: 2024-07-16-15-11-51
.. gh-issue: 121795
.. nonce: xkIHrI
.. section: Core and Builtins
Improve performance of set membership testing, ``set.remove()`` and
``set.discard()`` when the argument is a set.
..
.. date: 2024-07-15-20-41-06
.. gh-issue: 121814
.. nonce: oR2ixR
.. section: Core and Builtins
Fixed the SegFault when :c:func:`PyEval_SetTrace` is used with no Python
frame on stack.
..
.. date: 2024-07-15-20-03-29
.. gh-issue: 121295
.. nonce: w53ucI
.. section: Core and Builtins
Fix PyREPL console getting into a blocked state after interrupting a long
paste
..
.. date: 2024-07-15-16-26-32
.. gh-issue: 121794
.. nonce: fhBtiQ
.. section: Core and Builtins
Fix bug in free-threaded Python where a resurrected object could lead to a
negative ref count assertion failure.
..
.. date: 2024-07-13-12-27-31
.. gh-issue: 121657
.. nonce: wgOYLw
.. section: Core and Builtins
Improve the :exc:`SyntaxError` message if the user tries to use
:keyword:`yield from <yield>` outside a function.
..
.. date: 2024-07-13-09-51-44
.. gh-issue: 121609
.. nonce: jWsE5t
.. section: Core and Builtins
Fix pasting of characters containing unicode character joiners in the new
REPL. Patch by Marta Gomez Macias
..
.. date: 2024-07-12-18-18-44
.. gh-issue: 121297
.. nonce: 67VE7b
.. section: Core and Builtins
Previously, incorrect usage of :keyword:`await` or asynchronous
comprehensions in code removed by the :option:`-O` option was not flagged by
the Python compiler. Now, such code raises :exc:`SyntaxError`. Patch by
Jelle Zijlstra.
..
.. date: 2024-07-10-15-43-54
.. gh-issue: 117482
.. nonce: 5WYaXR
.. section: Core and Builtins
Unexpected slot wrappers are no longer created for builtin static types in
subinterpreters.
..
.. date: 2024-07-10-02-02-32
.. gh-issue: 121562
.. nonce: 8beIMi
.. section: Core and Builtins
Optimized performance of hex_from_char by replacing switch-case with a
lookup table
..
.. date: 2024-07-09-13-53-18
.. gh-issue: 121499
.. nonce: rpp7il
.. section: Core and Builtins
Fix a bug affecting how multi-line history was being rendered in the new
REPL after interacting with the new screen cache. Patch by Pablo Galindo
..
.. date: 2024-07-08-17-15-14
.. gh-issue: 121497
.. nonce: I8hMDC
.. section: Core and Builtins
Fix a bug that was preventing the REPL to correctly respect the history when
an input hook was set. Patch by Pablo Galindo
..
.. date: 2024-07-08-10-31-08
.. gh-issue: 121012
.. nonce: M5hHk-
.. section: Core and Builtins
Tier 2 execution now ensures that list iterators remain exhausted, once they
become exhausted.
..
.. date: 2024-07-08-02-24-55
.. gh-issue: 121439
.. nonce: jDHod3
.. section: Core and Builtins
Allow tuples of length 20 in the freelist to be reused.
..
.. date: 2024-07-05-11-29-27
.. gh-issue: 121288
.. nonce: lYKYYP
.. section: Core and Builtins
:exc:`ValueError` messages for :meth:`!list.index`, :meth:`!range.index`,
:meth:`!deque.index`, :meth:`!deque.remove` and :meth:`!ShareableList.index`
no longer contain the repr of the searched value (which can be arbitrary
large) and are consistent with error messages for other :meth:`!index` and
:meth:`!remove` methods.
..
.. date: 2024-07-04-23-38-30
.. gh-issue: 121368
.. nonce: m3EF9E
.. section: Core and Builtins
Fix race condition in ``_PyType_Lookup`` in the free-threaded build due to a
missing memory fence. This could lead to ``_PyType_Lookup`` returning
incorrect results on arm64.
..
.. date: 2024-06-30-03-48-10
.. gh-issue: 121149
.. nonce: lLBMKe
.. section: Core and Builtins
Added specialization for summation of complexes, this also improves accuracy
of builtin :func:`sum` for such inputs. Patch by Sergey B Kirpichev.
..
.. date: 2024-06-29-10-46-14
.. gh-issue: 121130
.. nonce: Rj66Xs
.. section: Core and Builtins
Fix f-strings with debug expressions in format specifiers. Patch by Pablo
Galindo
..
.. date: 2024-06-28-23-17-22
.. gh-issue: 121381
.. nonce: i2xL7P
.. section: Core and Builtins
Remove ``subprocess._USE_VFORK`` escape hatch code and documentation. It was
added just in case, and doesn't have any known cases that require it.
..
.. date: 2024-06-28-18-34-49
.. gh-issue: 119726
.. nonce: Fjv_Ab
.. section: Core and Builtins
Optimize code layout for calls to C functions from the JIT on AArch64. Patch
by Diego Russo.
..
.. date: 2024-06-28-10-02-58
.. gh-issue: 121115
.. nonce: EeSLfc
.. section: Core and Builtins
:c:func:`PyLong_AsNativeBytes` no longer uses :meth:`~object.__index__`
methods by default. The ``Py_ASNATIVEBYTES_ALLOW_INDEX`` flag has been added
to allow it.
..
.. date: 2024-06-26-14-09-31
.. gh-issue: 120838
.. nonce: nFeTL9
.. section: Core and Builtins
:c:func:`Py_Finalize()` and :c:func:`Py_FinalizeEx()` now always run with
the main interpreter active.
..
.. date: 2024-06-26-13-42-36
.. gh-issue: 113433
.. nonce: xKAtLB
.. section: Core and Builtins
Subinterpreters now get cleaned up automatically during runtime
finalization.
..
.. date: 2024-06-25-16-26-44
.. gh-issue: 119726
.. nonce: WqvHxB
.. section: Core and Builtins
Improve the speed and memory use of C function calls from JIT code on
AArch64. Patch by Diego Russo
..
.. date: 2024-06-24-08-39-23
.. gh-issue: 116017
.. nonce: -Bw2UY
.. section: Core and Builtins
Simplify the warmup mechanism used for "side exits" in JIT code, resulting
in slightly better performance and slightly lower memory usage for most
platforms.
..
.. date: 2024-06-19-21-34-21
.. gh-issue: 98442
.. nonce: cqhjkN
.. section: Core and Builtins
Fix too wide source locations of the cleanup instructions of a with
statement.
..
.. date: 2024-06-19-19-54-35
.. gh-issue: 120754
.. nonce: uF29sj
.. section: Core and Builtins
Reduce the number of system calls invoked when reading a whole file (ex.
``open('a.txt').read()``). For a sample program that reads the contents of
the 400+ ``.rst`` files in the cpython repository ``Doc`` folder, there is
an over 10% reduction in system call count.
..
.. date: 2024-06-19-11-10-50
.. gh-issue: 119462
.. nonce: DpcqSe
.. section: Core and Builtins
Make sure that invariants of type versioning are maintained: * Superclasses
always have their version number assigned before subclasses * The version
tag is always zero if the tag is not valid. * The version tag is always
non-if the tag is valid.
..
.. date: 2024-06-19-01-58-54
.. gh-issue: 120437
.. nonce: nCkIoI
.. section: Core and Builtins
Fix ``_CHECK_STACK_SPACE`` optimization problems introduced in :gh:`118322`.
..
.. date: 2024-06-18-22-41-05
.. gh-issue: 120722
.. nonce: rS7tkE
.. section: Core and Builtins
Correctly set the bytecode position on return instructions within lambdas.
Patch by Jelle Zijlstra.
..
.. date: 2024-06-18-21-34-30
.. gh-issue: 120367
.. nonce: zDwffP
.. section: Core and Builtins
Fix bug where compiler creates a redundant jump during pseudo-op
replacement. Can only happen with a synthetic AST that has a try on the same
line as the instruction following the exception handler.
..
.. date: 2024-06-17-12-20-20
.. gh-issue: 120507
.. nonce: 94lz2J
.. section: Core and Builtins
Remove the ``BEFORE_WITH`` and ``BEFORE_ASYNC_WITH`` instructions. Add the
new :opcode:`LOAD_SPECIAL` instruction. Generate code for ``with`` and
``async with`` statements using the new instruction.
..
.. date: 2024-06-14-22-02-25
.. gh-issue: 113993
.. nonce: MiA0vX
.. section: Core and Builtins
Strings interned with :func:`sys.intern` are again garbage-collected when no
longer used, as per the documentation. Strings interned with the C function
:c:func:`PyUnicode_InternInPlace` are still immortal. Internals of the
string interning mechanism have been changed. This may affect performance
and identities of :class:`str` objects.
..
.. date: 2024-06-14-07-52-00
.. gh-issue: 120485
.. nonce: yy4K4b
.. section: Core and Builtins
Add an override of ``allow_reuse_port`` on classes subclassing
``socketserver.TCPServer`` where ``allow_reuse_address`` is also overridden.
..
.. date: 2024-06-13-12-17-52
.. gh-issue: 120384
.. nonce: w1UBGl
.. section: Core and Builtins
Fix an array out of bounds crash in ``list_ass_subscript``, which could be
invoked via some specifically tailored input: including concurrent
modification of a list object, where one thread assigns a slice and another
clears it.
..
.. date: 2024-06-12-18-50-29
.. gh-issue: 120367
.. nonce: LmXx2y
.. section: Core and Builtins
Fix crash in compiler on code with redundant NOPs and JUMPs which show up
after exception handlers are moved to the end of the code.
..
.. date: 2024-06-12-18-23-15
.. gh-issue: 120380
.. nonce: edtqjq
.. section: Core and Builtins
Fix Python implementation of :class:`pickle.Pickler` for :class:`bytes` and
:class:`bytearray` objects when using protocol version 5. Patch by Bénédikt
Tran.
..
.. date: 2024-06-12-13-47-25
.. gh-issue: 120397
.. nonce: n-I_cc
.. section: Core and Builtins
Improve the throughput by up to two times for the :meth:`str.count`,
:meth:`bytes.count` and :meth:`bytearray.count` methods for counting single
characters.
..
.. date: 2024-06-11-17-56-12
.. gh-issue: 120221
.. nonce: si9hM9
.. section: Core and Builtins
Deliver real signals on Ctrl-C and Ctrl-Z in the new REPL. Patch by Pablo
Galindo
..
.. date: 2024-06-11-12-47-54
.. gh-issue: 120346
.. nonce: hhn_6X
.. section: Core and Builtins
Respect :envvar:`PYTHON_BASIC_REPL` when running in interactive inspect mode
(``python -i``). Patch by Pablo Galindo
..
.. date: 2024-06-10-22-30-26
.. gh-issue: 93691
.. nonce: 68WOTS
.. section: Core and Builtins
Fix source locations of instructions generated for the iterator of a for
statement.
..
.. date: 2024-06-10-15-07-16
.. gh-issue: 120198
.. nonce: WW_pjO
.. section: Core and Builtins
Fix a crash when multiple threads read and write to the same ``__class__``
of an object concurrently.
..
.. date: 2024-06-10-10-42-48
.. gh-issue: 120298
.. nonce: napREA
.. section: Core and Builtins
Fix use-after free in ``list_richcompare_impl`` which can be invoked via
some specifically tailored evil input.
..
.. date: 2024-06-09-19-13-38
.. gh-issue: 119666
.. nonce: S0G4rZ
.. section: Core and Builtins
Fix a compiler crash in the case where two comprehensions in class scope
both reference ``__class__``.
..
.. date: 2024-06-07-22-54-15
.. gh-issue: 119726
.. nonce: D9EE-o
.. section: Core and Builtins
JIT: Re-use trampolines on AArch64 when creating stencils. Patch by Diego
Russo
..
.. date: 2024-06-07-16-09-04
.. gh-issue: 120225
.. nonce: kuYf9t
.. section: Core and Builtins
Fix crash in compiler on empty block at end of exception handler.
..
.. date: 2024-06-05-18-29-18
.. gh-issue: 93691
.. nonce: 6OautB
.. section: Core and Builtins
Fix source locations of instructions generated for with statements.
..
.. date: 2024-06-05-10-32-44
.. gh-issue: 120097
.. nonce: 9S2klk
.. section: Core and Builtins
``FrameLocalsProxy`` now subclasses ``collections.abc.Mapping`` and can be
matched as a mapping in ``match`` statements
..
.. date: 2024-06-05-08-39-40
.. gh-issue: 120080
.. nonce: DJFK11
.. section: Core and Builtins
Direct call to the :meth:`!int.__round__` now accepts ``None`` as a valid
argument.
..
.. date: 2024-06-03-13-48-44
.. gh-issue: 119933
.. nonce: Kc0HG5
.. section: Core and Builtins
Improve :exc:`SyntaxError` messages for invalid expressions in a type
parameters bound, a type parameter constraint tuple or a default type
parameter. Patch by Bénédikt Tran.
..
.. date: 2024-06-03-13-25-04
.. gh-issue: 119724
.. nonce: EH1dkA
.. section: Core and Builtins
Reverted improvements to error messages for ``elif``/``else`` statements not
matching any valid statements, which made in hard to locate the syntax
errors inside those ``elif``/``else`` blocks.
..
.. date: 2024-06-02-06-12-35
.. gh-issue: 119879
.. nonce: Jit951
.. section: Core and Builtins
String search is now slightly faster for certain cases. It now utilizes last
character gap (good suffix rule) for two-way periodic needles.
..
.. date: 2024-05-31-12-06-11
.. gh-issue: 119842
.. nonce: tCGVsv
.. section: Core and Builtins
Honor :c:func:`PyOS_InputHook` in the new REPL. Patch by Pablo Galindo
..
.. date: 2024-05-31-08-23-41
.. gh-issue: 119180
.. nonce: KL4VxZ
.. section: Core and Builtins
:func:`classmethod` and :func:`staticmethod` now wrap the
:attr:`~object.__annotations__` and :attr:`~object.__annotate__` attributes
of their underlying callable lazily. See :pep:`649`. Patch by Jelle
Zijlstra.
..
.. date: 2024-05-30-23-01-00
.. gh-issue: 119821
.. nonce: jPGfvt
.. section: Core and Builtins
Fix execution of :ref:`annotation scopes <annotation-scopes>` within classes
when ``globals`` is set to a non-dict. Patch by Jelle Zijlstra.
..
.. date: 2024-05-30-04-11-36
.. gh-issue: 118934
.. nonce: fbDqve
.. section: Core and Builtins
Make ``PyEval_GetLocals`` return borrowed reference
..
.. date: 2024-05-29-18-53-43
.. gh-issue: 119740
.. nonce: zP2JNM
.. section: Core and Builtins
Remove the previously-deprecated delegation of :func:`int` to
:meth:`~object.__trunc__`.
..
.. date: 2024-05-28-22-49-56
.. gh-issue: 119689
.. nonce: VwLFD5
.. section: Core and Builtins
Generate stack effect metadata for pseudo instructions from bytecodes.c.
..
.. date: 2024-05-27-19-13-49
.. gh-issue: 109218
.. nonce: -sdDg0
.. section: Core and Builtins
:func:`complex` accepts now a string only as a positional argument. Passing
a complex number as the "real" or "imag" argument is deprecated; it should
only be passed as a single positional argument.
..
.. date: 2024-05-25-16-45-27
.. gh-issue: 119548
.. nonce: pqF9Y6
.. section: Core and Builtins
Add a ``clear`` command to the REPL. Patch by Pablo Galindo
..
.. date: 2024-05-25-13-51-48
.. gh-issue: 111999
.. nonce: L0q1gh
.. section: Core and Builtins
Fix the signature of :meth:`str.format_map`.
..
.. date: 2024-05-25-12-52-25
.. gh-issue: 119560
.. nonce: wSlm8q
.. section: Core and Builtins
An invalid assert in beta 1 has been removed. The assert would fail if
``PyState_FindModule()`` was used in an extension module's init function
before the module def had been initialized.
..
.. date: 2024-05-24-21-16-52
.. gh-issue: 119369
.. nonce: qBThho
.. section: Core and Builtins
Fix deadlock during thread deletion in free-threaded build, which could
occur when the GIL was enabled at runtime.
..
.. date: 2024-05-24-21-04-00
.. gh-issue: 119525
.. nonce: zLFLf1
.. section: Core and Builtins
Fix deadlock involving ``_PyType_Lookup()`` cache in the free-threaded build
when the GIL is dynamically enabled at runtime.
..
.. date: 2024-05-23-20-17-37
.. gh-issue: 119258
.. nonce: wZFIpt
.. section: Core and Builtins
Eliminate type version guards in the tier two interpreter.
Note that setting the ``tp_version_tag`` manually (which has never been
supported) may result in crashes.
..
.. date: 2024-05-23-06-34-45
.. gh-issue: 119311
.. nonce: 2DBwKR
.. section: Core and Builtins
Fix bug where names are unexpectedly mangled in the bases of generic
classes.
..
.. date: 2024-05-23-06-34-14
.. gh-issue: 119395
.. nonce: z-Hsqb
.. section: Core and Builtins
Fix bug where names appearing after a generic class are mangled as if they
are in the generic class.
..
.. date: 2024-05-22-12-49-03
.. gh-issue: 119372
.. nonce: PXig1R
.. section: Core and Builtins
Correct invalid corner cases in complex division (resulted in ``(nan+nanj)``
output), e.g. ``1/complex('(inf+infj)')``. Patch by Sergey B Kirpichev.
..
.. date: 2024-05-22-06-22-47
.. gh-issue: 119180
.. nonce: vZMiXm
.. section: Core and Builtins
Evaluation of annotations is now deferred. See :pep:`649` for details.
..
.. date: 2024-05-21-12-17-02
.. gh-issue: 119180
.. nonce: UNDUb9
.. section: Core and Builtins
Replace :opcode:`!LOAD_ASSERTION_ERROR` opcode with
:opcode:`LOAD_COMMON_CONSTANT` and add support for
:exc:`NotImplementedError`.
..
.. date: 2024-05-21-11-27-14
.. gh-issue: 119213
.. nonce: nxjxrt
.. section: Core and Builtins
Non-builtin modules built with argument clinic were crashing if used in a
subinterpreter before the main interpreter. The objects that were causing
the problem by leaking between interpreters carelessly have been fixed.
..
.. date: 2024-05-21-09-46-51
.. gh-issue: 119011
.. nonce: WOe3bu
.. section: Core and Builtins
Fixes ``type.__type_params__`` to return an empty tuple instead of a
descriptor.
..
.. date: 2024-05-20-14-57-39
.. gh-issue: 118692
.. nonce: Qadm7F
.. section: Core and Builtins
Avoid creating unnecessary :exc:`StopIteration` instances for monitoring.
..
.. date: 2024-05-20-10-10-51
.. gh-issue: 119180
.. nonce: 35xqpu
.. section: Core and Builtins
Add an ``__annotate__`` attribute to functions, classes, and modules as part
of :pep:`649`. Patch by Jelle Zijlstra.
..
.. date: 2024-05-16-23-02-03
.. gh-issue: 119049
.. nonce: qpd_S-
.. section: Core and Builtins
Fix displaying the source line for warnings created by the C API if the
:mod:`warnings` module had not yet been imported.
..
.. date: 2024-05-15-12-15-58
.. gh-issue: 119057
.. nonce: P3G9G2
.. section: Core and Builtins
Improve :exc:`ZeroDivisionError` error message. Now, all error messages are
harmonized: all ``/``, ``//``, and ``%`` operations just use "division by
zero" message. And ``0 ** -1`` operation uses "zero to a negative power".
..
.. date: 2024-05-11-21-44-17
.. gh-issue: 118844
.. nonce: q2H_km
.. section: Core and Builtins
Fix build failures when configuring with both ``--disable-gil`` and
``--enable-experimental-jit``.
..
.. date: 2024-05-10-19-54-18
.. gh-issue: 118921
.. nonce: O4ztZG
.. section: Core and Builtins
Add ``copy()`` method for ``FrameLocalsProxy`` which returns a snapshot
``dict`` for local variables.
..
.. date: 2024-05-09-19-47-12
.. gh-issue: 117657
.. nonce: Vn0Yey
.. section: Core and Builtins
Fix data races on the field that stores a pointer to the interpreter's main
thread that occur in free-threaded builds.
..
.. date: 2024-05-09-02-37-25
.. gh-issue: 118750
.. nonce: 7aLfT-
.. section: Core and Builtins
If the C version of the ``decimal`` module is available, ``int(str)`` now
uses it to supply an asymptotically much faster conversion. However, this
only applies if the string contains over about 2 million digits.
..
.. date: 2024-05-08-09-44-15
.. gh-issue: 118767
.. nonce: iFF5F5
.. section: Core and Builtins
Using :data:`NotImplemented` in a boolean context now raises
:exc:`TypeError`. Contributed by Jelle Zijlstra.
..
.. date: 2024-05-07-16-57-56
.. gh-issue: 118561
.. nonce: wNMKVd
.. section: Core and Builtins
Fix race condition in free-threaded build where :meth:`!list.extend` could
expose uninitialised memory to concurrent readers.
..
.. date: 2024-05-01-05-09-16
.. gh-issue: 117139
.. nonce: t41w_D
.. section: Core and Builtins
Convert the Python evaluation stack to use internal stack references. The
purpose is to support tagged pointers. In :pep:`703`, this will allow for
its form of deferred reference counting. For both the default and
free-threaded builds, this sets up the infrastructure for unboxed integers
in the future.
..
.. date: 2024-04-27-18-36-46
.. gh-issue: 115801
.. nonce: SVeHSy
.. section: Core and Builtins
Raise ``TypeError`` when passing a string to :func:`difflib.unified_diff`
and :func:`difflib.context_diff`.
..
.. date: 2024-04-08-13-49-02
.. gh-issue: 117558
.. nonce: 9lSEpR
.. section: Core and Builtins
Improve error messages when a string, bytes or bytearray object of length 1
is expected.
..
.. date: 2024-03-25-15-07-01
.. gh-issue: 117195
.. nonce: OWakgD
.. section: Core and Builtins
Avoid assertion failure for debug builds when calling
``object.__sizeof__(1)``
..
.. date: 2024-03-19-22-21-22
.. gh-issue: 116022
.. nonce: iyHENN
.. section: Core and Builtins
Improve the :meth:`~object.__repr__` output of :class:`~ast.AST` nodes.
..
.. date: 2024-01-15-21-51-26
.. gh-issue: 114091
.. nonce: VOtSJl
.. section: Core and Builtins
Changed the error message for awaiting something that can't be awaited from
"object <type> can't be used in an await expression" to "'<type>' object
can't be awaited".
..
.. date: 2024-01-15-18-11-48
.. gh-issue: 113190
.. nonce: OwQX64
.. section: Core and Builtins
:c:func:`Py_Finalize` now deletes all interned strings.
..
.. date: 2023-10-14-23-05-40
.. gh-issue: 84978
.. nonce: Z0t6dg
.. section: Core and Builtins
Add class methods :meth:`float.from_number` and :meth:`complex.from_number`.
..
.. date: 2022-07-22-15-56-35
.. gh-issue: 95144
.. nonce: FZYWX-
.. section: Core and Builtins
Improve the error message from ``a in b`` when ``b`` is not a container to
mention the term "container".
..
.. bpo: 24766
.. date: 2018-10-09-15-14-53
.. nonce: c_C1Wc
.. section: Core and Builtins
Fix handling of ``doc`` argument to subclasses of ``property``.
..
.. date: 2024-10-03-14-06-08
.. gh-issue: 123961
.. nonce: uwJQTY
.. section: C API
Convert the :ref:`curses.window <curses-window-objects>` static type exposed
by the :c:macro:`!PyCursesWindow_Type` macro in ``Include/py_curses.h`` to a
:ref:`heap type <heap-types>`. Patch by Bénédikt Tran.
..
.. date: 2024-09-25-11-44-02
.. gh-issue: 124502
.. nonce: qWuDjT
.. section: C API
Add :c:func:`PyUnicode_Equal` function to the limited C API: test if two
strings are equal. Patch by Victor Stinner.
..
.. date: 2024-09-24-20-34-21
.. gh-issue: 124296
.. nonce: S4QoS1
.. section: C API
:c:type:`PyDictObject` no longer maintains a private version tag field
``ma_version_tag`` per :pep:`699`. This field was originally added in
Python 3.6 (:pep:`509`) and deprecated in Python 3.12.
..
.. date: 2024-09-18-18-40-30
.. gh-issue: 124160
.. nonce: Zy-VKi
.. section: C API
Fix crash when importing modules containing state and single-phase
initialization in a subinterpreter.
..
.. date: 2024-09-17-05-23-35
.. gh-issue: 124153
.. nonce: L8TWmx
.. section: C API
Add :c:func:`PyType_GetBaseByToken` and :c:data:`Py_tp_token` slot for
easier type checking, related to :pep:`489` and :pep:`630`.
..
.. date: 2024-09-16-16-21-39
.. gh-issue: 124127
.. nonce: LB8DBU
.. section: C API
In the limited C API 3.14 and newer, :c:func:`Py_REFCNT` is now implemented
as an opaque function call to hide implementation details. Patch by Victor
Stinner.
..
.. date: 2024-09-12-16-16-24
.. gh-issue: 123880
.. nonce: 2-8vcj
.. section: C API
Fixed a bug that prevented circular imports of extension modules that use
single-phase initialization.
..
.. date: 2024-09-10-16-54-27
.. gh-issue: 123909
.. nonce: CTGxDR
.. section: C API
:c:func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases` and
:c:func:`PyType_FromModuleAndSpec` will now fail if the metaclass of the new
type has custom :c:member:`~PyTypeObject.tp_new`.
..
.. date: 2024-08-30-14-02-17
.. gh-issue: 107954
.. nonce: TPvj4u
.. section: C API
Add functions to configure the Python initialization (:pep:`741`):
* :c:func:`PyInitConfig_Create`
* :c:func:`PyInitConfig_Free`
* :c:func:`PyInitConfig_GetError`
* :c:func:`PyInitConfig_GetExitCode`
* :c:func:`PyInitConfig_HasOption`
* :c:func:`PyInitConfig_GetInt`
* :c:func:`PyInitConfig_GetStr`
* :c:func:`PyInitConfig_GetStrList`
* :c:func:`PyInitConfig_FreeStrList`
* :c:func:`PyInitConfig_SetInt`
* :c:func:`PyInitConfig_SetStr`
* :c:func:`PyInitConfig_SetStrList`
* :c:func:`PyInitConfig_AddModule`
* :c:func:`Py_InitializeFromInitConfig`
Patch by Victor Stinner.
..
.. date: 2024-08-29-15-55-55
.. gh-issue: 107954
.. nonce: pr2O50
.. section: C API
Add functions to get and set the current runtime Python configuration:
* :c:func:`PyConfig_Get`
* :c:func:`PyConfig_GetInt`
* :c:func:`PyConfig_Set`
* :c:func:`PyConfig_Names`
Patch by Victor Stinner.
..
.. date: 2024-08-29-15-05-19
.. gh-issue: 123465
.. nonce: eqwNWq
.. section: C API
:c:macro:`Py_RELATIVE_OFFSET` is now allowed in :c:type:`PyMemberDef` for
the special offset member ``"__vectorcalloffset__"``, as well as the
discouraged special offset members ``"__dictoffset__"`` and
``"__weaklistoffset__"``
..
.. date: 2024-08-26-13-01-20
.. gh-issue: 100554
.. nonce: 0ku85o
.. section: C API
Added a slot ``Py_tp_vectorcall`` to set
:c:member:`~PyTypeObject.tp_vectorcall` via the :c:func:`PyType_FromSpec`
function family. Limited API extensions can use this feature to provide more
efficient vector call-based implementation of ``__new__`` and ``__init__``.
..
.. date: 2024-08-09-13-12-20
.. gh-issue: 122854
.. nonce: -1OgvU
.. section: C API
Add :c:func:`Py_HashBuffer` to compute and return the hash value of a
buffer. Patch by Antoine Pitrou and Victor Stinner.
..
.. date: 2024-08-06-14-23-11
.. gh-issue: 122728
.. nonce: l-fQ-v
.. section: C API
Fix :c:func:`PyEval_GetLocals` to avoid :exc:`SystemError` ("bad argument to
internal function"). Patch by Victor Stinner.
..
.. date: 2024-07-30-23-48-26
.. gh-issue: 116622
.. nonce: yTTtil
.. section: C API
Make :any:`PyObject_Print` work around a bug in Android and OpenBSD which
prevented it from throwing an exception when trying to write to a read-only
stream.
..
.. date: 2024-07-27-00-28-35
.. gh-issue: 105201
.. nonce: 0-xUWq
.. section: C API
Add :c:func:`PyIter_NextItem` to replace :c:func:`PyIter_Next`, which has an
ambiguous return value. Patch by Irit Katriel and Erlend Aasland.
..
.. date: 2024-07-21-17-40-07
.. gh-issue: 121489
.. nonce: SUMFCr
.. section: C API
Export private :c:func:`!_PyBytes_Join` again.
..
.. date: 2024-07-12-13-40-59
.. gh-issue: 121645
.. nonce: 96QvD3
.. section: C API
Add :c:func:`PyBytes_Join(sep, iterable) <PyBytes_Join>` function, similar
to ``sep.join(iterable)`` in Python. Patch by Victor Stinner.
..
.. date: 2024-07-09-15-55-20
.. gh-issue: 89364
.. nonce: yYYroI
.. section: C API
Export the :c:func:`PySignal_SetWakeupFd` function. Previously, the function
was documented but it couldn't be used in 3rd party code. Patch by Victor
Stinner.
..
.. date: 2024-07-04-15-41-10
.. gh-issue: 113993
.. nonce: cLSiWV
.. section: C API
:c:func:`PyUnicode_InternInPlace` no longer prevents its argument from being
garbage collected.
Several functions that take ``char *`` are now documented as possibly
preventing string objects from being garbage collected; refer to their
documentation for details: :c:func:`PyUnicode_InternFromString`,
:c:func:`PyDict_SetItemString`, :c:func:`PyObject_SetAttrString`,
:c:func:`PyObject_DelAttrString`, :c:func:`PyUnicode_InternFromString`, and
``PyModule_Add*`` convenience functions.
..
.. date: 2024-07-04-13-23-27
.. gh-issue: 113601
.. nonce: K3RLqp
.. section: C API
Removed debug build assertions related to interning strings, which were
falsely triggered by stable ABI extensions.
..
.. date: 2024-07-02-11-03-40
.. gh-issue: 112136
.. nonce: f3fiY8
.. section: C API
Restore the private ``_PyArg_Parser`` structure and the private
``_PyArg_ParseTupleAndKeywordsFast()`` function, previously removed in
Python 3.13 alpha 1. Patch by Victor Stinner.
..
.. date: 2024-06-26-11-29-01
.. gh-issue: 120642
.. nonce: H7P9qK
.. section: C API
Remove the private ``_Py_CODEUNIT`` type from the public C API. The internal
``pycore_code.h`` header should now be used to get this internal type. Patch
by Victor Stinner.
..
.. date: 2024-06-21-16-41-21
.. gh-issue: 120858
.. nonce: Z5_-Mn
.. section: C API
:c:func:`PyDict_Next` no longer locks the dictionary in the free-threaded
build. The locking needs to be done by the caller around the entire
iteration loop.
..
.. date: 2024-06-19-21-27-42
.. gh-issue: 120642
.. nonce: UlKClN
.. section: C API
Remove the following unstable functions:
* ``PyUnstable_Replace_Executor()``
* ``PyUnstable_SetOptimizer()``
* ``PyUnstable_GetOptimizer()``
* ``PyUnstable_GetExecutor()``
* ``PyUnstable_Optimizer_NewCounter()``
* ``PyUnstable_Optimizer_NewUOpOptimizer()``
Patch by Victor Stinner.
..
.. date: 2024-06-19-17-27-22
.. gh-issue: 120389
.. nonce: GSZeHF
.. section: C API
Add new functions to convert C ``<stdint.h>`` numbers from/to Python
:class:`int`:
* :c:func:`PyLong_FromInt32`
* :c:func:`PyLong_FromUInt32`
* :c:func:`PyLong_FromInt64`
* :c:func:`PyLong_FromUInt64`
* :c:func:`PyLong_AsInt32`
* :c:func:`PyLong_AsUInt32`
* :c:func:`PyLong_AsInt64`
* :c:func:`PyLong_AsUInt64`
Patch by Victor Stinner.
..
.. date: 2024-06-16-22-58-47
.. gh-issue: 120600
.. nonce: TJdf0w
.. section: C API
In the limited C API 3.14 and newer, :c:func:`Py_TYPE` is now implemented as
an opaque function call to hide implementation details. Patch by Victor
Stinner.
..
.. date: 2024-06-11-21-38-32
.. gh-issue: 70278
.. nonce: WDE4zM
.. section: C API
:c:func:`PyUnicode_FromFormat` no longer produces the ending ``\ufffd``
character for truncated C string when use precision with ``%s`` and ``%V``.
It now truncates the string before the start of truncated multibyte
sequences.
..
.. date: 2024-06-08-08-33-40
.. gh-issue: 119771
.. nonce: Oip2dL
.. section: C API
Set :data:`errno` in :c:func:`_Py_c_pow` on overflows. Patch by Sergey B
Kirpichev.
..
.. date: 2024-06-07-22-12-30
.. gh-issue: 119182
.. nonce: yt8Ar7
.. section: C API
Add a new :c:type:`PyUnicodeWriter` API to create a Python :class:`str`
object:
* :c:func:`PyUnicodeWriter_Create`.
* :c:func:`PyUnicodeWriter_Discard`.
* :c:func:`PyUnicodeWriter_Finish`.
* :c:func:`PyUnicodeWriter_WriteChar`.
* :c:func:`PyUnicodeWriter_WriteUTF8`.
* :c:func:`PyUnicodeWriter_WriteUCS4`.
* :c:func:`PyUnicodeWriter_WriteWideChar`.
* :c:func:`PyUnicodeWriter_WriteStr`.
* :c:func:`PyUnicodeWriter_WriteRepr`.
* :c:func:`PyUnicodeWriter_WriteSubstring`.
* :c:func:`PyUnicodeWriter_Format`.
* :c:func:`PyUnicodeWriter_DecodeUTF8Stateful`.
Patch by Victor Stinner.
..
.. date: 2024-06-04-10-58-20
.. gh-issue: 119613
.. nonce: qOr9GF
.. section: C API
Soft deprecate the :c:macro:`!Py_MEMCPY` macro: use directly ``memcpy()``
instead. Patch by Victor Stinner.
..
.. date: 2024-05-30-12-51-21
.. gh-issue: 119775
.. nonce: CBq9IG
.. section: C API
Creating :c:data:`immutable types <Py_TPFLAGS_IMMUTABLETYPE>` with mutable
bases was deprecated since 3.12 and now raises a :exc:`TypeError`.
..
.. date: 2024-05-29-21-05-59
.. gh-issue: 119585
.. nonce: Sn7JL3
.. section: C API
Fix crash when a thread state that was created by
:c:func:`PyGILState_Ensure` calls a destructor that during
:c:func:`PyThreadState_Clear` that calls back into
:c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release`. This might
occur when in the free-threaded build or when using thread-local variables
whose destructors call :c:func:`PyGILState_Ensure`.
..
.. date: 2024-05-29-09-21-37
.. gh-issue: 119613
.. nonce: J2xfrC
.. section: C API
Macros ``Py_IS_NAN``, ``Py_IS_INFINITY`` and ``Py_IS_FINITE`` are
:term:`soft deprecated`.
..
.. date: 2024-05-22-17-50-48
.. gh-issue: 119336
.. nonce: ff3qnS
.. section: C API
Restore the removed ``_PyLong_NumBits()`` function. It is used by the
pywin32 project. Patch by Ethan Smith
..
.. date: 2024-05-21-19-41-41
.. gh-issue: 119344
.. nonce: QKvzQb
.. section: C API
The critical section API is now public as part of the non-limited C API.
..
.. date: 2024-05-21-18-28-44
.. gh-issue: 119333
.. nonce: OTsYVX
.. section: C API
Add :c:func:`PyContext_AddWatcher` and :c:func:`PyContext_ClearWatcher` APIs
to register callbacks to receive notification on enter and exit of context
objects.
..
.. date: 2024-05-21-11-35-11
.. gh-issue: 119247
.. nonce: U6n6mh
.. section: C API
Added ``Py_BEGIN_CRITICAL_SECTION_SEQUENCE_FAST`` and
``Py_END_CRITICAL_SECTION_SEQUENCE_FAST`` macros to make it possible to use
PySequence_Fast APIs safely when free-threaded, and update str.join to work
without the GIL using them.
..
.. date: 2024-05-20-10-35-22
.. gh-issue: 111389
.. nonce: a6axBk
.. section: C API
Add :c:macro:`PyHASH_MULTIPLIER` constant: prime multiplier used in string
and various other hashes. Patch by Victor Stinner.
..
.. date: 2024-05-10-15-43-14
.. gh-issue: 118771
.. nonce: 5KVglT
.. section: C API
Several C declarations with names that didn't start with the ``Py`` or
``_Py`` prefixes, which were added by mistake in 3.13 alpha and beta
releases, were moved to internal headers.
..
.. date: 2024-05-08-23-14-06
.. gh-issue: 116984
.. nonce: 5sgcDo
.. section: C API
Make mimalloc includes relative to the current file to avoid embedders or
extensions needing to include ``Internal/mimalloc`` if they are already
including internal CPython headers.
..
.. date: 2024-05-08-21-57-50
.. gh-issue: 118789
.. nonce: Ni4UQx
.. section: C API
Add :c:func:`PyUnstable_Object_ClearWeakRefsNoCallbacks`, which clears
weakrefs without calling their callbacks.
..
.. date: 2024-05-08-20-13-00
.. gh-issue: 118789
.. nonce: m88uUa
.. section: C API
Restore ``_PyWeakref_ClearRef`` that was previously removed in Python 3.13
alpha 1.
..
.. date: 2024-04-10-16-48-04
.. gh-issue: 117511
.. nonce: RZtBRK
.. section: C API
Make the :c:type:`PyMutex` public in the non-limited C API.
..
.. date: 2024-03-10-14-55-51
.. gh-issue: 116560
.. nonce: x2mZaO
.. section: C API
Add :c:func:`PyLong_GetSign` function. Patch by Sergey B Kirpichev.
..
.. date: 2022-10-01-09-56-27
.. gh-issue: 97588
.. nonce: Gvg54o
.. section: C API
Fix creating bitfields in :mod:`ctypes` structures and unions. Fields no
longer overlap.
..
.. date: 2022-08-05-19-41-20
.. gh-issue: 87135
.. nonce: SCNBYj
.. section: C API
Attempting to acquire the GIL after runtime finalization has begun in a
different thread now causes the thread to hang rather than terminate, which
avoids potential crashes or memory corruption caused by attempting to
terminate a thread that is running code not specifically designed to support
termination. In most cases this hanging is harmless since the process will
soon exit anyway.
The ``PyThread_exit_thread`` function is now deprecated. Its behavior is
inconsistent across platforms, and it can only be used safely in the
unlikely case that every function in the entire call stack has been designed
to support the platform-dependent termination mechanism. It is recommended
that users of this function change their design to not require thread
termination. In the unlikely case that thread termination is needed and can
be done safely, users may migrate to calling platform-specific APIs such as
``pthread_exit`` (POSIX) or ``_endthreadex`` (Windows) directly.
..
.. bpo: 34008
.. date: 2018-06-30-21-48-16
.. nonce: 2Wjtm0
.. section: C API
Added ``Py_IsInitialized`` to the list of APIs that are safe to call before
the interpreter is initialized, and updated the embedding tests to cover it.
..
.. date: 2024-10-13-21-11-30
.. gh-issue: 125269
.. nonce: BC-fdo
.. section: Build
Fix detection of whether ``-latomic`` is needed when cross-compiling CPython
using the configure script.
..
.. date: 2024-09-23-11-27-25
.. gh-issue: 123990
.. nonce: d6HrYC
.. section: Build
Remove ``WITH_FREELISTS`` macro and ``--without-freelists`` build
configuration
..
.. date: 2024-09-16-09-42-05
.. gh-issue: 124102
.. nonce: Ow254j
.. section: Build
Update internal documentation under PCbuild, so it now correctly states that
Windows requires VS2017 or later and Python 3.10 or later
..
.. date: 2024-09-13-17-48-37
.. gh-issue: 124043
.. nonce: Bruxpq
.. section: Build
Building using :option:`--with-trace-refs` is (temporarily) disallowed when
the GIL is disabled.
..
.. date: 2024-09-04-12-01-43
.. gh-issue: 123418
.. nonce: ynzspB
.. section: Build
Updated Android build to use OpenSSL 3.0.15.
..
.. date: 2024-08-24-19-09-31
.. gh-issue: 123297
.. nonce: fdtXoe
.. section: Build
Propagate the value of ``LDFLAGS`` to ``LDCXXSHARED`` in :mod:`sysconfig`.
Patch by Pablo Galindo
..
.. date: 2024-08-14-19-17-34
.. gh-issue: 121634
.. nonce: eOMfHG
.. section: Build
Allow for specifying the target compile triple for WASI.
..
.. date: 2024-08-12-15-48-49
.. gh-issue: 122578
.. nonce: YJ3xEa
.. section: Build
Use WASI SDK 24 for testing.
..
.. date: 2024-08-07-00-20-18
.. gh-issue: 116622
.. nonce: U9cxHM
.. section: Build
Rename build variable ``MODULE_LDFLAGS`` back to ``LIBPYTHON``, as it's used
by package build systems (e.g. Meson).
..
.. date: 2024-08-02-12-59-15
.. gh-issue: 118943
.. nonce: vZQtET
.. section: Build
Fix an issue where the experimental JIT could be built several times by the
``make regen-all`` target, leading to possible race conditions on heavily
parallelized builds.
..
.. date: 2024-07-19-10-14-31
.. gh-issue: 121996
.. nonce: IEb2sz
.. section: Build
Introduce ./configure --disable-safety and --enable-slower-safety options.
Patch by Donghee Na.
..
.. date: 2024-07-18-07-53-07
.. gh-issue: 120522
.. nonce: dg3o5A
.. section: Build
Added a :option:`--with-app-store-compliance` option to patch out known
issues with macOS/iOS App Store review processes.
..
.. date: 2024-07-16-12-29-54
.. gh-issue: 120371
.. nonce: E7x858
.. section: Build
Support WASI SDK 22 by explicitly skipping functions that are just stubs in
wasi-libc.
..
.. date: 2024-07-14-01-29-47
.. gh-issue: 121731
.. nonce: RMPGP3
.. section: Build
Fix mimalloc compile error on GNU/Hurd
..
.. date: 2024-07-08-14-01-17
.. gh-issue: 121487
.. nonce: ekHmpR
.. section: Build
Fix deprecation warning for ATOMIC_VAR_INIT in mimalloc.
..
.. date: 2024-07-08-01-11-54
.. gh-issue: 121467
.. nonce: 3qWRQj
.. section: Build
Fix a Makefile bug that prevented mimalloc header files from being
installed.
..
.. date: 2024-07-02-20-16-09
.. gh-issue: 121103
.. nonce: TMef9j
.. section: Build
On POSIX systems, excluding macOS framework installs, the lib directory for
the free-threaded build now includes a "t" suffix to avoid conflicts with a
co-located default build installation.
..
.. date: 2024-07-02-12-42-25
.. gh-issue: 120831
.. nonce: i3eIjg
.. section: Build
The default minimum iOS version was increased to 13.0.
..
.. date: 2024-06-27-18-03-20
.. gh-issue: 121082
.. nonce: w3AfRx
.. section: Build
Fix build failure when the developer use ``--enable-pystats`` arguments in
configuration command after #118450.
..
.. date: 2024-06-21-09-24-03
.. gh-issue: 120671
.. nonce: Z8sBQB
.. section: Build
Fix failing configure tests due to a missing space when appending to CFLAGS.
..
.. date: 2024-06-19-21-05-15
.. gh-issue: 120602
.. nonce: UyDARz
.. section: Build
Correctly handle LLVM installs with ``LLVM_VERSION_SUFFIX`` when building
with ``--enable-experimental-jit``.
..
.. date: 2024-06-18-15-32-36
.. gh-issue: 120688
.. nonce: tjIPLD
.. section: Build
On WASI in debug mode, Python is now built with compiler flag ``-O3``
instead of ``-Og``, to support more recursive calls. Patch by Victor
Stinner.
..
.. date: 2024-06-18-15-28-25
.. gh-issue: 118943
.. nonce: aie7nn
.. section: Build
Fix a possible race condition affecting parallel builds configured with
``--enable-experimental-jit``, in which :exc:`FileNotFoundError` could be
caused by another process already moving ``jit_stencils.h.new`` to
``jit_stencils.h``.
..
.. date: 2024-06-11-00-38-05
.. gh-issue: 120326
.. nonce: JHSDF1
.. section: Build
On Windows, fix build error when ``--disable-gil`` and
``--experimental-jit`` options are combined.
..
.. date: 2024-06-09-15-54-22
.. gh-issue: 120291
.. nonce: IpfHzE
.. section: Build
Make the ``python-config`` shell script compatible with non-bash shells.
..
.. date: 2024-06-02-13-23-26
.. gh-issue: 113565
.. nonce: 8xBlId
.. section: Build
Improve :mod:`curses` and :mod:`curses.panel` dependency checks in
:program:`configure`.
..
.. date: 2024-05-29-17-40-50
.. gh-issue: 119729
.. nonce: k0xJ5U
.. section: Build
On POSIX systems, the pkg-config (``.pc``) filenames now include the ABI
flags, which may include debug ("d") and free-threaded ("t"). For example:
* ``python-3.14.pc`` (default, non-debug build) * ``python-3.14d.pc``
(default, debug build) * ``python-3.14t.pc`` (free-threaded build)
..
.. date: 2024-05-22-13-18-02
.. gh-issue: 119400
.. nonce: WEt83v
.. section: Build
``make_ssl_certs``, the script that prepares certificate data for the test
suite, now allows specifying expiration dates.
..
.. date: 2024-05-19-22-54-55
.. gh-issue: 115119
.. nonce: DwMwev
.. section: Build
Fall back to the bundled libmpdec if a system version cannot be found.
..
.. date: 2024-05-17-19-53-27
.. gh-issue: 119132
.. nonce: wepPgM
.. section: Build
Update :data:`sys.version` to identify whether the build is default build or
free-threading build. Patch By Donghee Na.
..
.. date: 2024-05-13-15-57-58
.. gh-issue: 118836
.. nonce: 7yN1iB
.. section: Build
Fix an ``AssertionError`` when building with ``--enable-experimental-jit``
and the compiler emits a ``SHT_NOTE`` section.
..
.. date: 2024-05-11-15-11-30
.. gh-issue: 118943
.. nonce: VI_MnY
.. section: Build
Fix a possible race condition affecting parallel builds configured with
``--enable-experimental-jit``, in which compilation errors could be caused
by an incompletely-generated header file.
|