summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d/3.12.0a7.rst
blob: a859be8a0474561247875884303d1810df2efc53 (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
.. date: 2023-03-31-12-22-25
.. gh-issue: 102192
.. nonce: gYxJP_
.. release date: 2023-04-04
.. section: Core and Builtins

Deprecated ``_PyErr_ChainExceptions`` in favour of
``_PyErr_ChainExceptions1``.

..

.. date: 2023-03-24-02-50-33
.. gh-issue: 89987
.. nonce: oraTzh
.. section: Core and Builtins

Reduce the number of inline :opcode:`CACHE` entries for
:opcode:`BINARY_SUBSCR`.

..

.. date: 2023-03-21-00-46-36
.. gh-issue: 102859
.. nonce: PRkGca
.. section: Core and Builtins

Removed :opcode:`!JUMP_IF_FALSE_OR_POP` and :opcode:`!JUMP_IF_TRUE_OR_POP`
instructions.

..

.. date: 2023-03-18-02-36-39
.. gh-issue: 101975
.. nonce: HwMR1d
.. section: Core and Builtins

Fixed ``stacktop`` value on tracing entries to avoid corruption on garbage
collection.

..

.. date: 2023-03-17-13-43-34
.. gh-issue: 102778
.. nonce: ANDv8I
.. section: Core and Builtins

Add :data:`sys.last_exc` and deprecate :data:`sys.last_type`,
:data:`sys.last_value` and :data:`sys.last_traceback`, which hold the same
information in its legacy form.

..

.. date: 2023-03-17-12-09-45
.. gh-issue: 100982
.. nonce: Pf_BI6
.. section: Core and Builtins

Replace all occurrences of ``COMPARE_AND_BRANCH`` with :opcode:`COMPARE_OP`.

..

.. date: 2023-03-16-17-24-44
.. gh-issue: 102701
.. nonce: iNGVaS
.. section: Core and Builtins

Fix overflow when creating very large dict.

..

.. date: 2023-03-16-14-44-29
.. gh-issue: 102755
.. nonce: j1GxlV
.. section: Core and Builtins

Add :c:func:`PyErr_DisplayException` which takes just an exception instance,
to replace the legacy :c:func:`PyErr_Display` which takes the ``(typ, exc,
tb)`` triplet.

..

.. date: 2023-03-14-00-11-46
.. gh-issue: 102594
.. nonce: BjU-m2
.. section: Core and Builtins

Add note to exception raised in ``PyErr_SetObject`` when normalization
fails.

..

.. date: 2023-03-09-13-57-35
.. gh-issue: 90997
.. nonce: J-Yhn2
.. section: Core and Builtins

Shrink the number of inline :opcode:`CACHE` entries used by
:opcode:`LOAD_GLOBAL`.

..

.. date: 2023-03-08-08-37-36
.. gh-issue: 102491
.. nonce: SFvvsC
.. section: Core and Builtins

Improve import time of ``platform`` by removing IronPython version parsing.
The IronPython version parsing was not functional (see
https://github.com/IronLanguages/ironpython3/issues/1667).

..

.. date: 2023-03-06-10-02-22
.. gh-issue: 101291
.. nonce: 0FT2QS
.. section: Core and Builtins

Rearrage bits in first field (after header) of PyLongObject. * Bits 0 and 1:
1 - sign. I.e. 0 for positive numbers, 1 for zero and 2 for negative
numbers. * Bit 2 reserved (probably for the immortal bit) * Bits 3+ the
unsigned size.

This makes a few operations slightly more efficient, and will enable a more
compact and faster 2s-complement representation of most ints in future.

..

.. date: 2023-03-04-06-48-34
.. gh-issue: 102397
.. nonce: ACJaOf
.. section: Core and Builtins

Fix segfault from race condition in signal handling during garbage
collection. Patch by Kumar Aditya.

..

.. date: 2023-03-03-23-21-16
.. gh-issue: 102406
.. nonce: XLqYO3
.. section: Core and Builtins

:mod:`codecs` encoding/decoding errors now get the context information
(which operation and which codecs) attached as :pep:`678` notes instead of
through chaining a new instance of the exception.

..

.. date: 2023-03-02-13-49-21
.. gh-issue: 102281
.. nonce: QCuu2N
.. section: Core and Builtins

Fix potential nullptr dereference and use of uninitialized memory in
fileutils. Patch by Max Bachmann.

..

.. date: 2023-02-27-15-48-31
.. gh-issue: 102300
.. nonce: 8o-_Mt
.. section: Core and Builtins

Reuse operands with refcount of 1 in float specializations of BINARY_OP.

..

.. date: 2023-02-26-13-12-55
.. gh-issue: 102213
.. nonce: fTH8X7
.. section: Core and Builtins

Fix performance loss when accessing an object's attributes with
``__getattr__``  defined.

..

.. date: 2023-02-26-11-43-56
.. gh-issue: 102255
.. nonce: cRnI5x
.. section: Core and Builtins

Improve build support for the Xbox. Patch by Max Bachmann.

..

.. date: 2023-02-21-23-42-39
.. gh-issue: 102027
.. nonce: fQARG0
.. section: Core and Builtins

Fix SSE2 and SSE3 detection in ``_blake2`` internal module. Patch by Max
Bachmann.

..

.. date: 2023-02-21-17-22-06
.. gh-issue: 101865
.. nonce: fwrTOA
.. section: Core and Builtins

Deprecate ``co_lnotab`` in code objects, schedule it for removal in Python
3.14

..

.. bpo: 1635741
.. date: 2020-07-04-09-04-41
.. nonce: ZsP31Y
.. section: Core and Builtins

Adapt :mod:`!_pickle` to :pep:`687`. Patch by Mohamed Koubaa and Erlend
Aasland.

..

.. date: 2023-03-28-15-12-53
.. gh-issue: 103085
.. nonce: DqNehf
.. section: Library

Pure python :func:`locale.getencoding()` will not warn deprecation.

..

.. date: 2023-03-28-05-14-59
.. gh-issue: 103068
.. nonce: YQTmrA
.. section: Library

It's no longer possible to register conditional breakpoints in
:class:`~pdb.Pdb` that raise :exc:`SyntaxError`. Patch by Tian Gao.

..

.. date: 2023-03-27-19-21-51
.. gh-issue: 102549
.. nonce: NQ6Nlv
.. section: Library

Don't ignore exceptions in member type creation.

..

.. date: 2023-03-27-15-01-16
.. gh-issue: 103056
.. nonce: -Efh5Q
.. section: Library

Ensure final ``_generate_next_value_`` is a ``staticmethod``.

..

.. date: 2023-03-26-20-54-57
.. gh-issue: 103046
.. nonce: xBlA2l
.. section: Library

Display current line label correctly in :mod:`dis` when ``show_caches`` is
False and ``lasti`` points to a CACHE entry.

..

.. date: 2023-03-25-16-57-18
.. gh-issue: 102433
.. nonce: L-7x2Q
.. section: Library

:func:`isinstance` checks against :func:`runtime-checkable protocols
<typing.runtime_checkable>` now use :func:`inspect.getattr_static` rather
than :func:`hasattr` to lookup whether attributes exist. This means that
descriptors and :meth:`~object.__getattr__` methods are no longer
unexpectedly evaluated during ``isinstance()`` checks against
runtime-checkable protocols. However, it may also mean that some objects
which used to be considered instances of a runtime-checkable protocol may no
longer be considered instances of that protocol on Python 3.12+, and vice
versa. Most users are unlikely to be affected by this change. Patch by Alex
Waygood.

..

.. date: 2023-03-25-02-08-05
.. gh-issue: 103023
.. nonce: Qfn7Hl
.. section: Library

It's no longer possible to register expressions to display in
:class:`~pdb.Pdb` that raise :exc:`SyntaxError`. Patch by Tian Gao.

..

.. date: 2023-03-23-13-34-33
.. gh-issue: 102947
.. nonce: cTwcpU
.. section: Library

Improve traceback when :func:`dataclasses.fields` is called on a
non-dataclass. Patch by Alex Waygood

..

.. date: 2023-03-22-16-15-18
.. gh-issue: 102780
.. nonce: NEcljy
.. section: Library

The :class:`asyncio.Timeout` context manager now works reliably even when
performing cleanup due to task cancellation.  Previously it could raise a
:exc:`~asyncio.CancelledError` instead of an :exc:`~asyncio.TimeoutError` in
such cases.

..

.. date: 2023-03-21-15-17-07
.. gh-issue: 102871
.. nonce: U9mchn
.. section: Library

Remove support for obsolete browsers from :mod:`webbrowser`. Removed
browsers include Grail, Mosaic, Netscape, Galeon, Skipstone, Iceape,
Firebird, and Firefox versions 35 and below.

..

.. date: 2023-03-20-12-21-19
.. gh-issue: 102839
.. nonce: RjRi12
.. section: Library

Improve performance of :func:`math.log` arguments handling by removing the
argument clinic.

..

.. date: 2023-03-19-15-30-59
.. gh-issue: 102828
.. nonce: NKClXg
.. section: Library

Add the ``onexc`` arg to :func:`shutil.rmtree`, which is like ``onerror``
but expects an exception instance rather than an exc_info tuple. Deprecate
``onerror``.

..

.. date: 2023-03-18-14-59-21
.. gh-issue: 88965
.. nonce: kA70Km
.. section: Library

typing: Fix a bug relating to substitution in custom classes generic over a
:class:`~typing.ParamSpec`. Previously, if the ``ParamSpec`` was substituted
with a parameters list that itself contained a :class:`~typing.TypeVar`, the
``TypeVar`` in the parameters list could not be subsequently substituted.
This is now fixed.

Patch by Nikita Sobolev.

..

.. date: 2023-03-17-19-14-26
.. gh-issue: 76846
.. nonce: KEamjK
.. section: Library

Fix issue where ``__new__()`` and ``__init__()`` methods of
:class:`pathlib.PurePath` and :class:`~pathlib.Path` subclasses were not
called in some circumstances.

..

.. date: 2023-03-16-16-43-04
.. gh-issue: 78530
.. nonce: Lr8eq_
.. section: Library

:func:`asyncio.wait` now accepts generators yielding tasks. Patch by Kumar
Aditya.

..

.. date: 2023-03-16-08-17-29
.. gh-issue: 102748
.. nonce: WNACpI
.. section: Library

:func:`asyncio.iscoroutine` now returns ``False`` for generators as
:mod:`asyncio` does not support legacy generator-based coroutines. Patch by
Kumar Aditya.

..

.. date: 2023-03-13-18-27-00
.. gh-issue: 102670
.. nonce: GyoThv
.. section: Library

Optimized fmean(), correlation(), covariance(), and linear_regression()
using the new math.sumprod() function.

..

.. date: 2023-03-13-12-05-55
.. gh-issue: 102615
.. nonce: NcA_ZL
.. section: Library

Typing: Improve the ``repr`` of generic aliases for classes generic over a
:class:`~typing.ParamSpec`. (Use square brackets to represent a parameter
list.)

..

.. date: 2023-03-10-13-51-21
.. gh-issue: 100112
.. nonce: VHh4mw
.. section: Library

:meth:`asyncio.Task.get_coro` now always returns a coroutine when wrapping
an awaitable object. Patch by Kumar Aditya.

..

.. date: 2023-03-10-13-21-16
.. gh-issue: 102578
.. nonce: -gujoI
.. section: Library

Speed up setting or deleting mutable attributes on non-dataclass subclasses
of frozen dataclasses. Due to the implementation of ``__setattr__`` and
``__delattr__`` for frozen dataclasses, this previously had a time
complexity of *O*\ (*n*). It now has a time complexity of *O*\ (1).

..

.. date: 2023-03-08-23-08-38
.. gh-issue: 102519
.. nonce: wlcsFI
.. section: Library

Add :func:`os.listdrives`, :func:`os.listvolumes` and :func:`os.listmounts`
functions on Windows for enumerating drives, volumes and mount points

..

.. date: 2023-03-04-20-58-29
.. gh-issue: 74468
.. nonce: Ac5Ew_
.. section: Library

Attribute name of the extracted :mod:`tarfile` file object now holds
filename of itself rather than of the archive it is contained in. Patch by
Oleg Iarygin.

..

.. date: 2023-03-03-19-53-08
.. gh-issue: 102378
.. nonce: kRdOZc
.. section: Library

Private helper method ``inspect._signature_strip_non_python_syntax`` will no
longer strip ``/`` from the input string.

..

.. date: 2023-02-26-17-29-57
.. gh-issue: 79940
.. nonce: SAfmAy
.. section: Library

Add :func:`inspect.getasyncgenstate` and :func:`inspect.getasyncgenlocals`.
Patch by Thomas Krennwallner.

..

.. date: 2023-02-21-11-56-16
.. gh-issue: 102103
.. nonce: Dj0WEj
.. section: Library

Add ``module`` argument to :func:`dataclasses.make_dataclass` and make
classes produced by it pickleable.

..

.. date: 2023-02-20-16-47-56
.. gh-issue: 102069
.. nonce: FS7f1j
.. section: Library

Fix ``__weakref__`` descriptor generation for custom dataclasses.

..

.. date: 2023-02-19-01-49-46
.. gh-issue: 102038
.. nonce: n3if3D
.. section: Library

Skip a ``stat`` in :mod:`site` if we have already found a ``pyvenv.cfg``

..

.. date: 2023-02-18-23-03-50
.. gh-issue: 98886
.. nonce: LkKGWv
.. section: Library

Fix issues when defining dataclasses that have fields with specific
underscore names that aren't clearly reserved by :mod:`dataclasses`.

..

.. date: 2023-02-09-19-40-41
.. gh-issue: 101673
.. nonce: mX-Ppq
.. section: Library

Fix a :mod:`pdb` bug where ``ll`` clears the changes to local variables.

..

.. date: 2023-01-27-14-51-07
.. gh-issue: 101313
.. nonce: 10AEXh
.. section: Library

Added -h and --help arguments to the webbrowser CLI

..

.. date: 2022-12-20-10-55-14
.. gh-issue: 100372
.. nonce: utfP65
.. section: Library

:meth:`ssl.SSLContext.load_verify_locations` no longer incorrectly accepts
some cases of trailing data when parsing DER.

..

.. date: 2022-12-16-10-27-58
.. gh-issue: 89727
.. nonce: y64ZLM
.. section: Library

Fix pathlib.Path.walk RecursionError on deep directory trees by rewriting it
using iteration instead of recursion.

..

.. date: 2022-12-09-11-21-38
.. gh-issue: 100131
.. nonce: v863yR
.. section: Library

Added an optional ``delete`` keyword argument to
:class:`tempfile.TemporaryDirectory`.

..

.. date: 2022-11-24-13-23-07
.. gh-issue: 48330
.. nonce: 6uAX9F
.. section: Library

Added ``--durations`` command line option, showing the N slowest test cases.
:class:`unittest.TextTestRunner` and :class:`unittest.TextTestResult`
constructors accept a new *durations* keyword argument. Subclasses should
take this into account or accept ``**kwargs``. Added
:meth:`unittest.TestResult.addDuration` method and
:attr:`unittest.TestResult.collectedDurations` attribute.

(Contributed by Giampaolo Rodola)

..

.. date: 2022-10-10-19-14-51
.. gh-issue: 98169
.. nonce: DBWIxL
.. section: Library

Fix :func:`dataclasses.astuple` crash when :class:`collections.defaultdict`
is present in the attributes.

..

.. date: 2022-09-19-08-12-58
.. gh-issue: 96931
.. nonce: x0WQhh
.. section: Library

Fix incorrect results from :meth:`ssl.SSLSocket.shared_ciphers`

..

.. date: 2022-07-30-23-01-43
.. gh-issue: 95495
.. nonce: RA-q1d
.. section: Library

When built against OpenSSL 3.0, the :mod:`ssl` module had a bug where it
reported unauthenticated EOFs (i.e. without close_notify) as a clean
TLS-level EOF. It now raises :exc:`~ssl.SSLEOFError`, matching the behavior
in previous versions of OpenSSL. The :attr:`~ssl.SSLContext.options`
attribute on :class:`~ssl.SSLContext` also no longer includes
:const:`~ssl.OP_IGNORE_UNEXPECTED_EOF` by default. This option may be set to
specify the previous OpenSSL 3.0 behavior.

..

.. date: 2022-07-09-13-07-30
.. gh-issue: 94684
.. nonce: nV5yno
.. section: Library

Now :func:`uuid.uuid3` and :func:`uuid.uuid5` functions support
:class:`bytes` objects as their *name* argument.

..

.. date: 2022-06-30-21-28-41
.. gh-issue: 94440
.. nonce: LtgX0d
.. section: Library

Fix a :mod:`concurrent.futures.process` bug where ``ProcessPoolExecutor``
shutdown could hang after a future has been quickly submitted and canceled.

..

.. date: 2022-04-11-18-34-33
.. gh-issue: 72346
.. nonce: pC7gnM
.. section: Library

Added deprecation warning to *isdst* parameter of
:func:`email.utils.localtime`.

..

.. bpo: 36305
.. date: 2019-03-15-22-50-27
.. nonce: Pbkv6u
.. section: Library

Fix handling of Windows filenames that resemble drives, such as ``./a:b``,
in :mod:`pathlib`.

..

.. date: 2023-03-29-14-51-39
.. gh-issue: 103112
.. nonce: XgGSEO
.. section: Documentation

Add docstring to :meth:`http.client.HTTPResponse.read` to fix ``pydoc``
output.

..

.. date: 2023-03-23-23-25-18
.. gh-issue: 102980
.. nonce: Zps4QF
.. section: Tests

Improve test coverage on :mod:`pdb`.

..

.. date: 2023-03-08-13-54-20
.. gh-issue: 102537
.. nonce: Vfplpb
.. section: Tests

Adjust the error handling strategy in
``test_zoneinfo.TzPathTest.python_tzpath_context``. Patch by Paul Ganssle.

..

.. date: 2023-01-27-18-10-40
.. gh-issue: 101377
.. nonce: IJGpqh
.. section: Tests

Improved test_locale_calendar_formatweekday of calendar.

..

.. date: 2023-03-23-20-58-56
.. gh-issue: 102973
.. nonce: EaJUrw
.. section: Build

Add a dev container (along with accompanying Dockerfile) for development
purposes.

..

.. date: 2023-03-15-02-03-39
.. gh-issue: 102711
.. nonce: zTkjts
.. section: Build

Fix ``-Wstrict-prototypes`` compiler warnings.

..

.. date: 2023-03-14-10-52-43
.. gh-issue: 102690
.. nonce: sbXtqk
.. section: Windows

Update :mod:`webbrowser` to fall back to Microsoft Edge instead of Internet
Explorer.

..

.. date: 2023-02-22-17-26-10
.. gh-issue: 99726
.. nonce: 76t957
.. section: Windows

Improves correctness of stat results for Windows, and uses faster API when
available

..

.. date: 2023-03-21-01-27-07
.. gh-issue: 102809
.. nonce: 2F1Byz
.. section: Tools/Demos

``Misc/gdbinit`` was removed.

..

.. date: 2023-02-18-00-55-14
.. gh-issue: 102013
.. nonce: 83mrtI
.. section: C API

Add a new (unstable) C-API function for iterating over GC'able objects using
a callback: ``PyUnstable_VisitObjects``.