gh-131591: Implement PEP 768 (#131937)

Co-authored-by: Ivona Stojanovic <stojanovic.i@hotmail.com>
Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
This commit is contained in:
Pablo Galindo Salgado 2025-04-03 16:20:01 +01:00 committed by GitHub
parent 275056a7fd
commit 943cc1431e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 1796 additions and 2 deletions

View file

@ -603,6 +603,17 @@ Miscellaneous options
.. versionadded:: 3.13
* ``-X disable_remote_debug`` disables the remote debugging support as described
in :pep:`768`. This includes both the functionality to schedule code for
execution in another process and the functionality to receive code for
execution in the current process.
This option is only available on some platforms and will do nothing
if is not supported on the current system. See also
:envvar:`PYTHON_DISABLE_REMOTE_DEBUG` and :pep:`768`.
.. versionadded:: next
* :samp:`-X cpu_count={n}` overrides :func:`os.cpu_count`,
:func:`os.process_cpu_count`, and :func:`multiprocessing.cpu_count`.
*n* must be greater than or equal to 1.
@ -1160,7 +1171,16 @@ conflict.
.. versionadded:: 3.13
.. envvar:: PYTHON_DISABLE_REMOTE_DEBUG
If this variable is set to a non-empty string, it disables the remote
debugging feature described in :pep:`768`. This includes both the functionality
to schedule code for execution in another process and the functionality to
receive code for execution in the current process.
See also the :option:`-X disable_remote_debug` command-line option.
.. versionadded:: next
.. envvar:: PYTHON_CPU_COUNT

View file

@ -660,6 +660,17 @@ also be used to improve performance.
Add ``-fstrict-overflow`` to the C compiler flags (by default we add
``-fno-strict-overflow`` instead).
.. option:: --without-remote-debug
Deactivate remote debugging support described in :pep:`768` (enabled by default).
When this flag is provided the code that allows the interpreter to schedule the
execution of a Python file in a separate process as described in :pep:`768` is
not compiled. This includes both the functionality to schedule code to be executed
and the functionality to receive code to be executed.
.. versionadded:: next
.. _debug-build: