• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1.. date: 2022-11-04-09-29-36
2.. gh-issue: 98433
3.. nonce: l76c5G
4.. release date: 2022-11-14
5.. section: Security
6
7The IDNA codec decoder used on DNS hostnames by :mod:`socket` or
8:mod:`asyncio` related name resolution functions no longer involves a
9quadratic algorithm. This prevents a potential CPU denial of service if an
10out-of-spec excessive length hostname involving bidirectional characters
11were decoded. Some protocols such as :mod:`urllib` http :samp:`3{xx}` redirects
12potentially allow for an attacker to supply such a name.
13
14Individual labels within an IDNA encoded DNS name will now raise an error
15early during IDNA decoding if they are longer than 1024 unicode characters
16given that each decoded DNS label must be 63 or fewer characters and the
17entire decoded DNS name is limited to 255. Only an application presenting a
18hostname or label consisting primarily of :rfc:`3454` section 3.1 "Nothing"
19characters to be removed would run into of this new limit. See also
20:rfc:`5894` section 6 and :rfc:`3491`.
21
22..
23
24.. date: 2022-10-26-21-04-23
25.. gh-issue: 98739
26.. nonce: keBWcY
27.. section: Security
28
29Update bundled libexpat to 2.5.0
30
31..
32
33.. date: 2022-11-11-14-48-17
34.. gh-issue: 81057
35.. nonce: ik4iOv
36.. section: Core and Builtins
37
38The docs clearly say that ``PyImport_Inittab``,
39:c:func:`PyImport_AppendInittab`, and :c:func:`PyImport_ExtendInittab`
40should not be used after :c:func:`Py_Initialize` has been called. We now
41enforce this for the two functions.  Additionally, the runtime now uses an
42internal copy of ``PyImport_Inittab``, to guard against modification.
43
44..
45
46.. date: 2022-11-09-12-07-24
47.. gh-issue: 99298
48.. nonce: NeArAJ
49.. section: Core and Builtins
50
51Fix an issue that could potentially cause incorrect error handling for some
52bytecode instructions.
53
54..
55
56.. date: 2022-11-08-17-47-10
57.. gh-issue: 99254
58.. nonce: RSvyFt
59.. section: Core and Builtins
60
61The compiler now removes all unused constants from code objects (except the
62first one, which may be a docstring).
63
64..
65
66.. date: 2022-11-08-16-35-25
67.. gh-issue: 99205
68.. nonce: 2YOoFT
69.. section: Core and Builtins
70
71Fix an issue that prevented :c:type:`PyThreadState` and
72:c:type:`PyInterpreterState` memory from being freed properly.
73
74..
75
76.. date: 2022-11-07-14-16-59
77.. gh-issue: 81057
78.. nonce: 3uKlLQ
79.. section: Core and Builtins
80
81The 18 global C variables holding the state of the allocators have been
82moved to ``_PyRuntimeState``.  This is a strictly internal change with no
83change in behavior.
84
85..
86
87.. date: 2022-11-07-10-29-41
88.. gh-issue: 99181
89.. nonce: bfG4bI
90.. section: Core and Builtins
91
92Fix failure in :keyword:`except* <except_star>` with unhashable exceptions.
93
94..
95
96.. date: 2022-11-07-08-17-12
97.. gh-issue: 99204
98.. nonce: Mf4hMD
99.. section: Core and Builtins
100
101Fix calculation of :data:`sys._base_executable` when inside a POSIX virtual
102environment using copies of the python binary when the base installation
103does not provide the executable name used by the venv. Calculation will fall
104back to alternative names ("python<MAJOR>", "python<MAJOR>.<MINOR>").
105
106..
107
108.. date: 2022-11-06-22-59-02
109.. gh-issue: 96055
110.. nonce: TmQuJn
111.. section: Core and Builtins
112
113Update :mod:`faulthandler` to emit an error message with the proper
114unexpected signal number. Patch by Donghee Na.
115
116..
117
118.. date: 2022-11-06-13-25-01
119.. gh-issue: 99153
120.. nonce: uE3CVL
121.. section: Core and Builtins
122
123Fix location of :exc:`SyntaxError` for a :keyword:`try` block with both
124:keyword:`except` and :keyword:`except* <except_star>`.
125
126..
127
128.. date: 2022-11-06-00-47-11
129.. gh-issue: 98686
130.. nonce: DBDy6U
131.. section: Core and Builtins
132
133Merge the adaptive opcode logic into each instruction's unquickened variant,
134and merge the logic in ``EXTENDED_ARG_QUICK`` into :opcode:`EXTENDED_ARG`.
135With these changes, the quickening that happens at code object creation is
136now only responsible for initializing warmup counters and inserting
137superinstructions.
138
139..
140
141.. date: 2022-11-06-00-17-58
142.. gh-issue: 99103
143.. nonce: bFA9BX
144.. section: Core and Builtins
145
146Fix the error reporting positions of specialized traceback anchors when the
147source line contains Unicode characters.
148
149..
150
151.. date: 2022-11-05-18-36-27
152.. gh-issue: 99139
153.. nonce: cI9vV1
154.. section: Core and Builtins
155
156Improve the error suggestion for :exc:`NameError` exceptions for instances.
157Now if a :exc:`NameError` is raised in a method and the instance has an
158attribute that's exactly equal to the name in the exception, the suggestion
159will include ``self.<NAME>`` instead of the closest match in the method
160scope. Patch by Pablo Galindo
161
162..
163
164.. date: 2022-11-03-13-11-17
165.. gh-issue: 98401
166.. nonce: CBS4nv
167.. section: Core and Builtins
168
169Octal escapes with value larger than ``0o377`` (ex: ``"\477"``), deprecated
170in Python 3.11, now produce a :exc:`SyntaxWarning`, instead of
171:exc:`DeprecationWarning`. In a future Python version they will be
172eventually a :exc:`SyntaxError`. Patch by Victor Stinner.
173
174..
175
176.. date: 2022-11-02-17-02-06
177.. gh-issue: 98401
178.. nonce: y-dbVW
179.. section: Core and Builtins
180
181A backslash-character pair that is not a valid escape sequence now generates
182a :exc:`SyntaxWarning`, instead of :exc:`DeprecationWarning`.  For example,
183``re.compile("\d+\.\d+")`` now emits a :exc:`SyntaxWarning` (``"\d"`` is an
184invalid escape sequence), use raw strings for regular expression:
185``re.compile(r"\d+\.\d+")``. In a future Python version, :exc:`SyntaxError`
186will eventually be raised, instead of :exc:`SyntaxWarning`. Patch by Victor
187Stinner.
188
189..
190
191.. date: 2022-11-02-14-42-35
192.. gh-issue: 96793
193.. nonce: q0Oi74
194.. section: Core and Builtins
195
196Handle StopIteration and StopAsyncIteration raised in generator or
197coroutines in the bytecode, rather than in wrapping C code.
198
199..
200
201.. date: 2022-10-31-22-55-34
202.. gh-issue: 98931
203.. nonce: AoWZ-4
204.. section: Core and Builtins
205
206Improve the :exc:`SyntaxError` error message when the user types ``import x
207from y`` instead of ``from y import x``. Patch by Pablo Galindo
208
209..
210
211.. date: 2022-10-31-21-01-35
212.. gh-issue: 98852
213.. nonce: MYaRN6
214.. section: Core and Builtins
215
216Fix subscription of type aliases containing bare generic types or types like
217:class:`~typing.TypeVar`: for example ``tuple[A, T][int]`` and
218``tuple[TypeVar, T][int]``, where ``A`` is a generic type, and ``T`` is a
219type variable.
220
221..
222
223.. date: 2022-10-31-18-03-10
224.. gh-issue: 98925
225.. nonce: zpdjVd
226.. section: Core and Builtins
227
228Lower the recursion depth for marshal on WASI to support (in-development)
229wasmtime 2.0.
230
231..
232
233.. date: 2022-10-28-14-52-55
234.. gh-issue: 98783
235.. nonce: iG0kMs
236.. section: Core and Builtins
237
238Fix multiple crashes in debug mode when ``str`` subclasses are used instead
239of ``str`` itself.
240
241..
242
243.. date: 2022-10-28-13-59-51
244.. gh-issue: 98811
245.. nonce: XQypJa
246.. section: Core and Builtins
247
248Use complete source locations to simplify detection of ``__future__``
249imports which are not at the beginning of the file. Also corrects the offset
250in the exception raised in one case, which was off by one and impeded
251highlighting.
252
253..
254
255.. date: 2022-10-28-09-42-51
256.. gh-issue: 96793
257.. nonce: ucBfWO
258.. section: Core and Builtins
259
260Add specialization of :opcode:`FOR_ITER` for generators. Saves multiple
261layers of dispatch and checking to get from the :opcode:`FOR_ITER`
262instruction in the caller to the :opcode:`RESUME` in the generator.
263
264..
265
266.. date: 2022-10-27-16-42-16
267.. gh-issue: 98762
268.. nonce: Eb2kzg
269.. section: Core and Builtins
270
271Fix source locations of :keyword:`match` sub-patterns.
272
273..
274
275.. date: 2022-10-24-10-30-30
276.. gh-issue: 98586
277.. nonce: Tha5Iy
278.. section: Core and Builtins
279
280Added the methods :c:func:`PyObject_Vectorcall` and
281:c:func:`PyObject_VectorcallMethod` to the :ref:`Limited API <stable>` along
282with the auxiliary macro constant :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`.
283
284The availability of these functions enables more efficient :PEP:`590` vector
285calls from binary extension modules that avoid argument boxing/unboxing
286overheads.
287
288..
289
290.. date: 2022-10-21-11-28-53
291.. gh-issue: 99257
292.. nonce: nmcuf-
293.. section: Core and Builtins
294
295Fix an issue where member descriptors (such as those for
296:attr:`~object.__slots__`) could behave incorrectly or crash instead of
297raising a :exc:`TypeError` when accessed via an instance of an invalid type.
298
299..
300
301.. date: 2022-10-19-23-54-43
302.. gh-issue: 93143
303.. nonce: 1wCYub
304.. section: Core and Builtins
305
306Rather than changing :attr:`~types.CodeType.co_code`, the interpreter will
307now display a :exc:`RuntimeWarning` and assign :const:`None` to any fast
308locals that are left unbound after jumps or :keyword:`del` statements
309executed while tracing.
310
311..
312
313.. date: 2022-10-19-15-59-08
314.. gh-issue: 96421
315.. nonce: e22y3r
316.. section: Core and Builtins
317
318When calling into Python code from C code, through
319:c:func:`PyEval_EvalFrameEx` or a related C-API function, a shim frame in
320inserted into the call stack. This occurs in the
321``_PyEval_EvalFrameDefault()`` function. The extra frame should be invisible
322to all Python and most C extensions, but out-of-process profilers and
323debuggers need to be aware of it. These shim frames can be detected by
324checking ``frame->owner == FRAME_OWNED_BY_CSTACK``.
325
326Extensions implementing their own interpreters using PEP 523 need to be
327aware of this shim frame and the changes to the semantics of
328:opcode:`RETURN_VALUE`, :opcode:`YIELD_VALUE`, and
329:opcode:`RETURN_GENERATOR`, which now clear the frame.
330
331..
332
333.. date: 2022-10-19-01-01-08
334.. gh-issue: 98415
335.. nonce: ZS2eWh
336.. section: Core and Builtins
337
338Fix detection of MAC addresses for :mod:`uuid` on certain OSs. Patch by
339Chaim Sanders
340
341..
342
343.. date: 2022-10-16-13-26-46
344.. gh-issue: 98686
345.. nonce: D9Gu_Q
346.. section: Core and Builtins
347
348Quicken all code objects, and specialize adaptive bytecode instructions more
349aggressively.
350
351..
352
353.. date: 2022-10-15-23-15-14
354.. gh-issue: 92119
355.. nonce: PMSwwG
356.. section: Core and Builtins
357
358Print exception class name instead of its string representation when raising
359errors from :mod:`ctypes` calls.
360
361..
362
363.. date: 2022-10-15-22-25-20
364.. gh-issue: 91058
365.. nonce: Uo2kW-
366.. section: Core and Builtins
367
368:exc:`ImportError` raised from failed ``from <module> import <name>`` now
369include suggestions for the value of ``<name>`` based on the available names
370in ``<module>``. Patch by Pablo Galindo
371
372..
373
374.. date: 2022-09-13-14-07-06
375.. gh-issue: 96793
376.. nonce: 7DLRSm
377.. section: Core and Builtins
378
379The :opcode:`FOR_ITER` now leaves the iterator on the stack on termination
380of the loop. This is to assist specialization of loops for generators.
381
382..
383
384.. date: 2022-09-09-16-32-58
385.. gh-issue: 90716
386.. nonce: z4yuYq
387.. section: Core and Builtins
388
389Add _pylong.py module.  It includes asymptotically faster algorithms that
390can be used for operations on integers with many digits.  It is used by
391longobject.c to speed up some operations.
392
393..
394
395.. date: 2022-07-30-14-10-27
396.. gh-issue: 95389
397.. nonce: nSGEkG
398.. section: Core and Builtins
399
400Expose :const:`~socket.ETH_P_ALL` and some of the :ref:`ETHERTYPE_* constants
401<socket-ethernet-types>` in :mod:`socket`. Patch by Noam Cohen.
402
403..
404
405.. date: 2022-06-10-16-37-44
406.. gh-issue: 93696
407.. nonce: 65BI2R
408.. section: Core and Builtins
409
410Allow :mod:`pdb` to locate source for frozen modules in the standard
411library.
412
413..
414
415.. date: 2022-11-12-15-45-51
416.. gh-issue: 99418
417.. nonce: FxfAXS
418.. section: Library
419
420Fix bug in :func:`urllib.parse.urlparse` that causes URL schemes that begin
421with a digit, a plus sign, or a minus sign to be parsed incorrectly.
422
423..
424
425.. date: 2022-11-11-18-23-41
426.. gh-issue: 94597
427.. nonce: m6vMDK
428.. section: Library
429
430Deprecate :class:`asyncio.AbstractChildWatcher` to be removed in Python
4313.14. Patch by Kumar Aditya.
432
433..
434
435.. date: 2022-11-10-11-51-39
436.. gh-issue: 99305
437.. nonce: 6LzQc3
438.. section: Library
439
440Improve performance of :func:`secrets.token_hex`.
441
442..
443
444.. date: 2022-11-09-20-48-42
445.. gh-issue: 74044
446.. nonce: zBj26K
447.. section: Library
448
449Fixed bug where :func:`inspect.signature` reported incorrect arguments for
450decorated methods.
451
452..
453
454.. date: 2022-11-09-12-16-35
455.. gh-issue: 99275
456.. nonce: klOqoL
457.. section: Library
458
459Fix ``SystemError`` in :mod:`ctypes` when exception was not set during
460``__initsubclass__``.
461
462..
463
464.. date: 2022-11-09-08-40-52
465.. gh-issue: 99277
466.. nonce: J1P44O
467.. section: Library
468
469Remove older version of ``_SSLProtocolTransport.get_write_buffer_limits`` in
470:mod:`!asyncio.sslproto`
471
472..
473
474.. date: 2022-11-08-11-15-37
475.. gh-issue: 99248
476.. nonce: 1vt8xI
477.. section: Library
478
479fix negative numbers failing in verify()
480
481..
482
483.. date: 2022-11-06-12-44-51
484.. gh-issue: 99155
485.. nonce: vLZOzi
486.. section: Library
487
488Fix :class:`statistics.NormalDist` pickle with ``0`` and ``1`` protocols.
489
490..
491
492.. date: 2022-11-05-23-16-15
493.. gh-issue: 93464
494.. nonce: ucd4vP
495.. section: Library
496
497``enum.auto()`` is now correctly activated when combined with other
498assignment values.  E.g. ``ONE = auto(), 'some text'`` will now evaluate as
499``(1, 'some text')``.
500
501..
502
503.. date: 2022-11-05-17-16-40
504.. gh-issue: 99134
505.. nonce: Msgspf
506.. section: Library
507
508Update the bundled copy of pip to version 22.3.1.
509
510..
511
512.. date: 2022-11-03-15-28-07
513.. gh-issue: 92584
514.. nonce: m5ctkm
515.. section: Library
516
517Remove the ``distutils`` package. It was deprecated in Python 3.10 by
518:pep:`632` "Deprecate distutils module". For projects still using
519``distutils`` and cannot be updated to something else, the ``setuptools``
520project can be installed: it still provides ``distutils``. Patch by Victor
521Stinner.
522
523..
524
525.. date: 2022-11-02-18-27-13
526.. gh-issue: 98999
527.. nonce: Ai2KDh
528.. section: Library
529
530Now :mod:`!_pyio` is consistent with :mod:`!_io` in raising ``ValueError``
531when executing methods over closed buffers.
532
533..
534
535.. date: 2022-11-02-05-54-02
536.. gh-issue: 83004
537.. nonce: 0v8iyw
538.. section: Library
539
540Clean up refleak on failed module initialisation in :mod:`!_zoneinfo`
541
542..
543
544.. date: 2022-11-02-05-53-25
545.. gh-issue: 83004
546.. nonce: qc_KHr
547.. section: Library
548
549Clean up refleaks on failed module initialisation in :mod:`!_pickle`
550
551..
552
553.. date: 2022-11-02-05-52-36
554.. gh-issue: 83004
555.. nonce: LBl79O
556.. section: Library
557
558Clean up refleak on failed module initialisation in :mod:`!_io`.
559
560..
561
562.. date: 2022-10-31-12-34-03
563.. gh-issue: 98897
564.. nonce: rgNn4x
565.. section: Library
566
567Fix memory leak in :func:`math.dist` when both points don't have the same
568dimension. Patch by Kumar Aditya.
569
570..
571
572.. date: 2022-10-30-22-42-48
573.. gh-issue: 98878
574.. nonce: fgrykp
575.. section: Library
576
577Use the frame bound builtins when offering a name suggestion in
578:mod:`traceback` to prevent crashing when ``__builtins__`` is not a dict.
579
580..
581
582.. date: 2022-10-30-15-26-33
583.. gh-issue: 98139
584.. nonce: qtm-9T
585.. section: Library
586
587In :mod:`importlib._bootstrap`, enhance namespace package repr to ``<module
588'x' (namespace) from ['path']>``.
589
590..
591
592.. date: 2022-10-29-09-42-20
593.. gh-issue: 90352
594.. nonce: t8QEPt
595.. section: Library
596
597Fix ``_SelectorDatagramTransport`` to inherit from
598:class:`~asyncio.DatagramTransport` in :mod:`asyncio`. Patch by Kumar
599Aditya.
600
601..
602
603.. date: 2022-10-29-03-40-18
604.. gh-issue: 98793
605.. nonce: WSPB4A
606.. section: Library
607
608Fix argument typechecks in :func:`!_overlapped.WSAConnect` and
609:func:`!_overlapped.Overlapped.WSASendTo` functions.
610
611..
612
613.. date: 2022-10-28-23-44-17
614.. gh-issue: 98744
615.. nonce: sGHDWm
616.. section: Library
617
618Prevent crashing in :mod:`traceback` when retrieving the byte-offset for
619some source files that contain certain unicode characters.
620
621..
622
623.. date: 2022-10-27-12-56-38
624.. gh-issue: 98740
625.. nonce: ZoqqGM
626.. section: Library
627
628Fix internal error in the :mod:`re` module which in very rare circumstances
629prevented compilation of a regular expression containing a :ref:`conditional
630expression <re-conditional-expression>` without the "else" branch.
631
632..
633
634.. date: 2022-10-26-07-51-55
635.. gh-issue: 98703
636.. nonce: 0hW773
637.. section: Library
638
639Fix :meth:`asyncio.StreamWriter.drain` to call ``protocol.connection_lost``
640callback only once on Windows.
641
642..
643
644.. date: 2022-10-25-20-17-34
645.. gh-issue: 98624
646.. nonce: YQUPFy
647.. section: Library
648
649Add a mutex to unittest.mock.NonCallableMock to protect concurrent access to
650mock attributes.
651
652..
653
654.. date: 2022-10-25-07-00-31
655.. gh-issue: 98658
656.. nonce: nGABW9
657.. section: Library
658
659The :class:`array.array` class now supports subscripting, making it a
660:term:`generic type`.
661
662..
663
664.. date: 2022-10-15-10-43-45
665.. gh-issue: 98284
666.. nonce: SaVHTd
667.. section: Library
668
669Improved :class:`TypeError` message for undefined abstract methods of a
670:class:`abc.ABC` instance. The names of the missing methods are surrounded
671by single-quotes to highlight them.
672
673..
674
675.. date: 2022-10-10-07-07-31
676.. gh-issue: 96151
677.. nonce: K9fwoq
678.. section: Library
679
680Allow ``BUILTINS`` to be a valid field name for frozen dataclasses.
681
682..
683
684.. date: 2022-10-08-19-39-27
685.. gh-issue: 98086
686.. nonce: y---WC
687.. section: Library
688
689Make sure ``patch.dict()`` can be applied on async functions.
690
691..
692
693.. date: 2022-09-05-17-08-56
694.. gh-issue: 72719
695.. nonce: jUpzF3
696.. section: Library
697
698Remove modules :mod:`!asyncore` and :mod:`!asynchat`, which were deprecated by
699:pep:`594`.
700
701..
702
703.. date: 2022-08-23-03-13-18
704.. gh-issue: 96192
705.. nonce: TJywOF
706.. section: Library
707
708Fix handling of ``bytes`` :term:`path-like objects <path-like object>` in
709:func:`os.ismount`.
710
711..
712
713.. date: 2022-06-23-15-36-49
714.. gh-issue: 94172
715.. nonce: DzQk0s
716.. section: Library
717
718:mod:`ftplib`: Remove the ``FTP_TLS.ssl_version`` class attribute: use the
719*context* parameter instead. Patch by Victor Stinner
720
721..
722
723.. date: 2022-06-23-15-31-49
724.. gh-issue: 94172
725.. nonce: AXE2IZ
726.. section: Library
727
728Remove the *keyfile* and *certfile* parameters from the
729:mod:`ftplib`, :mod:`imaplib`, :mod:`poplib` and :mod:`smtplib` modules,
730and the *key_file*, *cert_file* and *check_hostname* parameters from the
731:mod:`http.client` module,
732all deprecated since Python 3.6. Use the *context*
733parameter (*ssl_context* in :mod:`imaplib`) instead. Patch by Victor
734Stinner.
735
736..
737
738.. date: 2022-06-14-22-46-05
739.. gh-issue: 83638
740.. nonce: 73xfGK
741.. section: Library
742
743Add the :attr:`~sqlite3.Connection.autocommit` attribute to
744:class:`sqlite3.Connection` and the *autocommit* parameter to
745:func:`sqlite3.connect` to control :pep:`249`-compliant :ref:`transaction
746handling <sqlite3-transaction-control-autocommit>`. Patch by Erlend E.
747Aasland.
748
749..
750
751.. date: 2022-05-08-08-47-32
752.. gh-issue: 92452
753.. nonce: 3pNHe6
754.. section: Library
755
756Fixed a race condition that could cause :func:`sysconfig.get_config_var` to
757incorrectly return :const:`None` in multi-threaded programs.
758
759..
760
761.. date: 2022-05-03-11-32-29
762.. gh-issue: 91803
763.. nonce: pI4Juv
764.. section: Library
765
766Fix an error when using a method of objects mocked with
767:func:`unittest.mock.create_autospec` after it was sealed with
768:func:`unittest.mock.seal` function.
769
770..
771
772.. bpo: 38523
773.. date: 2020-10-23-22-20-52
774.. nonce: CrkxLh
775.. section: Library
776
777:func:`shutil.copytree` now applies the *ignore_dangling_symlinks* argument
778recursively.
779
780..
781
782.. bpo: 40358
783.. date: 2020-04-30-02-15-08
784.. nonce: A4ygqe
785.. section: Library
786
787Add walk_up argument in :meth:`pathlib.PurePath.relative_to`.
788
789..
790
791.. bpo: 36267
792.. date: 2019-09-03-15-45-19
793.. nonce: z42Ex7
794.. section: Library
795
796Fix IndexError in :class:`argparse.ArgumentParser` when a ``store_true``
797action is given an explicit argument.
798
799..
800
801.. date: 2022-10-29-02-33-46
802.. gh-issue: 98832
803.. nonce: DudEIH
804.. section: Documentation
805
806Changes wording of docstring for :func:`pathlib.Path.iterdir`.
807
808..
809
810.. date: 2022-10-06-13-00-28
811.. gh-issue: 97966
812.. nonce: fz7kFg
813.. section: Documentation
814
815Update uname docs to clarify the special nature of the platform attribute
816and to indicate when it became late-bound.
817
818..
819
820.. date: 2022-10-31-14-47-49
821.. gh-issue: 98903
822.. nonce: 7KinCV
823.. section: Tests
824
825The Python test suite now fails with exit code 4 if no tests ran. It should
826help detecting typos in test names and test methods.
827
828..
829
830.. date: 2022-10-26-15-19-20
831.. gh-issue: 98713
832.. nonce: Lnu32R
833.. section: Tests
834
835Fix a bug in the :mod:`typing` tests where a test relying on
836CPython-specific implementation details was not decorated with
837``@cpython_only`` and was not skipped on other implementations.
838
839..
840
841.. date: 2022-10-15-07-46-48
842.. gh-issue: 87390
843.. nonce: asR-Zo
844.. section: Tests
845
846Add tests for star-unpacking with PEP 646, and some other miscellaneous PEP
847646 tests.
848
849..
850
851.. date: 2022-10-12-14-57-06
852.. gh-issue: 96853
853.. nonce: ANe-bw
854.. section: Tests
855
856Added explicit coverage of ``Py_Initialize`` (and hence ``Py_InitializeEx``)
857back to the embedding tests (all other embedding tests migrated to
858``Py_InitializeFromConfig`` in Python 3.11)
859
860..
861
862.. bpo: 34272
863.. date: 2018-07-29-15-59-51
864.. nonce: lVX2uR
865.. section: Tests
866
867Some C API tests were moved into the new Lib/test/test_capi/ directory.
868
869..
870
871.. date: 2022-11-04-02-58-10
872.. gh-issue: 99086
873.. nonce: DV_4Br
874.. section: Build
875
876Fix ``-Wimplicit-int`` compiler warning in :program:`configure` check for
877``PTHREAD_SCOPE_SYSTEM``.
878
879..
880
881.. date: 2022-11-02-19-25-07
882.. gh-issue: 99016
883.. nonce: R05NkD
884.. section: Build
885
886Fix build with ``PYTHON_FOR_REGEN=python3.8``.
887
888..
889
890.. date: 2022-11-02-18-45-35
891.. gh-issue: 97731
892.. nonce: zKpTlj
893.. section: Build
894
895Specify the full path to the source location for ``make docclean`` (needed
896for cross-builds).
897
898..
899
900.. date: 2022-11-02-10-56-40
901.. gh-issue: 98949
902.. nonce: 3SRD8C
903.. section: Build
904
905Drop unused build dependency on ``readelf``.
906
907..
908
909.. date: 2022-11-01-21-45-58
910.. gh-issue: 98989
911.. nonce: tMxbdB
912.. section: Build
913
914Use ``python3.11``, if available, for regeneration and freezing.
915
916..
917
918.. date: 2022-10-28-22-24-26
919.. gh-issue: 98831
920.. nonce: IXRCRX
921.. section: Build
922
923Add new tooling, in ``Tools/cases_generator``, to generate the interpreter
924switch statement from a list of opcode definitions. This only affects
925adding, modifying or removing instruction definitions. The instruction
926definitions now live in ``Python/bytecodes.c``, in the form of a `custom DSL
927(under development)
928<https://github.com/faster-cpython/ideas/blob/main/3.12/interpreter_definition.md>`__.
929The tooling reads this file and writes ``Python/generated_cases.c.h``, which
930is then included by ``Python/ceval.c`` to provide most of the cases of the
931main interpreter switch.
932
933..
934
935.. date: 2022-10-28-18-53-40
936.. gh-issue: 98817
937.. nonce: oPqrtt
938.. section: Build
939
940Remove PCbuild/lib.pyproj: it's not used for anything, is only a minor
941convenience for Visual Studio users (who probably mostly don't even know
942about it), and it takes a lot of maintenance effort to keep updated.
943
944..
945
946.. date: 2022-10-27-19-47-31
947.. gh-issue: 98776
948.. nonce: lt_UOG
949.. section: Build
950
951Fix ``make regen-test-levenshtein`` for out-of-tree builds.
952
953..
954
955.. date: 2022-10-26-12-37-52
956.. gh-issue: 98707
957.. nonce: eVXGEx
958.. section: Build
959
960Don't use vendored ``libmpdec`` headers if :option:`--with-system-libmpdec`
961is passed to :program:`configure`. Don't use vendored ``libexpat`` headers
962if :option:`--with-system-expat` is passed to :program:`configure`.
963
964..
965
966.. date: 2022-11-01-11-07-33
967.. gh-issue: 98689
968.. nonce: 0f6e_N
969.. section: Windows
970
971Update Windows builds to zlib v1.2.13.  v1.2.12 has :cve:`2022-37434`, but the
972vulnerable ``inflateGetHeader`` API is not used by Python.
973
974..
975
976.. date: 2022-11-01-00-37-13
977.. gh-issue: 98790
978.. nonce: fpaPAx
979.. section: Windows
980
981Assumes that a missing ``DLLs`` directory means that standard extension
982modules are in the executable's directory.
983
984..
985
986.. date: 2022-10-27-20-30-16
987.. gh-issue: 98745
988.. nonce: v06p4r
989.. section: Windows
990
991Update :file:`py.exe` launcher to install 3.11 by default and 3.12 on
992request.
993
994..
995
996.. date: 2022-10-26-17-43-09
997.. gh-issue: 98692
998.. nonce: bOopfZ
999.. section: Windows
1000
1001Fix the :ref:`launcher` ignoring unrecognized shebang lines instead of
1002treating them as local paths
1003
1004..
1005
1006.. date: 2022-10-25-10-34-17
1007.. gh-issue: 94328
1008.. nonce: 19NhdU
1009.. section: Windows
1010
1011Update Windows installer to use SQLite 3.39.4.
1012
1013..
1014
1015.. date: 2022-10-25-10-32-23
1016.. gh-issue: 94328
1017.. nonce: W3YNC_
1018.. section: macOS
1019
1020Update macOS installer to SQLite 3.39.4.
1021
1022..
1023
1024.. date: 2022-11-04-16-13-35
1025.. gh-issue: 98724
1026.. nonce: p0urWO
1027.. section: C API
1028
1029The :c:macro:`Py_CLEAR`, :c:macro:`Py_SETREF` and :c:macro:`Py_XSETREF`
1030macros now only evaluate their argument once. If the argument has side
1031effects, these side effects are no longer duplicated. Patch by Victor
1032Stinner.
1033
1034..
1035
1036.. date: 2022-11-03-17-46-41
1037.. gh-issue: 98978
1038.. nonce: KJjBvv
1039.. section: C API
1040
1041Fix use-after-free in ``Py_SetPythonHome(NULL)``,
1042``Py_SetProgramName(NULL)`` and ``_Py_SetProgramFullPath(NULL)`` function
1043calls. Issue reported by Benedikt Reinartz. Patch by Victor Stinner.
1044
1045..
1046
1047.. date: 2022-10-25-17-50-43
1048.. gh-issue: 98410
1049.. nonce: NSXYfm
1050.. section: C API
1051
1052Add ``getbufferproc`` and ``releasebufferproc`` to the stable API.
1053
1054..
1055
1056.. date: 2022-10-24-12-09-17
1057.. gh-issue: 98610
1058.. nonce: PLX2Np
1059.. section: C API
1060
1061Some configurable capabilities of sub-interpreters have changed. They always
1062allow subprocesses (:mod:`subprocess`) now, whereas before subprocesses
1063could be optionally disallowed for a sub-interpreter. Instead
1064:func:`os.exec` can now be disallowed. Disallowing daemon threads is now
1065supported.  Disallowing all threads is still allowed, but is never done by
1066default. Note that the optional restrictions are only available through
1067``_Py_NewInterpreterFromConfig()``, which isn't a public API. They do not
1068affect the main interpreter, nor :c:func:`Py_NewInterpreter`.
1069
1070..
1071
1072.. date: 2022-10-24-11-26-55
1073.. gh-issue: 98608
1074.. nonce: _Q2lNV
1075.. section: C API
1076
1077A ``_PyInterpreterConfig`` has been added and ``_Py_NewInterpreter()`` has
1078been renamed to ``_Py_NewInterpreterFromConfig()``.  The
1079"isolated_subinterpreters" argument is now a granular config that captures
1080the previous behavior.  Note that this is all "private" API.
1081
1082..
1083
1084.. date: 2022-10-16-15-00-25
1085.. gh-issue: 96853
1086.. nonce: V0wiXP
1087.. section: C API
1088
1089``Py_InitializeEx`` now correctly calls ``PyConfig_Clear`` after
1090initializing the interpreter (the omission didn't cause a memory leak only
1091because none of the dynamically allocated config fields are populated by the
1092wrapper function)
1093
1094..
1095
1096.. date: 2022-08-05-15-26-12
1097.. gh-issue: 91248
1098.. nonce: ujirJJ
1099.. section: C API
1100
1101Add :c:func:`PyFrame_GetVar` and :c:func:`PyFrame_GetVarString` functions to
1102get a frame variable by its name. Patch by Victor Stinner.
1103