@@ -411,12 +411,25 @@ Optimizations
411411
412412 (Contributed by Serhiy Storchaka in :issue: `32856 `.)
413413
414+ * Optimize signal handling in multithreaded applications. If a thread different
415+ than the main thread gets a signal, the bytecode evaluation loop is no longer
416+ interrupted at each bytecode instruction to check for pending signals which
417+ cannot be handled. Only the main thread of the main interpreter can handle
418+ signals.
419+
420+ Previously, the bytecode evaluation loop was interrupted at each instruction
421+ until the main thread handles signals.
422+ (Contributed by Victor Stinner in :issue: `40010 `.)
423+
414424
415425Build and C API Changes
416426=======================
417427
418428* New :c:func: `PyThreadState_GetInterpreter ` and
419429 :c:func: `PyInterpreterState_Get ` functions to get the interpreter.
430+ New :c:func: `PyThreadState_GetFrame ` function to get the current frame of a
431+ Python thread state.
432+ (Contributed by Victor Stinner in :issue: `39947 `.)
420433
421434* Add ``--with-platlibdir `` option to the ``configure `` script: name of the
422435 platform-specific library directory, stored in the new :attr: `sys.platlibdir `
@@ -514,6 +527,19 @@ Build and C API Changes
514527
515528 Extension modules without module state (``m_size <= 0 ``) are not affected.
516529
530+ * If :c:func: `Py_AddPendingCall ` is called in a subinterpreter, the function is
531+ now scheduled to be called from the subinterpreter, rather than being called
532+ from the main interpreter. Each subinterpreter now has its own list of
533+ scheduled calls.
534+ (Contributed by Victor Stinner in :issue: `39984 `.)
535+
536+ * Remove ``_PyRuntime.getframe `` hook and remove ``_PyThreadState_GetFrame ``
537+ macro which was an alias to ``_PyRuntime.getframe ``. They were only exposed
538+ by the internal C API. Remove also ``PyThreadFrameGetter `` type.
539+ (Contributed by Victor Stinner in :issue: `39946 `.)
540+
541+ * The :c:func: `PyModule_AddType ` function is added to help adding a type to a module.
542+ (Contributed by Dong-hee Na in :issue: `40024 `.)
517543
518544Deprecated
519545==========
@@ -567,12 +593,19 @@ Deprecated
567593
568594 (Contributed by Victor Stinner in :issue: `39353 `.)
569595
570- * :mod: `ast ` classes ``Index `` and ``ExtSlice `` are considered deprecated
596+ * :mod: `ast ` classes ``slice ``, `` Index `` and ``ExtSlice `` are considered deprecated
571597 and will be removed in future Python versions. ``value `` itself should be
572598 used instead of ``Index(value) ``. ``Tuple(slices, Load()) `` should be
573599 used instead of ``ExtSlice(slices) ``.
574600 (Contributed by Serhiy Storchaka in :issue: `32892 `.)
575601
602+ * :mod: `ast ` classes ``Suite ``, ``Param ``, ``AugLoad `` and ``AugStore ``
603+ are considered deprecated and will be removed in future Python versions.
604+ They were not generated by the parser and not accepted by the code
605+ generator in Python 3.
606+ (Contributed by Batuhan Taskaya in :issue: `39639 ` and :issue: `39969 `
607+ and Serhiy Storchaka in :issue: `39988 `.)
608+
576609* The :c:func: `PyEval_InitThreads ` and :c:func: `PyEval_ThreadsInitialized `
577610 functions are now deprecated and will be removed in Python 3.11. Calling
578611 :c:func: `PyEval_InitThreads ` now does nothing. The :term: `GIL ` is initialized
@@ -678,11 +711,6 @@ Removed
678711 defining ``COUNT_ALLOCS `` macro.
679712 (Contributed by Victor Stinner in :issue: `39489 `.)
680713
681- * The ``ast.Suite ``, ``ast.Param ``, ``ast.AugLoad `` and ``ast.AugStore ``
682- node classes have been removed due to no longer being needed.
683- (Contributed by Batuhan Taskaya in :issue: `39639 ` and :issue: `39969 `
684- and Serhiy Storchaka in :issue: `39988 `.)
685-
686714
687715Porting to Python 3.9
688716=====================
0 commit comments