@@ -479,6 +479,9 @@ PyConfig
479479
480480 Fields which are already initialized are left unchanged.
481481
482+ Fields for :ref: `path configuration <init-path-config >` are no longer
483+ calculated or modified when calling this function, as of Python 3.11.
484+
482485 The :c:func: `PyConfig_Read ` function only parses
483486 :c:member: `PyConfig.argv ` arguments once: :c:member: `PyConfig.parse_argv `
484487 is set to ``2 `` after arguments are parsed. Since Python arguments are
@@ -493,6 +496,12 @@ PyConfig
493496 parsed, and arguments are only parsed if
494497 :c:member: `PyConfig.parse_argv ` equals ``1 ``.
495498
499+ .. versionchanged :: 3.11
500+ :c:func: `PyConfig_Read ` no longer calculates all paths, and so fields
501+ listed under :ref: `Python Path Configuration <init-path-config >` may
502+ no longer be updated until :c:func: `Py_InitializeFromConfig ` is
503+ called.
504+
496505 .. c :function :: void PyConfig_Clear (PyConfig *config)
497506
498507 Release configuration memory.
@@ -596,13 +605,16 @@ PyConfig
596605
597606 .. versionadded:: 3.10
598607
599- .. c:member:: int no_debug_ranges
608+ .. c:member:: int code_debug_ranges
600609
601- If equals to ``1 ``, disables the inclusion of the end line and column
610+ If equals to ``0 ``, disables the inclusion of the end line and column
602611 mappings in code objects. Also disables traceback printing carets to
603612 specific error locations.
604613
605- Default: ``0``.
614+ Set to ``0`` by the :envvar:`PYTHONNODEBUGRANGES` environment variable
615+ and by the :option:`-X no_debug_ranges <-X>` command line option.
616+
617+ Default: ``1``.
606618
607619 .. versionadded:: 3.11
608620
@@ -845,12 +857,19 @@ PyConfig
845857
846858 Default: value of the ``PLATLIBDIR`` macro which is set by the
847859 :option:`configure --with-platlibdir option <--with-platlibdir>`
848- (default: ``"lib" ``).
860+ (default: ``"lib" ``, or `` "DLLs" `` on Windows ).
849861
850862 Part of the :ref:`Python Path Configuration <init-path-config>` input.
851863
852864 .. versionadded:: 3.9
853865
866+ .. versionchanged:: 3.11
867+ This macro is now used on Windows to locate the standard
868+ library extension modules, typically under ``DLLs``. However,
869+ for compatibility, note that this value is ignored for any
870+ non-standard layouts, including in-tree builds and virtual
871+ environments.
872+
854873 .. c:member:: wchar_t* pythonpath_env
855874
856875 Module search paths (:data: `sys.path `) as a string separated by ``DELIM``
@@ -867,9 +886,9 @@ PyConfig
867886
868887 Module search paths: :data:`sys.path`.
869888
870- If :c:member:`~PyConfig.module_search_paths_set` is equal to 0, the
871- function calculating the :ref:`Python Path Configuration <init-path-config>`
872- overrides the :c:member:`~PyConfig.module_search_paths` and sets
889+ If :c:member:`~PyConfig.module_search_paths_set` is equal to 0,
890+ :c:func:`Py_InitializeFromConfig` will replace
891+ :c:member:`~PyConfig.module_search_paths` and sets
873892 :c:member:`~PyConfig.module_search_paths_set` to ``1``.
874893
875894 Default: empty list (``module_search_paths ``) and ``0``
@@ -941,16 +960,16 @@ PyConfig
941960
942961 .. c:member:: int pathconfig_warnings
943962
944- On Unix, if non-zero, calculating the :ref:`Python Path Configuration
945- <init-path-config>` can log warnings into ``stderr``. If equals to 0,
946- suppress these warnings.
947-
948- It has no effect on Windows.
963+ If non-zero, calculation of path configuration is allowed to log
964+ warnings into ``stderr``. If equals to 0, suppress these warnings.
949965
950966 Default: ``1`` in Python mode, ``0`` in isolated mode.
951967
952968 Part of the :ref:`Python Path Configuration <init-path-config>` input.
953969
970+ .. versionchanged:: 3.11
971+ Now also applies on Windows.
972+
954973 .. c:member:: wchar_t* prefix
955974
956975 The site-specific directory prefix where the platform independent Python
@@ -1302,10 +1321,9 @@ variables, command line arguments (:c:member:`PyConfig.argv` is not parsed)
13021321and user site directory. The C standard streams (ex: ``stdout ``) and the
13031322LC_CTYPE locale are left unchanged. Signal handlers are not installed.
13041323
1305- Configuration files are still used with this configuration. Set the
1306- :ref:`Python Path Configuration <init-path-config>` ("output fields") to ignore these
1307- configuration files and avoid the function computing the default path
1308- configuration.
1324+ Configuration files are still used with this configuration to determine
1325+ paths that are unspecified. Ensure :c:member:`PyConfig.home` is specified
1326+ to avoid computing the default path configuration.
13091327
13101328
13111329.. _init-python-config:
0 commit comments