@@ -552,6 +552,10 @@ Miscellaneous options
552552 This option may be useful for users who need to limit CPU resources of a
553553 container system. See also :envvar: `PYTHON_CPU_COUNT `.
554554 If *n * is ``default ``, nothing is overridden.
555+ * :samp: `-X presite={ package.module } ` specifies a module that should be
556+ imported before ``site.py `` is executed. Python needs to be
557+ :ref: `built in debug mode <debug-build >` for this option to exist.
558+ See also :envvar: `PYTHON_PRESITE <PYTHON_PRESITE=package.module> `.
555559
556560 It also allows passing arbitrary values and retrieving them through the
557561 :data: `sys._xoptions ` dictionary.
@@ -602,6 +606,8 @@ Miscellaneous options
602606 .. versionadded :: 3.13
603607 The ``-X cpu_count `` option.
604608
609+ The ``-X presite `` option.
610+
605611
606612Options you shouldn't use
607613~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1100,3 +1106,13 @@ Debug-mode variables
11001106 Need Python configured with the :option: `--with-trace-refs ` build option.
11011107
11021108 .. versionadded :: 3.11
1109+
1110+ .. envvar :: PYTHON_PRESITE=package.module
1111+
1112+ If this variable is set to a module, that module will be imported
1113+ early in the interpreter lifecycle, before ``site.py `` is executed.
1114+
1115+ See also the :option: `-X presite <-X> ` command-line option,
1116+ which takes precedence over this variable.
1117+
1118+ .. versionadded :: 3.13
0 commit comments