]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-135805: Document the X option and env var for controlling thread-local bytecode...
authormpage <mpage@meta.com>
Tue, 24 Jun 2025 17:02:50 +0000 (10:02 -0700)
committerGitHub <noreply@github.com>
Tue, 24 Jun 2025 17:02:50 +0000 (10:02 -0700)
Document the X option and env var for controlling thread-local bytecode.

Doc/using/cmdline.rst

index 40a46a62031ef7b478bd6379960014f92fc266b8..a5867b489e0053823596856ecdb54ebcb63b6a6b 100644 (file)
@@ -669,6 +669,13 @@ Miscellaneous options
 
      .. versionadded:: 3.14
 
+   * :samp:`-X tlbc={0,1}` enables (1, the default) or disables (0) thread-local
+     bytecode in builds configured with :option:`--disable-gil`.  When disabled,
+     this also disables the specializing interpreter.  See also
+     :envvar:`PYTHON_TLBC`.
+
+     .. versionadded:: 3.14
+
    It also allows passing arbitrary values and retrieving them through the
    :data:`sys._xoptions` dictionary.
 
@@ -1302,6 +1309,16 @@ conflict.
 
    .. versionadded:: 3.13
 
+.. envvar:: PYTHON_TLBC
+
+   If set to ``1`` enables thread-local bytecode. If set to ``0`` thread-local
+   bytecode and the specializing interpreter are disabled.  Only applies to
+   builds configured with :option:`--disable-gil`.
+
+   See also the :option:`-X tlbc <-X>` command-line option.
+
+   .. versionadded:: 3.14
+
 Debug-mode variables
 ~~~~~~~~~~~~~~~~~~~~