]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-112730: Update docs for colour env vars (#112837)
authorHugo van Kemenade <hugovk@users.noreply.github.com>
Thu, 14 Dec 2023 11:36:48 +0000 (13:36 +0200)
committerGitHub <noreply@github.com>
Thu, 14 Dec 2023 11:36:48 +0000 (13:36 +0200)
Doc/using/cmdline.rst
Doc/whatsnew/3.13.rst
Misc/python.man

index dac4956b551dd38b514ad7036ada566a32cca220..e032a1971bc6d6a8cd4bf7e70cb0d8465a03674f 100644 (file)
@@ -610,7 +610,9 @@ Miscellaneous options
    .. versionadded:: 3.13
       The ``-X presite`` option.
 
-Controlling Color
+.. _using-on-controlling-color:
+
+Controlling color
 ~~~~~~~~~~~~~~~~~
 
 The Python interpreter is configured by default to use colors to highlight
@@ -1133,6 +1135,7 @@ conflict.
 
    If this variable is set to ``1``, the interpreter will colorize various kinds
    of output. Setting it to ``0`` deactivates this behavior.
+   See also :ref:`using-on-controlling-color`.
 
    .. versionadded:: 3.13
 
index bd2ae653100a4375116b9abbc3d2786c4d844690..e22257853d8333787da2f920efe454daa88b0a0b 100644 (file)
@@ -91,7 +91,8 @@ Improved Error Messages
 * The interpreter now colorizes error messages when displaying tracebacks by default.
   This feature can be controlled via the new :envvar:`PYTHON_COLORS` environment
   variable as well as the canonical ``NO_COLOR`` and ``FORCE_COLOR`` environment
-  variables. (Contributed by Pablo Galindo Salgado in :gh:`112730`.)
+  variables. See also :ref:`using-on-controlling-color`.
+  (Contributed by Pablo Galindo Salgado in :gh:`112730`.)
 
 Other Language Changes
 ======================
index 9f89c94adf5028477b89fdef548a9268c03e11c8..14cbd85c60bfa9b0c0fef134b3abf512b8fa40a9 100644 (file)
@@ -601,6 +601,9 @@ show how long each import takes. This is exactly equivalent to setting
 .IP PYTHONBREAKPOINT
 If this environment variable is set to 0, it disables the default debugger. It
 can be set to the callable of your debugger of choice.
+.IP PYTHON_COLORS
+If this variable is set to 1, the interpreter will colorize various kinds of
+output. Setting it to 0 deactivates this behavior.
 .SS Debug-mode variables
 Setting these variables only has an effect in a debug build of Python, that is,
 if Python was configured with the