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

Restore behavior from 3.9 and earlier when sending non-None to newly started
generator. In 3.9 this did not affect the state of the generator. In 3.10.0
and 3.10.1 ``gen_func().send(0)`` is equivalent to
``gen_func().throw(TypeError(...)`` which exhausts the generator. In 3.10.2
onward, the behavior has been reverted to that of 3.9.

..

.. bpo: 46004
.. date: 2021-12-07-11-24-24
.. nonce: TTEU1p
.. section: Core and Builtins

Fix the :exc:`SyntaxError` location for errors involving for loops with
invalid targets. Patch by Pablo Galindo

..

.. bpo: 45711
.. date: 2021-12-05-17-36-08
.. nonce: 3TmTSw
.. section: Core and Builtins

:c:func:`_PyErr_ChainStackItem` no longer normalizes ``exc_info`` (including
setting the traceback on the exception instance) because ``exc_info`` is
always normalized.

..

.. bpo: 45607
.. date: 2021-12-01-15-38-04
.. nonce: JhuF8b
.. section: Core and Builtins

The ``__note__`` field was added to :exc:`BaseException`. It is ``None`` by
default but can be set to a string which is added to the exception's
traceback.

..

.. bpo: 45947
.. date: 2021-12-01-14-06-36
.. nonce: 1XPPm_
.. section: Core and Builtins

Place pointers to dict and values immediately before GC header. This reduces
number of dependent memory loads to access either dict or values from 3 to
1.

..

.. bpo: 45915
.. date: 2021-11-28-11-25-08
.. nonce: TSGcLF
.. section: Core and Builtins

``is_valid_fd`` now uses faster ``fcntl(fd, F_GETFD)`` on Linux, macOS, and
Windows.

..

.. bpo: 44530
.. date: 2021-11-26-23-26-25
.. nonce: EZ0gel
.. section: Core and Builtins

Reverts a change to the ``code.__new__`` :ref:`audit event <audit-events>`
from an earlier prerelease.

..

.. bpo: 42268
.. date: 2021-11-26-22-31-22
.. nonce: 3wl-09
.. section: Core and Builtins

Fail the configure step if the selected compiler doesn't support memory
sanitizer. Patch by Pablo Galindo

..

.. bpo: 45711
.. date: 2021-11-25-17-51-29
.. nonce: D2igmz
.. section: Core and Builtins

The three values of ``exc_info`` are now always consistent with each other.
In particular, the ``type`` and ``traceback`` fields are now derived from
the exception instance. This impacts the return values of
:func:`sys.exc_info` and :c:func:`PyErr_GetExcInfo()` if the exception
instance is modified while the exception is handled, as well as
:c:func:`PyErr_SetExcInfo()`, which now ignores the ``type`` and
``traceback`` arguments provided to it.

..

.. bpo: 45727
.. date: 2021-11-24-18-24-49
.. nonce: _xVbbo
.. section: Core and Builtins

Refine the custom syntax error that suggests that a comma may be missing to
trigger only when the expressions are detected between parentheses or
brackets. Patch by Pablo Galindo

..

.. bpo: 45885
.. date: 2021-11-23-21-01-56
.. nonce: 3IxeCX
.. section: Core and Builtins

Specialized the ``COMPARE_OP`` opcode using the PEP 659 machinery.

..

.. bpo: 45786
.. date: 2021-11-23-15-25-00
.. nonce: UdEciD
.. section: Core and Builtins

Allocate space for the interpreter frame in the frame object, to avoid an
additional allocation when the frame object outlives the frame activation.

..

.. bpo: 45614
.. date: 2021-11-23-12-06-41
.. nonce: fIekgI
.. section: Core and Builtins

Fix :mod:`traceback` display for exceptions with invalid module name.

..

.. bpo: 45813
.. date: 2021-11-22-11-28-13
.. nonce: ZMaWE2
.. section: Core and Builtins

Fix crash when calling coro.cr_frame.clear() after coroutine has been freed.

..

.. bpo: 45811
.. date: 2021-11-20-02-25-06
.. nonce: B-1Gsr
.. section: Core and Builtins

Improve the tokenizer errors when encountering invisible control characters
in the parser. Patch by Pablo Galindo

..

.. bpo: 45848
.. date: 2021-11-19-22-57-42
.. nonce: HgVBJ5
.. section: Core and Builtins

Allow the parser to obtain error lines directly from encoded files. Patch by
Pablo Galindo

..

.. bpo: 45709
.. date: 2021-11-19-13-17-47
.. nonce: H_t7ut
.. section: Core and Builtins

Restore behavior from 3.10 when tracing an exception raised within a with
statement.

..

.. bpo: 44525
.. date: 2021-11-18-10-02-02
.. nonce: M4xwn_
.. section: Core and Builtins

Adds new :opcode:`COPY_FREE_VARS` opcode, to make copying of free variables
from function to frame explicit. Helps optimization of calls to Python
function.

..

.. bpo: 45829
.. date: 2021-11-17-10-14-35
.. nonce: 5Cf6fY
.. section: Core and Builtins

Specialize :opcode:`BINARY_SUBSCR` for classes with a ``__getitem__`` method
implemented in Python

..

.. bpo: 45826
.. date: 2021-11-17-08-05-27
.. nonce: OERoTm
.. section: Core and Builtins

Fixed a crash when calling ``.with_traceback(None)`` on ``NameError``. This
occurs internally in ``unittest.TestCase.assertRaises()``.

..

.. bpo: 45822
.. date: 2021-11-16-19-41-04
.. nonce: OT6ueS
.. section: Core and Builtins

Fixed a bug in the parser that was causing it to not respect :pep:`263`
coding cookies when no flags are provided. Patch by Pablo Galindo

..

.. bpo: 45820
.. date: 2021-11-16-19-00-27
.. nonce: 2X6Psr
.. section: Core and Builtins

Fix a segfault when the parser fails without reading any input. Patch by
Pablo Galindo

..

.. bpo: 45636
.. date: 2021-11-15-13-32-54
.. nonce: RDlTdL
.. section: Core and Builtins

Simplify the implementation of :opcode:`BINARY_OP` by indexing into an array
of function pointers (rather than switching on the oparg).

..

.. bpo: 42540
.. date: 2021-11-15-12-08-27
.. nonce: V2w107
.. section: Core and Builtins

Fix crash when :func:`os.fork` is called with an active non-default memory
allocator.

..

.. bpo: 45738
.. date: 2021-11-14-00-14-45
.. nonce: e0cgKd
.. section: Core and Builtins

Fix computation of error location for invalid continuation characters in the
parser. Patch by Pablo Galindo.

..

.. bpo: 45636
.. date: 2021-11-11-19-11-57
.. nonce: 2fyIVm
.. section: Core and Builtins

Remove an existing "fast path" for old-style string formatting, since it no
longer appears to have any measurable impact.

..

.. bpo: 45753
.. date: 2021-11-11-17-14-21
.. nonce: nEBFcC
.. section: Core and Builtins

Make recursion checks a bit more efficient by tracking amount of calls left
before overflow.

..

.. bpo: 45773
.. date: 2021-11-09-13-01-35
.. nonce: POU8A4
.. section: Core and Builtins

Fix a compiler hang when attempting to optimize certain jump patterns.

..

.. bpo: 45764
.. date: 2021-11-09-12-19-22
.. nonce: 8RLhWL
.. section: Core and Builtins

The parser now gives a better error message when leaving out the opening
parenthesis ``(`` after a ``def``-statement::

    >>> def f:
      File "<stdin>", line 1
        def f:
             ^
    SyntaxError: expected '('

..

.. bpo: 45609
.. date: 2021-10-27-21-00-49
.. nonce: L1GKPX
.. section: Core and Builtins

Specialized the ``STORE_SUBSCR`` opcode using the PEP 659 machinery.

..

.. bpo: 45636
.. date: 2021-10-27-15-14-31
.. nonce: K2X7QS
.. section: Core and Builtins

Replace all numeric ``BINARY_*`` and ``INPLACE_*`` instructions with a
single :opcode:`BINARY_OP` implementation.

..

.. bpo: 45582
.. date: 2021-10-23-00-39-31
.. nonce: YONPuo
.. section: Core and Builtins

Path calculation (known as ``getpath``) has been reimplemented as a frozen
Python module. This should have no visible impact, but may affect
calculation of all paths referenced in :mod:`sys` and :mod:`sysconfig`.

..

.. bpo: 45450
.. date: 2021-10-12-18-22-44
.. nonce: d9a-bX
.. section: Core and Builtins

Improve the syntax error message for parenthesized arguments. Patch by Pablo
Galindo.

..

.. bpo: 27946
.. date: 2021-12-04-20-08-42
.. nonce: -Vuarf
.. section: Library

Fix possible crash when getting an attribute of
class:`xml.etree.ElementTree.Element` simultaneously with replacing the
``attrib`` dict.

..

.. bpo: 45711
.. date: 2021-12-02-17-22-06
.. nonce: D6jsdv
.. section: Library

Make :mod:`asyncio` normalize exceptions as soon as they are captured with
:c:func:`PyErr_Fetch`, and before they are stored as an exc_info triplet.
This brings :mod:`asyncio` in line with the rest of the codebase, where an
exc_info triplet is always normalized.

..

.. bpo: 23819
.. date: 2021-12-02-14-37-30
.. nonce: An6vkT
.. section: Library

Replaced asserts with exceptions in asyncio, patch by Kumar Aditya.

..

.. bpo: 13236
.. date: 2021-11-30-13-52-02
.. nonce: FmJIkO
.. section: Library

:class:`unittest.TextTestResult` and :class:`unittest.TextTestRunner` flush
now the output stream more often.

..

.. bpo: 45917
.. date: 2021-11-28-17-24-11
.. nonce: J5TIrd
.. section: Library

Added :func:`math.exp2`:, which returns 2 raised to the power of x.

..

.. bpo: 37658
.. date: 2021-11-28-15-30-34
.. nonce: 8Hno7d
.. section: Library

Fix issue when on certain conditions ``asyncio.wait_for()`` may allow a
coroutine to complete successfully, but fail to return the result,
potentially causing memory leaks or other issues.

..

.. bpo: 45876
.. date: 2021-11-23-15-36-56
.. nonce: NO8Yaj
.. section: Library

Improve the accuracy of stdev() and pstdev() in the statistics module.  When
the inputs are floats or fractions, the output is a correctly rounded float

..

.. bpo: 44649
.. date: 2021-11-21-20-50-42
.. nonce: E8M936
.. section: Library

Handle dataclass(slots=True) with a field that has default a default value,
but for which init=False.

..

.. bpo: 45803
.. date: 2021-11-20-17-04-25
.. nonce: wSgFOy
.. section: Library

Added missing kw_only parameter to dataclasses.make_dataclass().

..

.. bpo: 45837
.. date: 2021-11-18-13-13-19
.. nonce: aGyr1I
.. section: Library

The :meth:`turtle.RawTurtle.settiltangle` is deprecated since Python 3.1, it
now emits a deprecation warning and will be removed in Python 3.13.

Use :meth:`turtle.RawTurtle.tiltangle` instead.

:meth:`turtle.RawTurtle.tiltangle` was earlier incorrectly marked as
deprecated, its docstring has been corrected.

Patch by Hugo van Kemenade.

..

.. bpo: 45831
.. date: 2021-11-17-19-25-37
.. nonce: 9-TojK
.. section: Library

:mod:`faulthandler` can now write ASCII-only strings (like filenames and
function names) with a single write() syscall when dumping a traceback. It
reduces the risk of getting an unreadable dump when two threads or two
processes dump a traceback to the same file (like stderr) at the same time.
Patch by Victor Stinner.

..

.. bpo: 45828
.. date: 2021-11-17-11-40-21
.. nonce: kQU35U
.. section: Library

:mod:`sqlite` C callbacks now use unraisable exceptions if callback
tracebacks are enabled. Patch by Erlend E. Aasland.

..

.. bpo: 41735
.. date: 2021-11-16-18-13-49
.. nonce: D72UY1
.. section: Library

Fix thread lock in ``zlib.Decompress.flush()`` method before
``PyObject_GetBuffer``.

..

.. bpo: 45235
.. date: 2021-11-11-13-03-17
.. nonce: 8ZbkHa
.. section: Library

Reverted an argparse bugfix that caused regression in the handling of
default arguments for subparsers.  This prevented leaf level arguments from
taking precedence over root level arguments.

..

.. bpo: 45754
.. date: 2021-11-09-15-48-38
.. nonce: c-JDto
.. section: Library

Fix a regression in Python 3.11a1 and 3.11a2 where :mod:`sqlite3`
incorrectly would use ``SQLITE_LIMIT_LENGTH`` when checking SQL statement
lengths. Now, ``SQLITE_LIMIT_SQL_LENGTH`` is used. Patch by Erlend E.
Aasland.

..

.. bpo: 45766
.. date: 2021-11-09-09-18-06
.. nonce: dvbcMf
.. section: Library

Added *proportional* option to :meth:`statistics.linear_regression`.

..

.. bpo: 45765
.. date: 2021-11-09-09-04-19
.. nonce: JVobxK
.. section: Library

In importlib.metadata, fix distribution discovery for an empty path.

..

.. bpo: 45757
.. date: 2021-11-08-23-22-14
.. nonce: MHZHt3
.. section: Library

Fix bug where :mod:`dis` produced an incorrect oparg when
:opcode:`EXTENDED_ARG` is followed by an opcode that does not use its
argument.

..

.. bpo: 45644
.. date: 2021-11-06-17-47-46
.. nonce: ZMqHD_
.. section: Library

In-place JSON file formatting using ``python3 -m json.tool infile infile``
now works correctly, previously it left the file empty.  Patch by Chris
Wesseling.

..

.. bpo: 45703
.. date: 2021-11-03-13-41-49
.. nonce: 35AagL
.. section: Library

When a namespace package is imported before another module from the same
namespace is created/installed in a different :data:`sys.path` location
while the program is running, calling the
:func:`importlib.invalidate_caches` function will now also guarantee the new
module is noticed.

..

.. bpo: 45535
.. date: 2021-10-29-16-28-06
.. nonce: n8NiOE
.. section: Library

Improve output of ``dir()`` with Enums.

..

.. bpo: 45664
.. date: 2021-10-28-23-40-54
.. nonce: 7dqtxQ
.. section: Library

Fix :func:`types.resolve_bases` and :func:`types.new_class` for
:class:`types.GenericAlias` instance as a base.

..

.. bpo: 45663
.. date: 2021-10-28-23-11-59
.. nonce: J90N5R
.. section: Library

Fix :func:`dataclasses.is_dataclass` for dataclasses which are subclasses of
:class:`types.GenericAlias`.

..

.. bpo: 45662
.. date: 2021-10-28-22-58-14
.. nonce: sJd7Ir
.. section: Library

Fix the repr of :data:`dataclasses.InitVar` with a type alias to the
built-in class, e.g. ``InitVar[list[int]]``.

..

.. bpo: 43137
.. date: 2021-10-25-12-51-02
.. nonce: apo7jY
.. section: Library

Launch GNOME web browsers via gio tool instead of obsolete gvfs-open

..

.. bpo: 45429
.. date: 2021-10-25-01-22-49
.. nonce: VaEyN9
.. section: Library

On Windows, :func:`time.sleep` now uses a waitable timer which supports
high-resolution timers. Patch by Dong-hee Na and Eryk Sun.

..

.. bpo: 37295
.. date: 2021-10-18-16-08-55
.. nonce: wBEWH2
.. section: Library

Optimize :func:`math.comb` and :func:`math.perm`.

..

.. bpo: 45514
.. date: 2021-10-18-14-25-35
.. nonce: YmlzIl
.. section: Library

Deprecated legacy functions in :mod:`importlib.resources`.

..

.. bpo: 45507
.. date: 2021-10-18-14-00-01
.. nonce: lDotNV
.. section: Library

Add tests for truncated/missing trailers in gzip.decompress implementation.

..

.. bpo: 45359
.. date: 2021-10-03-22-27-35
.. nonce: LX_uxe
.. section: Library

Implement :pep:`585` for :class:`graphlib.TopologicalSorter`.

..

.. bpo: 44733
.. date: 2021-07-26-13-33-37
.. nonce: 88LrP1
.. section: Library

Add ``max_tasks_per_child`` to
:class:`concurrent.futures.ProcessPoolExecutor`. This allows users to
specify the maximum number of tasks a single process should execute before
the process needs to be restarted.

..

.. bpo: 28806
.. date: 2021-05-24-13-48-34
.. nonce: PkNw5D
.. section: Library

Improve netrc library. netrc file no longer needs to contain all tokens. And
if the login name is anonymous, security check is no longer need.

..

.. bpo: 43498
.. date: 2021-04-20-14-14-16
.. nonce: L_Hq-8
.. section: Library

Avoid a possible *"RuntimeError: dictionary changed size during iteration"*
when adjusting the process count of :class:`ProcessPoolExecutor`.

..

.. bpo: 42158
.. date: 2020-11-10-17-46-12
.. nonce: OhxAiH
.. section: Library

Add MIME types for N-quads, N-triples, Notation3 and TriG to ``mimetypes``.

..

.. bpo: 30533
.. date: 2020-06-16-18-00-56
.. nonce: StL57t
.. section: Library

Add :func:`inspect.getmembers_static` , it return all members without
triggering dynamic lookup via the descriptor protocol. Patch by Weipeng
Hong.

..

.. bpo: 42238
.. date: 2021-11-20-02-46-39
.. nonce: hlfMIc
.. section: Documentation

``make -C Doc suspicious`` will be removed soon in favor of ``make -C Doc
check``, mark it as deprecated.

..

.. bpo: 45840
.. date: 2021-11-19-02-02-32
.. nonce: A51B2S
.. section: Documentation

Improve cross-references in the documentation for the data model.

..

.. bpo: 45640
.. date: 2021-11-18-16-44-12
.. nonce: lSpc2A
.. section: Documentation

Properly marked-up grammar tokens in the documentation are now clickable and
take you to the definition of a given piece of grammar.  Patch by Arthur
Milchior.

..

.. bpo: 45788
.. date: 2021-11-18-00-07-40
.. nonce: qibUoB
.. section: Documentation

Link doc for sys.prefix to sysconfig doc on installation paths.

..

.. bpo: 45772
.. date: 2021-11-09-13-10-55
.. nonce: EdrM3t
.. section: Documentation

``socket.socket`` documentation is corrected to a class from a function.

..

.. bpo: 45392
.. date: 2021-11-06-10-54-17
.. nonce: JZnVOz
.. section: Documentation

Update the docstring of the :class:`type` built-in to remove a redundant
line and to mention keyword arguments for the constructor.

..

.. bpo: 45250
.. date: 2021-10-22-12-09-18
.. nonce: Iit5-Y
.. section: Documentation

Update the documentation to note that CPython does not consistently require
iterators to define ``__iter__``.

..

.. bpo: 25381
.. date: 2021-06-21-17-51-51
.. nonce: 7Kn-_H
.. section: Documentation

In the extending chapter of the extending doc, update a paragraph about the
global variables containing exception information.

..

.. bpo: 43905
.. date: 2021-05-24-05-00-12
.. nonce: tBIndE
.. section: Documentation

Expanded :func:`~dataclasses.astuple` and :func:`~dataclasses.asdict` docs,
warning about deepcopy being applied and providing a workaround.

..

.. bpo: 45695
.. date: 2021-12-03-14-19-16
.. nonce: QKBn2E
.. section: Tests

Out-of-tree builds with a read-only source directory are now tested by CI.

..

.. bpo: 19460
.. date: 2021-11-28-15-25-02
.. nonce: lr0aWs
.. section: Tests

Add new Test for ``Lib/email/mime/nonmultipart.py::MIMENonMultipart``.

..

.. bpo: 45835
.. date: 2021-11-17-14-28-08
.. nonce: Mgyhjx
.. section: Tests

Fix race condition in test_queue tests with multiple "feeder" threads.

..

.. bpo: 45783
.. date: 2021-11-11-13-56-00
.. nonce: 8k1Rng
.. section: Tests

The test for the freeze tool now handles file moves and deletions.

..

.. bpo: 45745
.. date: 2021-11-10-12-01-28
.. nonce: wX5B3K
.. section: Tests

Remove the ``--findleaks`` command line option of regrtest: use the
``--fail-env-changed`` option instead. Since Python 3.7, it was a deprecated
alias to the ``--fail-env-changed`` option.

..

.. bpo: 45701
.. date: 2021-10-31-10-58-45
.. nonce: r0LAUL
.. section: Tests

Add tests with ``tuple`` type with :func:`functools.lru_cache` to
``test_functools``.

..

.. bpo: 44035
.. date: 2021-12-06-09-31-27
.. nonce: BiO4XC
.. section: Build

CI now verifies that autoconf files have been regenerated with a current and
unpatched autoconf package.

..

.. bpo: 45950
.. date: 2021-12-01-17-28-39
.. nonce: eEVLoz
.. section: Build

The build system now uses a :program:`_bootstrap_python` interpreter for
freezing and deepfreezing again. To speed up build process the build tools
:program:`_bootstrap_python` and :program:`_freeze_module` are no longer
build with LTO.

..

.. bpo: 45881
.. date: 2021-11-29-16-32-55
.. nonce: 7597J6
.. section: Build

The :program:`configure` script now accepts ``--with-build-python`` and
``--with-freeze-module`` options to make cross compiling easier.

..

.. bpo: 40280
.. date: 2021-11-29-14-37-29
.. nonce: UlTMR8
.. section: Build

Emscripten platform now uses ``.wasm`` suffix by default.

..

.. bpo: 40280
.. date: 2021-11-29-11-24-45
.. nonce: Knx7d7
.. section: Build

Disable unusable core extension modules on WASM/Emscripten targets.

..

.. bpo: 40280
.. date: 2021-11-26-14-09-04
.. nonce: ZLpwQf
.. section: Build

``configure`` now checks for socket ``shutdown`` function. The check makes
it possible to disable ``SYS_shutdown`` with ``ac_cv_func_shutdown=no`` in
CONFIG_SITE.

..

.. bpo: 40280
.. date: 2021-11-26-09-10-19
.. nonce: xmiMJl
.. section: Build

``configure`` now checks for functions ``fork1, getegid, geteuid, getgid,
getppid, getuid, opendir, pipe, system, wait, ttyname``.

..

.. bpo: 33393
.. date: 2021-11-25-20-26-06
.. nonce: 24YNtM
.. section: Build

Update ``config.guess`` to 2021-06-03 and ``config.sub`` to 2021-08-14.
``Makefile`` now has an ``update-config`` target to make updating more
convenient.

..

.. bpo: 45866
.. date: 2021-11-25-13-53-36
.. nonce: ZH1W8N
.. section: Build

``make regen-all`` now produces the same output when run from a directory
other than the source tree: when building Python out of the source tree.
pegen now strips directory of the "generated by pygen from <FILENAME>"
header Patch by Victor Stinner.

..

.. bpo: 40280
.. date: 2021-11-25-10-55-03
.. nonce: E9-gsQ
.. section: Build

``configure`` now accepts machine ``wasm32`` or ``wasm64`` and OS ``wasi``
or ``emscripten`` for cross building, e.g. ``wasm32-unknown-emscripten``,
``wasm32-wasi``, or ``wasm32-unknown-wasi``.

..

.. bpo: 41498
.. date: 2021-11-25-09-15-04
.. nonce: qAk5eo
.. section: Build

Python now compiles on platforms without ``sigset_t``. Several functions in
:mod:`signal` are not available when ``sigset_t`` is missing.

Based on patch by Roman Yurchak for pyodide.

..

.. bpo: 45881
.. date: 2021-11-24-17-14-06
.. nonce: GTXXLk
.. section: Build

``setup.py`` now uses ``CC`` from environment first to discover multiarch
and cross compile paths.

..

.. bpo: 45886
.. date: 2021-11-23-23-37-49
.. nonce: _Ulnh-
.. section: Build

The ``_freeze_module`` program path can now be overridden on the command
line, e.g. ``make FREEZE_MODULE=../x86_64/Program/_freeze_module``.

..

.. bpo: 45873
.. date: 2021-11-23-04-28-40
.. nonce: 9dldZ4
.. section: Build

Get rid of the ``_bootstrap_python`` build step. The deepfreeze.py script is
now run using ``$(PYTHON_FOR_REGEN)`` which can be Python 3.7 or newer (on
Windows, 3.8 or newer).

..

.. bpo: 45847
.. date: 2021-11-19-17-57-57
.. nonce: 9phcpd
.. section: Build

Port builtin hashlib extensions to ``PY_STDLIB_MOD`` macro and ``addext()``.

..

.. bpo: 45723
.. date: 2021-11-19-15-42-27
.. nonce: vwIJWI
.. section: Build

Add ``autoconf`` helpers for saving and restoring environment variables:

* ``SAVE_ENV``: Save ``$CFLAGS``, ``$LDFLAGS``, ``$LIBS``, and
  ``$CPPFLAGS``.
* ``RESTORE_ENV``: Restore ``$CFLAGS``, ``$LDFLAGS``, ``$LIBS``, and
  ``$CPPFLAGS``.
* ``WITH_SAVE_ENV([SCRIPT])``: Run ``SCRIPT`` wrapped with ``SAVE_ENV`` and
  ``RESTORE_ENV``.

Patch by Erlend E. Aasland.

..

.. bpo: 45573
.. date: 2021-11-18-13-31-02
.. nonce: LCjGB8
.. section: Build

Mandatory core modules, that are required to bootstrap Python, are now in
``Modules/Setup.bootstrap``.

..

.. bpo: 45573
.. date: 2021-11-18-12-18-43
.. nonce: xsMZzn
.. section: Build

``configure`` now creates ``Modules/Setup.stdlib`` with conditionally
enabled/disabled extension module lines. The file is not used, yet.

..

.. bpo: 45573
.. date: 2021-11-17-19-02-51
.. nonce: GMNdun
.. section: Build

``configure`` now uses a unified format to set state, compiler flags, and
linker flags in Makefile. The new macro ``PY_STDLIB_MOD`` sets three
variables that are consumed by ``Modules/Setup`` and ``setup.py``.

..

.. bpo: 45816
.. date: 2021-11-16-14-44-06
.. nonce: nbdmVK
.. section: Build

Python now supports building with Visual Studio 2022 (MSVC v143, VS Version
17.0). Patch by Jeremiah Vivian.

..

.. bpo: 45800
.. date: 2021-11-13-16-40-05
.. nonce: 5Hz6nr
.. section: Build

Settings for :mod:`pyexpat` C extension are now detected by ``configure``.
The bundled ``expat`` library is built in ``Makefile``.

..

.. bpo: 45798
.. date: 2021-11-13-10-18-22
.. nonce: IraaTs
.. section: Build

Settings for :mod:`decimal` internal C extension are now detected by
``configure``. The bundled ``libmpdec`` library is built in ``Makefile``.

..

.. bpo: 45723
.. date: 2021-11-10-16-13-02
.. nonce: B5gCB1
.. section: Build

:program:`configure` has a new option ``--with-pkg-config`` to disable or
require pkg-config.

..

.. bpo: 45774
.. date: 2021-11-09-23-30-12
.. nonce: Mwm3ZR
.. section: Build

The build dependencies for :mod:`sqlite3` are now detected by ``configure``
and ``pkg-config``. Patch by Erlend E. Aasland.

..

.. bpo: 45763
.. date: 2021-11-09-10-15-33
.. nonce: gP-vrX
.. section: Build

The build dependencies for :mod:`zlib`, :mod:`bz2`, and :mod:`lzma` are now
detected by ``configure``.

..

.. bpo: 45747
.. date: 2021-11-08-11-31-48
.. nonce: AODmk_
.. section: Build

gdbm and dbm build dependencies are now detected by ``configure``.

..

.. bpo: 45743
.. date: 2021-11-08-08-58-06
.. nonce: fZ8CTi
.. section: Build

On macOS, the build system no longer passes ``search_paths_first`` to the
linker. The flag has been the default since Xcode 4 / macOS 10.6.

..

.. bpo: 45723
.. date: 2021-11-07-10-45-40
.. nonce: AreusF
.. section: Build

``configure.ac`` is now compatible with autoconf 2.71. Deprecated checks
``STDC_HEADERS`` and ``AC_HEADER_TIME`` have been removed.

..

.. bpo: 45723
.. date: 2021-11-07-10-36-12
.. nonce: JNwKSG
.. section: Build

``configure`` now prints a warning when pkg-config is missing.

..

.. bpo: 45731
.. date: 2021-11-05-20-56-29
.. nonce: 9SDnDf
.. section: Build

``configure --enable-loadable-sqlite-extensions`` is now handled by new
``PY_SQLITE_ENABLE_LOAD_EXTENSION`` macro instead of logic in setup.py.

..

.. bpo: 45723
.. date: 2021-11-05-15-09-49
.. nonce: gfSxur
.. section: Build

configure.ac now uses custom helper macros and ``AC_CACHE_CHECK`` to
simplify and speed up configure runs.

..

.. bpo: 45696
.. date: 2021-11-03-00-19-50
.. nonce: eKs46f
.. section: Build

Skip the marshal step for frozen modules by generating C code that produces
a set of ready-to-use code objects. This speeds up startup time by another
10% or more.

..

.. bpo: 45561
.. date: 2021-10-21-14-38-30
.. nonce: PVqhZE
.. section: Build

Run smelly.py tool from $(srcdir).

..

.. bpo: 46105
.. date: 2021-12-08-16-36-20
.. nonce: t1mJ6Q
.. section: Windows

Fixed calculation of :data:`sys.path` in a venv on Windows.

..

.. bpo: 45901
.. date: 2021-11-26-18-17-41
.. nonce: c5IBqM
.. section: Windows

When installed through the Microsoft Store and set as the default app for
:file:`*.py` files, command line arguments will now be passed to Python when
invoking a script without explicitly launching Python (that is, ``script.py
args`` rather than ``python script.py args``).

..

.. bpo: 45616
.. date: 2021-11-23-11-44-42
.. nonce: K52PLZ
.. section: Windows

Fix Python Launcher's ability to distinguish between versions 3.1 and 3.10
when either one is explicitly requested.  Previously, 3.1 would be used if
3.10 was requested but not installed, and 3.10 would be used if 3.1 was
requested but 3.10 was installed.

..

.. bpo: 45850
.. date: 2021-11-20-00-06-59
.. nonce: q9lofz
.. section: Windows

Implement changes to build with deep-frozen modules on Windows. Note that we
now require Python 3.10 as the "bootstrap" or "host" Python.

..

.. bpo: 45732
.. date: 2021-11-08-21-53-11
.. nonce: idl5kx
.. section: Windows

Updates bundled Tcl/Tk to 8.6.12.

..

.. bpo: 45720
.. date: 2021-11-05-01-05-46
.. nonce: 47Nc5I
.. section: Windows

Internal reference to :file:`shlwapi.dll` was dropped to help improve
startup time. This DLL will no longer be loaded at the start of every Python
process.

..

.. bpo: 45732
.. date: 2021-12-05-23-52-03
.. nonce: -BWrnh
.. section: macOS

Update python.org macOS installer to use Tcl/Tk 8.6.12.

..

.. bpo: 39026
.. date: 2021-11-09-15-42-11
.. nonce: sUnYWn
.. section: C API

Fix Python.h to build C extensions with Xcode: remove a relative include
from ``Include/cpython/pystate.h``.