aboutsummaryrefslogtreecommitdiff
path: root/Misc/NEWS.d/3.11.2.rst
blob: 3f4ff595501caa1edb6f50dc24c84e865edddebb (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
.. date: 2023-02-06-20-13-36
.. gh-issue: 92173
.. nonce: RQE0mk
.. release date: 2023-02-07
.. section: Core and Builtins

Fix the ``defs`` and ``kwdefs`` arguments to :c:func:`PyEval_EvalCodeEx` and
a reference leak in that function.

..

.. date: 2023-01-30-08-59-47
.. gh-issue: 101400
.. nonce: Di_ZFm
.. section: Core and Builtins

Fix wrong lineno in exception message on :keyword:`continue` or
:keyword:`break` which are not in a loop. Patch by Dong-hee Na.

..

.. date: 2023-01-28-20-31-42
.. gh-issue: 101372
.. nonce: 8BcpCC
.. section: Core and Builtins

Fix :func:`~unicodedata.is_normalized` to properly handle the UCD 3.2.0
cases. Patch by Dong-hee Na.

..

.. date: 2023-01-15-03-26-04
.. gh-issue: 101046
.. nonce: g2CM4S
.. section: Core and Builtins

Fix a possible memory leak in the parser when raising :exc:`MemoryError`.
Patch by Pablo Galindo

..

.. date: 2023-01-14-17-03-08
.. gh-issue: 101037
.. nonce: 9ATNuf
.. section: Core and Builtins

Fix potential memory underallocation issue for instances of :class:`int`
subclasses with value zero.

..

.. date: 2023-01-11-22-52-19
.. gh-issue: 100942
.. nonce: ontOy_
.. section: Core and Builtins

Fixed segfault in property.getter/setter/deleter that occurred when a
property subclass overrode the ``__new__`` method to return a non-property
instance.

..

.. date: 2023-01-10-14-11-17
.. gh-issue: 100892
.. nonce: qfBVYI
.. section: Core and Builtins

Fix race while iterating over thread states in clearing
:class:`threading.local`. Patch by Kumar Aditya.

..

.. date: 2023-01-06-02-02-11
.. gh-issue: 100776
.. nonce: pP8xux
.. section: Core and Builtins

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

..

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

..

.. 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-02-05-14-39-49
.. gh-issue: 101541
.. nonce: Mo3ppp
.. section: Library

[Enum] - fix psuedo-flag creation

..

.. date: 2023-01-25-18-07-20
.. gh-issue: 101326
.. nonce: KL4SFv
.. section: Library

Fix regression when passing ``None`` as second or third argument to
``FutureIter.throw``.

..

.. date: 2023-01-21-16-50-22
.. gh-issue: 100795
.. nonce: NPMZf7
.. section: Library

Avoid potential unexpected ``freeaddrinfo`` call (double free) in
:mod:`socket` when when a libc ``getaddrinfo()`` implementation leaves
garbage in an output pointer when returning an error. Original patch by
Sergey G. Brester.

..

.. date: 2023-01-20-10-46-59
.. gh-issue: 101143
.. nonce: hJo8hu
.. section: Library

Remove unused references to :class:`~asyncio.TimerHandle` in
``asyncio.base_events.BaseEventLoop._add_callback``.

..

.. date: 2023-01-18-17-58-50
.. gh-issue: 101144
.. nonce: FHd8Un
.. section: Library

Make :func:`zipfile.Path.open` and :func:`zipfile.Path.read_text` also
accept ``encoding`` as a positional argument. This was the behavior in
Python 3.9 and earlier.  3.10 introduced a regression where supplying it as
a positional argument would lead to a :exc:`TypeError`.

..

.. date: 2023-01-14-12-58-21
.. gh-issue: 101015
.. nonce: stWFid
.. section: Library

Fix :func:`typing.get_type_hints` on ``'*tuple[...]'`` and ``*tuple[...]``.
It must not drop the ``Unpack`` part.

..

.. date: 2023-01-12-01-18-13
.. gh-issue: 100573
.. nonce: KDskqo
.. section: Library

Fix a Windows :mod:`asyncio` bug with named pipes where a client doing
``os.stat()`` on the pipe would cause an error in the server that disabled
serving future requests.

..

.. 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-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-14-42-59
.. gh-issue: 100750
.. nonce: iFJs5Y
.. section: Library

pass encoding kwarg to subprocess in platform

..

.. 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: 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-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-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-21-18-29-24
.. gh-issue: 100160
.. nonce: isBmL5
.. section: Library

Remove any deprecation warnings in :func:`asyncio.get_event_loop`. They are
deferred to Python 3.12.

..

.. date: 2022-12-19-23-19-26
.. gh-issue: 96290
.. nonce: qFjsi6
.. section: Library

Fix handling of partial and invalid UNC drives in ``ntpath.splitdrive()``,
and in ``ntpath.normpath()`` on non-Windows systems. Paths such as
'\\server' and '\\' are now considered by ``splitdrive()`` to contain only a
drive, and consequently are not modified by ``normpath()`` on non-Windows
systems. The behaviour of ``normpath()`` on Windows systems is unaffected,
as native OS APIs are used. Patch by Eryk Sun, with contributions by Barney
Gale.

..

.. 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-11-14-38-59
.. gh-issue: 99952
.. nonce: IYGLzr
.. section: Library

Fix a reference undercounting issue in :class:`ctypes.Structure` with
``from_param()`` results larger than a C pointer.

..

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

..

.. 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-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-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-13-15-32-19
.. gh-issue: 99433
.. nonce: Ys6y0A
.. section: Library

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

..

.. date: 2022-11-08-15-54-43
.. gh-issue: 99240
.. nonce: MhYwcz
.. section: Library

Fix double-free bug in Argument Clinic ``str_converter`` by extracting
memory clean up to a new ``post_parsing`` section.

..

.. date: 2022-11-08-11-18-51
.. gh-issue: 64490
.. nonce: VcBgrN
.. section: Library

Fix refcount error when arguments are packed to tuple in Argument Clinic.

..

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

..

.. bpo: 44817
.. date: 2021-08-03-05-31-00
.. nonce: wOW_Qn
.. section: Library

Ignore WinError 53 (ERROR_BAD_NETPATH), 65 (ERROR_NETWORK_ACCESS_DENIED) and
161 (ERROR_BAD_PATHNAME) when using ntpath.realpath().

..

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

..

.. date: 2022-12-02-17-08-08
.. gh-issue: 99931
.. nonce: wC46hE
.. section: Documentation

Use `sphinxext-opengraph <https://sphinxext-opengraph.readthedocs.io/>`__ to
generate `OpenGraph metadata <https://ogp.me/>`__.

..

.. date: 2023-02-04-17-24-33
.. gh-issue: 101334
.. nonce: _yOqwg
.. section: Tests

``test_tarfile`` has been updated to pass when run as a high UID.

..

.. 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-08-22-15-49-14
.. gh-issue: 96002
.. nonce: 4UE9UE
.. section: Tests

Add functional test for Argument Clinic.

..

.. date: 2023-02-02-23-43-46
.. gh-issue: 101522
.. nonce: lnUDta
.. section: Build

Allow overriding Windows dependencies versions and paths using MSBuild
properties.

..

.. date: 2023-02-03-17-53-06
.. gh-issue: 101543
.. nonce: cORAT4
.. section: Windows

Ensure the install path in the registry is only used when the standard
library hasn't been located in any other way.

..

.. date: 2023-01-31-16-50-07
.. gh-issue: 101467
.. nonce: ye9t-L
.. section: Windows

The ``py.exe`` launcher now correctly filters when only a single runtime is
installed. It also correctly handles prefix matches on tags so that ``-3.1``
does not match ``3.11``, but would still match ``3.1-32``.

..

.. date: 2023-01-18-18-25-18
.. gh-issue: 101135
.. nonce: HF9VlG
.. section: Windows

Restore ability to launch older 32-bit versions from the :file:`py.exe`
launcher when both 32-bit and 64-bit installs of the same version are
available.

..

.. date: 2023-01-17-18-17-58
.. gh-issue: 82052
.. nonce: mWyysT
.. section: Windows

Fixed an issue where writing more than 32K of Unicode output to the console
screen in one go can result in mojibake.

..

.. date: 2023-01-11-16-28-09
.. gh-issue: 100320
.. nonce: 2DU2it
.. section: Windows

Ensures the ``PythonPath`` registry key from an install is used when
launching from a different copy of Python that relies on an existing install
to provide a copy of its modules and standard library.

..

.. date: 2023-01-11-14-42-11
.. gh-issue: 100247
.. nonce: YfEmSz
.. section: Windows

Restores support for the :file:`py.exe` launcher finding shebang commands in
its configuration file using the full command name.

..

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

Update Windows installer to OpenSSL 1.1.1s

..

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

..

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

Update macOS installer to OpenSSL 1.1.1s

..

.. 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-08-11-09-58-15
.. gh-issue: 64490
.. nonce: PjwhM4
.. section: Tools/Demos

Argument Clinic varargs bugfixes

* Fix out-of-bounds error in :c:func:`!_PyArg_UnpackKeywordsWithVararg`.
* Fix incorrect check which allowed more than one varargs in clinic.py.
* Fix miscalculation of ``noptargs`` in generated code.
* Do not generate ``noptargs`` when there is a vararg argument and no optional argument.

..

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