summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d/3.12.0a4.rst
blob: 8951490f41b94cde05385a2b3cf83ee2dd3d7e57 (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
.. date: 2023-01-06-02-02-11
.. gh-issue: 100776
.. nonce: pP8xux
.. release date: 2023-01-10
.. section: Core and Builtins

Fix misleading default value in :func:`input`'s ``__text_signature__``.

..

.. date: 2023-01-05-17-54-29
.. gh-issue: 99005
.. nonce: cmGwxv
.. section: Core and Builtins

Remove :opcode:`UNARY_POSITIVE`, :opcode:`ASYNC_GEN_WRAP` and
:opcode:`LIST_TO_TUPLE`, replacing them with intrinsics.

..

.. date: 2023-01-05-13-54-00
.. gh-issue: 99005
.. nonce: D7H6j4
.. section: Core and Builtins

Add new :opcode:`CALL_INSTRINSIC_1` instruction. Remove
:opcode:`IMPORT_STAR`, :opcode:`PRINT_EXPR` and
:opcode:`STOPITERATION_ERROR`, replacing them with the
:opcode:`CALL_INSTRINSIC_1` instruction.

..

.. date: 2023-01-04-16-40-55
.. gh-issue: 100288
.. nonce: hRSRaT
.. section: Core and Builtins

Remove the LOAD_ATTR_METHOD_WITH_DICT specialized instruction. Stats show it
is not useful.

..

.. date: 2023-01-03-16-50-42
.. gh-issue: 100720
.. nonce: UhE7P-
.. section: Core and Builtins

Added ``_PyFrame_NumSlotsForCodeObject``, which returns the number of slots
needed in a frame for a given code object.

..

.. date: 2023-01-03-16-38-18
.. gh-issue: 100719
.. nonce: 2C--ko
.. section: Core and Builtins

Removed the co_nplaincellvars field from the code object, as it is
redundant.

..

.. date: 2023-01-01-15-59-48
.. gh-issue: 100637
.. nonce: M2n6Kg
.. section: Core and Builtins

Fix :func:`int.__sizeof__` calculation to include the 1 element ob_digit
array for 0 and False.

..

.. date: 2022-12-31-23-32-09
.. gh-issue: 100649
.. nonce: C0fY4S
.. section: Core and Builtins

Update the native_thread_id field of PyThreadState after fork.

..

.. date: 2022-12-29-04-39-38
.. gh-issue: 100126
.. nonce: pfFJd-
.. section: Core and Builtins

Fix an issue where "incomplete" frames could be briefly visible to C code
while other frames are being torn down, possibly resulting in corruption or
hard crashes of the interpreter while running finalizers.

..

.. date: 2022-12-28-15-02-53
.. gh-issue: 87447
.. nonce: 7-aekA
.. section: Core and Builtins

Fix :exc:`SyntaxError` on comprehension rebind checking with names that are
not actually redefined.

Now reassigning ``b`` in ``[(b := 1) for a, b.prop in some_iter]`` is
allowed. Reassigning ``a`` is still disallowed as per :pep:`572`.

..

.. date: 2022-12-22-21-56-08
.. gh-issue: 100268
.. nonce: xw_phB
.. section: Core and Builtins

Add :meth:`int.is_integer` to improve duck type compatibility between
:class:`int` and :class:`float`.

..

.. date: 2022-12-21-22-48-41
.. gh-issue: 100425
.. nonce: U64yLu
.. section: Core and Builtins

Improve the accuracy of ``sum()`` with compensated summation.

..

.. date: 2022-12-20-16-14-19
.. gh-issue: 100374
.. nonce: YRrVHT
.. section: Core and Builtins

Fix incorrect result and delay in :func:`socket.getfqdn`. Patch by Dominic
Socular.

..

.. date: 2022-12-20-09-56-56
.. gh-issue: 100357
.. nonce: hPyTwY
.. section: Core and Builtins

Convert ``vars``, ``dir``, ``next``, ``getattr``, and ``iter`` to argument
clinic.

..

.. date: 2022-12-17-19-44-57
.. gh-issue: 100117
.. nonce: yRWQ1y
.. section: Core and Builtins

Improve the output of ``co_lines`` by emitting only one entry for each line
range.

..

.. date: 2022-12-15-00-50-25
.. gh-issue: 90043
.. nonce: gyoKdx
.. section: Core and Builtins

Handle NaNs when specializing :opcode:`COMPARE_OP` for :class:`float`
values.

..

.. date: 2022-12-13-16-05-18
.. gh-issue: 100222
.. nonce: OVVvYe
.. section: Core and Builtins

Redefine the ``_Py_CODEUNIT`` typedef as a union to describe its layout to
the C compiler, avoiding type punning and improving clarity.

..

.. date: 2022-12-12-11-27-54
.. gh-issue: 99955
.. nonce: Ix5Rrg
.. section: Core and Builtins

Internal compiler functions (in compile.c) now consistently return -1 on
error and 0 on success.

..

.. date: 2022-12-12-05-30-12
.. gh-issue: 100188
.. nonce: sGCSMR
.. section: Core and Builtins

The ``BINARY_SUBSCR_LIST_INT`` and ``BINARY_SUBSCR_TUPLE_INT`` instructions
are no longer used for negative integers because those instructions always
miss when encountering negative integers.

..

.. date: 2022-12-12-01-05-16
.. gh-issue: 99110
.. nonce: 1JqtIg
.. section: Core and Builtins

Initialize frame->previous in frameobject.c to fix a segmentation fault when
accessing frames created by :c:func:`PyFrame_New`.

..

.. date: 2022-12-12-00-59-11
.. gh-issue: 94155
.. nonce: LWE9y_
.. section: Core and Builtins

Improved the hashing algorithm for code objects, mitigating some hash
collisions.

..

.. date: 2022-12-10-20-00-13
.. gh-issue: 99540
.. nonce: ZZZHeP
.. section: Core and Builtins

``None`` now hashes to a constant value. This is not a requirements change.

..

.. date: 2022-12-09-14-27-36
.. gh-issue: 100143
.. nonce: 5g9rb4
.. section: Core and Builtins

When built with ``--enable-pystats``, stats collection is now off by
default. To enable it early at startup, pass the ``-Xpystats`` flag.  Stats
are now always dumped, even if switched off.

..

.. date: 2022-12-09-13-18-42
.. gh-issue: 100146
.. nonce: xLVKg0
.. section: Core and Builtins

Improve ``BUILD_LIST`` opcode so that it works similarly to the
``BUILD_TUPLE`` opcode, by stealing references from the stack rather than
repeatedly using stack operations to set list elements.  Implementation
details are in a new private API :c:func:`_PyList_FromArraySteal`.

..

.. date: 2022-12-08-12-26-34
.. gh-issue: 100110
.. nonce: ertac-
.. section: Core and Builtins

Specialize ``FOR_ITER`` for tuples.

..

.. date: 2022-12-06-22-24-01
.. gh-issue: 100050
.. nonce: lcrPqQ
.. section: Core and Builtins

Honor existing errors obtained when searching for mismatching parentheses in
the tokenizer. Patch by Pablo Galindo

..

.. date: 2022-12-04-00-38-33
.. gh-issue: 92216
.. nonce: CJXuWB
.. section: Core and Builtins

Improve the performance of :func:`hasattr` for type objects with a missing
attribute.

..

.. date: 2022-11-19-01-11-06
.. gh-issue: 99582
.. nonce: wvOBVy
.. section: Core and Builtins

Freeze :mod:`zipimport` module into ``_bootstrap_python``.

..

.. date: 2022-11-16-05-57-24
.. gh-issue: 99554
.. nonce: A_Ywd2
.. section: Core and Builtins

Pack debugging location tables more efficiently during bytecode compilation.

..

.. date: 2022-10-21-16-10-39
.. gh-issue: 98522
.. nonce: s_SixG
.. section: Core and Builtins

Add an internal version number to code objects, to give better versioning of
inner functions and comprehensions, and thus better specialization of those
functions. This change is invisible to both Python and C extensions.

..

.. date: 2022-07-06-18-44-00
.. gh-issue: 94603
.. nonce: Q_03xV
.. section: Core and Builtins

Improve performance of ``list.pop`` for small lists.

..

.. date: 2022-06-17-08-00-34
.. gh-issue: 89051
.. nonce: yP4Na0
.. section: Core and Builtins

Add :const:`ssl.OP_LEGACY_SERVER_CONNECT`

..

.. bpo: 32782
.. date: 2018-02-06-23-21-13
.. nonce: EJVSfR
.. section: Core and Builtins

``ctypes`` arrays of length 0 now report a correct itemsize when a
``memoryview`` is constructed from them, rather than always giving a value
of 0.

..

.. date: 2023-01-08-12-10-17
.. gh-issue: 100833
.. nonce: f6cT7E
.. section: Library

Speed up :func:`math.fsum` by removing defensive ``volatile`` qualifiers.

..

.. date: 2023-01-07-15-13-47
.. gh-issue: 100805
.. nonce: 05rBz9
.. section: Library

Modify :func:`random.choice` implementation to once again work with NumPy
arrays.

..

.. date: 2023-01-06-22-36-27
.. gh-issue: 100813
.. nonce: mHRdQn
.. section: Library

Add :const:`socket.IP_PKTINFO` constant.

..

.. date: 2023-01-06-14-05-15
.. gh-issue: 100792
.. nonce: CEOJth
.. section: Library

Make :meth:`email.message.Message.__contains__` twice as fast.

..

.. date: 2023-01-05-23-04-15
.. gh-issue: 91851
.. nonce: AuCzU5
.. section: Library

Microoptimizations for :meth:`fractions.Fraction.__round__`,
:meth:`fractions.Fraction.__ceil__` and
:meth:`fractions.Fraction.__floor__`.

..

.. date: 2023-01-04-22-10-31
.. gh-issue: 90104
.. nonce: yZk5EX
.. section: Library

Avoid RecursionError on ``repr`` if a dataclass field definition has a
cyclic reference.

..

.. date: 2023-01-04-12-58-59
.. gh-issue: 100689
.. nonce: Ce0ITG
.. section: Library

Fix crash in :mod:`pyexpat` by statically allocating ``PyExpat_CAPI``
capsule.

..

.. date: 2023-01-04-09-53-38
.. gh-issue: 100740
.. nonce: -j5UjI
.. section: Library

Fix ``unittest.mock.Mock`` not respecting the spec for attribute names
prefixed with ``assert``.

..

.. date: 2023-01-03-11-06-28
.. gh-issue: 91219
.. nonce: s5IFCw
.. section: Library

Change ``SimpleHTTPRequestHandler`` to support subclassing to provide a
different set of index file names instead of using ``__init__`` parameters.

..

.. date: 2023-01-02-16-59-49
.. gh-issue: 100690
.. nonce: 2EgWPS
.. section: Library

``Mock`` objects which are not unsafe will now raise an ``AttributeError``
when accessing an attribute that matches the name of an assertion but
without the prefix ``assert_``, e.g. accessing ``called_once`` instead of
``assert_called_once``. This is in addition to this already happening for
accessing attributes with prefixes ``assert``, ``assret``, ``asert``,
``aseert``, and ``assrt``.

..

.. date: 2023-01-01-23-57-00
.. gh-issue: 89727
.. nonce: ojedHN
.. section: Library

Simplify and optimize :func:`os.walk` by using :func:`isinstance` checks to
check the top of the stack.

..

.. date: 2023-01-01-21-54-46
.. gh-issue: 100485
.. nonce: geNrHS
.. section: Library

Add math.sumprod() to compute the sum of products.

..

.. date: 2022-12-30-07-49-08
.. gh-issue: 86508
.. nonce: nGZDzC
.. section: Library

Fix :func:`asyncio.open_connection` to skip binding to local addresses of
different family. Patch by Kumar Aditya.

..

.. date: 2022-12-29-11-45-22
.. gh-issue: 97930
.. nonce: hrtmJe
.. section: Library

``importlib.resources.files`` now accepts a module as an anchor instead of
only accepting packages. If a module is passed, resources are resolved
adjacent to that module (in the same package or at the package root). The
parameter was renamed from ``package`` to ``anchor`` with a compatibility
shim for those passing by keyword. Additionally, the new ``anchor``
parameter is now optional and will default to the caller's module.

..

.. date: 2022-12-28-17-38-39
.. gh-issue: 100585
.. nonce: BiiTlG
.. section: Library

Fixed a bug where importlib.resources.as_file was leaving file pointers open

..

.. date: 2022-12-28-00-28-43
.. gh-issue: 100562
.. nonce: Hic0Z0
.. section: Library

Improve performance of :meth:`pathlib.Path.absolute` by nearly 2x. This
comes at the cost of a performance regression in :meth:`pathlib.Path.cwd`,
which is generally used less frequently in user code.

..

.. date: 2022-12-24-16-39-53
.. gh-issue: 100519
.. nonce: G_dZLP
.. section: Library

Small simplification of :func:`http.cookiejar.eff_request_host` that
improves readability and better matches the RFC wording.

..

.. date: 2022-12-24-08-42-05
.. gh-issue: 100287
.. nonce: n0oEuG
.. section: Library

Fix the interaction of :func:`unittest.mock.seal` with
:class:`unittest.mock.AsyncMock`.

..

.. date: 2022-12-24-04-13-54
.. gh-issue: 100488
.. nonce: Ut8HbE
.. section: Library

Add :meth:`Fraction.is_integer` to check whether a
:class:`fractions.Fraction` is an integer. This improves duck type
compatibility with :class:`float` and :class:`int`.

..

.. date: 2022-12-23-21-02-43
.. gh-issue: 100474
.. nonce: gppA4U
.. section: Library

:mod:`http.server` now checks that an index page is actually a regular file
before trying to serve it.  This avoids issues with directories named
``index.html``.

..

.. date: 2022-12-20-11-07-30
.. gh-issue: 100363
.. nonce: Wo_Beg
.. section: Library

Speed up :func:`asyncio.get_running_loop` by removing redundant ``getpid``
checks. Patch by Kumar Aditya.

..

.. date: 2022-12-19-20-54-04
.. gh-issue: 78878
.. nonce: JrkYqJ
.. section: Library

Fix crash when creating an instance of :class:`!_ctypes.CField`.

..

.. date: 2022-12-19-19-30-06
.. gh-issue: 100348
.. nonce: o7IAHh
.. section: Library

Fix ref cycle in :class:`!asyncio._SelectorSocketTransport` by removing
``_read_ready_cb`` in ``close``.

..

.. date: 2022-12-19-12-18-28
.. gh-issue: 100344
.. nonce: lfCqpE
.. section: Library

Provide C implementation for :func:`asyncio.current_task` for a 4x-6x
speedup.

..

.. date: 2022-12-15-18-28-13
.. gh-issue: 100272
.. nonce: D1O9Ey
.. section: Library

Fix JSON serialization of OrderedDict.  It now preserves the order of keys.

..

.. date: 2022-12-14-17-37-01
.. gh-issue: 83076
.. nonce: NaYzWT
.. section: Library

Instantiation of ``Mock()`` and ``AsyncMock()`` is now 3.8x faster.

..

.. date: 2022-12-14-11-45-38
.. gh-issue: 100234
.. nonce: kn6yWV
.. section: Library

Set a default value of 1.0 for the ``lambd`` parameter in
random.expovariate().

..

.. date: 2022-12-13-17-29-09
.. gh-issue: 100228
.. nonce: bgtzMV
.. section: Library

A :exc:`DeprecationWarning` may be raised when :func:`os.fork()` or
:func:`os.forkpty()` is called from multi-threaded processes.  Forking with
threads is unsafe and can cause deadlocks, crashes and subtle problems. Lack
of a warning does not indicate that the fork call was actually safe, as
Python may not be aware of all threads.

..

.. date: 2022-12-10-20-52-28
.. gh-issue: 100039
.. nonce: zDqjT4
.. section: Library

Improve signatures for enums and flags.

..

.. date: 2022-12-10-08-36-07
.. gh-issue: 100133
.. nonce: g-zQlp
.. section: Library

Fix regression in :mod:`asyncio` where a subprocess would sometimes lose
data received from pipe.

..

.. bpo: 44592
.. date: 2022-12-09-10-35-36
.. nonce: z-P3oe
.. section: Library

Fixes inconsistent handling of case sensitivity of *extrasaction* arg in
:class:`csv.DictWriter`.

..

.. date: 2022-12-08-06-18-06
.. gh-issue: 100098
.. nonce: uBvPlp
.. section: Library

Fix ``tuple`` subclasses being cast to ``tuple`` when used as enum values.

..

.. date: 2022-12-04-16-12-04
.. gh-issue: 85432
.. nonce: l_ehmI
.. section: Library

Rename the *fmt* parameter of the pure-Python implementation of
:meth:`datetime.time.strftime` to *format*. Rename the *t* parameter of
:meth:`datetime.datetime.fromtimestamp` to *timestamp*. These changes mean
the parameter names in the pure-Python implementation now match the
parameter names in the C implementation. Patch by Alex Waygood.

..

.. date: 2022-12-03-20-06-16
.. gh-issue: 98778
.. nonce: t5U9uc
.. section: Library

Update :exc:`~urllib.error.HTTPError` to be initialized properly, even if
the ``fp`` is ``None``. Patch by Dong-hee Na.

..

.. date: 2022-12-01-15-44-58
.. gh-issue: 99925
.. nonce: x4y6pF
.. section: Library

Unify error messages in JSON serialization between
``json.dumps(float('nan'), allow_nan=False)`` and ``json.dumps(float('nan'),
allow_nan=False, indent=<SOMETHING>)``. Now both include the representation
of the value that could not be serialized.

..

.. date: 2022-11-29-20-44-54
.. gh-issue: 89727
.. nonce: UJZjkk
.. section: Library

Fix issue with :func:`os.walk` where a :exc:`RecursionError` would occur on
deep directory structures by adjusting the implementation of :func:`os.walk`
to be iterative instead of recursive.

..

.. date: 2022-11-23-23-58-45
.. gh-issue: 94943
.. nonce: Oog0Zo
.. section: Library

Add :ref:`enum-dataclass-support` to the :class:`~enum.Enum`
:meth:`~enum.Enum.__repr__`. When inheriting from a
:class:`~dataclasses.dataclass`, only show the field names in the value
section of the member :func:`repr`, and not the dataclass' class name.

..

.. date: 2022-11-21-16-24-01
.. gh-issue: 83035
.. nonce: qZIujU
.. section: Library

Fix :func:`inspect.getsource` handling of decorator calls with nested
parentheses.

..

.. date: 2022-11-20-11-59-54
.. gh-issue: 99576
.. nonce: ZD7jU6
.. section: Library

Fix ``.save()`` method for ``LWPCookieJar`` and ``MozillaCookieJar``: saved
file was not truncated on repeated save.

..

.. date: 2022-11-17-10-02-18
.. gh-issue: 94912
.. nonce: G2aa-E
.. section: Library

Add :func:`inspect.markcoroutinefunction` decorator which manually marks a
function as a coroutine for the benefit of :func:`iscoroutinefunction`.

..

.. date: 2022-11-15-18-45-01
.. gh-issue: 99509
.. nonce: FLK0xU
.. section: Library

Add :pep:`585` support for :class:`multiprocessing.queues.Queue`.

..

.. date: 2022-11-14-19-58-36
.. gh-issue: 99482
.. nonce: XmZyUr
.. section: Library

Remove ``Jython`` partial compatibility code from several stdlib modules.

..

.. date: 2022-11-13-15-32-19
.. gh-issue: 99433
.. nonce: Ys6y0A
.. section: Library

Fix :mod:`doctest` failure on :class:`types.MethodWrapperType` in modules.

..

.. date: 2022-10-28-07-24-34
.. gh-issue: 85267
.. nonce: xUy_Wm
.. section: Library

Several improvements to :func:`inspect.signature`'s handling of
``__text_signature``. - Fixes a case where :func:`inspect.signature` dropped
parameters - Fixes a case where :func:`inspect.signature` raised
:exc:`tokenize.TokenError` - Allows :func:`inspect.signature` to understand
defaults involving binary operations of constants -
:func:`inspect.signature` is documented as only raising :exc:`TypeError` or
:exc:`ValueError`, but sometimes raised :exc:`RuntimeError`. These cases now
raise :exc:`ValueError` - Removed a dead code path

..

.. date: 2022-10-24-07-31-11
.. gh-issue: 91166
.. nonce: -IG06R
.. section: Library

:mod:`asyncio` is optimized to avoid excessive copying when writing to
socket and use :meth:`~socket.socket.sendmsg` if the platform supports it.
Patch by Kumar Aditya.

..

.. date: 2022-10-07-18-16-00
.. gh-issue: 98030
.. nonce: 2oQCZy
.. section: Library

Add missing TCP socket options from Linux: ``TCP_MD5SIG``,
``TCP_THIN_LINEAR_TIMEOUTS``, ``TCP_THIN_DUPACK``, ``TCP_REPAIR``,
``TCP_REPAIR_QUEUE``, ``TCP_QUEUE_SEQ``, ``TCP_REPAIR_OPTIONS``,
``TCP_TIMESTAMP``, ``TCP_CC_INFO``, ``TCP_SAVE_SYN``, ``TCP_SAVED_SYN``,
``TCP_REPAIR_WINDOW``, ``TCP_FASTOPEN_CONNECT``, ``TCP_ULP``,
``TCP_MD5SIG_EXT``, ``TCP_FASTOPEN_KEY``, ``TCP_FASTOPEN_NO_COOKIE``,
``TCP_ZEROCOPY_RECEIVE``, ``TCP_INQ``, ``TCP_TX_DELAY``.

..

.. date: 2022-09-16-08-21-46
.. gh-issue: 88500
.. nonce: jQ0pCc
.. section: Library

Reduced the memory usage of :func:`urllib.parse.unquote` and
:func:`urllib.parse.unquote_to_bytes` on large values.

..

.. date: 2022-08-27-10-35-50
.. gh-issue: 96127
.. nonce: 8RdLre
.. section: Library

``inspect.signature`` was raising ``TypeError`` on call with mock objects.
Now it correctly returns ``(*args, **kwargs)`` as infered signature.

..

.. date: 2022-08-11-10-02-19
.. gh-issue: 95882
.. nonce: FsUr72
.. section: Library

Fix a 3.11 regression in :func:`~contextlib.asynccontextmanager`, which
caused it to propagate exceptions with incorrect tracebacks and fix a 3.11
regression in  :func:`~contextlib.contextmanager`, which caused it to
propagate exceptions with incorrect tracebacks for :exc:`StopIteration`.

..

.. date: 2022-07-01-00-01-22
.. gh-issue: 78707
.. nonce: fHGSuM
.. section: Library

Deprecate passing more than one positional argument to
:meth:`pathlib.PurePath.relative_to` and
:meth:`~pathlib.PurePath.is_relative_to`.

..

.. date: 2022-05-06-01-53-34
.. gh-issue: 92122
.. nonce: 96Lf2p
.. section: Library

Fix reStructuredText syntax errors in docstrings in the :mod:`enum` module.

..

.. date: 2022-04-23-08-12-14
.. gh-issue: 91851
.. nonce: Jd47V6
.. section: Library

Optimize the :class:`~fractions.Fraction` arithmetics for small components.

..

.. bpo: 24132
.. date: 2022-03-05-02-14-09
.. nonce: W6iORO
.. section: Library

Make :class:`pathlib.PurePath` and :class:`~pathlib.Path` subclassable
(private to start). Previously, attempting to instantiate a subclass
resulted in an :exc:`AttributeError` being raised. Patch by Barney Gale.

..

.. bpo: 40447
.. date: 2020-05-03-12-55-55
.. nonce: oKR0Lj
.. section: Library

Accept :class:`os.PathLike` (such as :class:`pathlib.Path`) in the
``stripdir`` arguments of :meth:`compileall.compile_file` and
:meth:`compileall.compile_dir`.

..

.. bpo: 36880
.. date: 2019-05-13-11-37-30
.. nonce: ZgBgH0
.. section: Library

Fix a reference counting issue when a :mod:`ctypes` callback with return
type :class:`~ctypes.py_object` returns ``None``, which could cause crashes.

..

.. date: 2022-12-30-00-42-23
.. gh-issue: 100616
.. nonce: eu80ij
.. section: Documentation

Document existing ``attr`` parameter to :func:`curses.window.vline` function
in :mod:`curses`.

..

.. date: 2022-12-23-21-42-26
.. gh-issue: 100472
.. nonce: NNixfO
.. section: Documentation

Remove claim in documentation that the ``stripdir``, ``prependdir`` and
``limit_sl_dest`` parameters of :func:`compileall.compile_dir` and
:func:`compileall.compile_file` could be :class:`bytes`.

..

.. bpo: 25377
.. date: 2020-06-17-14-47-48
.. nonce: CTxC6o
.. section: Documentation

Clarify use of octal format of mode argument in help(os.chmod) as well as
help(os.fchmod)

..

.. date: 2022-12-23-13-29-55
.. gh-issue: 100454
.. nonce: 3no0cW
.. section: Tests

Start running SSL tests with OpenSSL 3.1.0-beta1.

..

.. date: 2022-12-08-00-03-37
.. gh-issue: 100086
.. nonce: 1zYpto
.. section: Tests

The Python test runner (libregrtest) now logs Python build information like
"debug" vs "release" build, or LTO and PGO optimizations. Patch by Victor
Stinner.

..

.. date: 2022-06-16-13-26-31
.. gh-issue: 93018
.. nonce: wvNx76
.. section: Tests

Make two tests forgiving towards host system libexpat with backported
security fixes applied.

..

.. date: 2022-12-26-15-07-48
.. gh-issue: 100540
.. nonce: l6ToSY
.. section: Build

Removed the ``--with-system-ffi`` ``configure`` option; ``libffi`` must now
always be supplied by the system on all non-Windows platforms.  The option
has had no effect on non-Darwin platforms for several releases, and in 3.11
only had the non-obvious effect of invoking ``pkg-config`` to find
``libffi`` and never setting ``-DUSING_APPLE_OS_LIBFFI``.  Now on Darwin
platforms ``configure`` will first check for the OS ``libffi`` and then fall
back to the same processing as other platforms if it is not found.

..

.. date: 2022-12-08-14-00-04
.. gh-issue: 88267
.. nonce: MqtRbm
.. section: Build

Avoid exporting Python symbols in linked Windows applications when the core
is built as static.

..

.. bpo: 41916
.. date: 2022-03-04-10-47-23
.. nonce: 1d2GLU
.. section: Build

Allow override of ac_cv_cxx_thread so that cross compiled python can set
-pthread for CXX.

..

.. date: 2023-01-09-23-03-57
.. gh-issue: 100180
.. nonce: b5phrg
.. section: Windows

Update Windows installer to OpenSSL 1.1.1s

..

.. date: 2022-12-20-18-36-17
.. gh-issue: 99191
.. nonce: 0cfRja
.. section: Windows

Use ``_MSVC_LANG >= 202002L`` instead of less-precise ``_MSC_VER >=1929`` to
more accurately test for C++20 support in :file:`PC/_wmimodule.cpp`.

..

.. date: 2022-12-09-22-47-42
.. gh-issue: 79218
.. nonce: Yiot2e
.. section: Windows

Define ``MS_WIN64`` for Mingw-w64 64bit, fix cython compilation failure.

..

.. date: 2022-12-06-11-16-46
.. gh-issue: 99941
.. nonce: GmUQ6o
.. section: Windows

Ensure that :func:`asyncio.Protocol.data_received` receives an immutable
:class:`bytes` object (as documented), instead of :class:`bytearray`.

..

.. bpo: 43984
.. date: 2021-05-02-15-29-33
.. nonce: U92jiv
.. section: Windows

:meth:`winreg.SetValueEx` now leaves the target value untouched in the case
of conversion errors. Previously, ``-1`` would be written in case of such
errors.

..

.. bpo: 34816
.. date: 2021-04-08-00-36-37
.. nonce: 4Xe0id
.. section: Windows

``hasattr(ctypes.windll, 'nonexistant')`` now returns ``False`` instead of
raising :exc:`OSError`.

..

.. date: 2023-01-09-22-04-21
.. gh-issue: 100180
.. nonce: WVhCny
.. section: macOS

Update macOS installer to OpenSSL 1.1.1s

..

.. date: 2022-12-26-14-52-37
.. gh-issue: 100540
.. nonce: kYZLtX
.. section: macOS

Removed obsolete ``dlfcn.h`` shim from the ``_ctypes`` extension module,
which has not been necessary since Mac OS X 10.2.

..

.. bpo: 45256
.. date: 2022-12-29-19-22-11
.. nonce: a0ee_H
.. section: Tools/Demos

Fix a bug that caused an :exc:`AttributeError` to be raised in
``python-gdb.py`` when ``py-locals`` is used without a frame.

..

.. date: 2022-12-19-10-08-53
.. gh-issue: 100342
.. nonce: qDFlQG
.. section: Tools/Demos

Add missing ``NULL`` check for possible allocation failure in ``*args``
parsing in Argument Clinic.

..

.. date: 2022-12-02-09-31-19
.. gh-issue: 99947
.. nonce: Ski7OC
.. section: C API

Raising SystemError on import will now have its cause be set to the original
unexpected exception.

..

.. date: 2022-11-30-16-39-22
.. gh-issue: 99240
.. nonce: 67nAX-
.. section: C API

In argument parsing, after deallocating newly allocated memory, reset its
pointer to NULL.

..

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

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