Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance PyConfig documentation #92394

Merged
merged 2 commits into from
May 9, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions Doc/c-api/init_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ PyPreConfig

.. c:member:: int dev_mode

If non-zero, enables the :ref:`Python Development Mode <devmode>`:
see :c:member:`PyConfig.dev_mode`.
:ref:`Python Development Mode <devmode>`: see
:c:member:`PyConfig.dev_mode`.

Default: ``-1`` in Python mode, ``0`` in isolated mode.

Expand Down Expand Up @@ -329,9 +329,11 @@ PyPreConfig

If non-zero, enable the :ref:`Python UTF-8 Mode <utf8-mode>`.

Set by the :option:`-X utf8 <-X>` command line option and the
Set to 0 or 1 by the :option:`-X utf8 <-X>` command line option and the
:envvar:`PYTHONUTF8` environment variable.

Also set to 1 if the ``LC_CTYPE`` locale is ``C`` or ``POSIX``.

Default: ``-1`` in Python config and ``0`` in isolated config.


Expand Down Expand Up @@ -671,6 +673,9 @@ PyConfig

If non-zero, enable the :ref:`Python Development Mode <devmode>`.

Set to 1 by the :option:`-X dev <-X>` option and the
:envvar:`PYTHONDEVMODE` environment variable.

Default: ``-1`` in Python mode, ``0`` in isolated mode.

.. c:member:: int dump_refs
Expand Down Expand Up @@ -837,6 +842,8 @@ PyConfig
* Python REPL doesn't import :mod:`readline` nor enable default readline
configuration on interactive prompts.

Set to 1 by the :option:`-I` command line option.

Default: ``0`` in Python mode, ``1`` in isolated mode.

See also :c:member:`PyPreConfig.isolated`.
Expand Down Expand Up @@ -1150,6 +1157,8 @@ PyConfig
If equals to zero, ignore the :ref:`environment variables
<using-on-envvars>`.

Set to 0 by the :option:`-E` environment variable.

Default: ``1`` in Python config and ``0`` in isolated config.

.. c:member:: int user_site_directory
Expand Down