@@ -479,6 +479,9 @@ PyConfig
479
479
480
480
Fields which are already initialized are left unchanged.
481
481
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
+
482
485
The :c:func: `PyConfig_Read ` function only parses
483
486
:c:member: `PyConfig.argv ` arguments once: :c:member: `PyConfig.parse_argv `
484
487
is set to ``2 `` after arguments are parsed. Since Python arguments are
@@ -493,6 +496,12 @@ PyConfig
493
496
parsed, and arguments are only parsed if
494
497
:c:member: `PyConfig.parse_argv ` equals ``1 ``.
495
498
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
+
496
505
.. c :function :: void PyConfig_Clear (PyConfig *config)
497
506
498
507
Release configuration memory.
@@ -596,13 +605,16 @@ PyConfig
596
605
597
606
.. versionadded:: 3.10
598
607
599
- .. c:member:: int no_debug_ranges
608
+ .. c:member:: int code_debug_ranges
600
609
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
602
611
mappings in code objects. Also disables traceback printing carets to
603
612
specific error locations.
604
613
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``.
606
618
607
619
.. versionadded:: 3.11
608
620
@@ -845,12 +857,19 @@ PyConfig
845
857
846
858
Default: value of the ``PLATLIBDIR`` macro which is set by the
847
859
:option:`configure --with-platlibdir option <--with-platlibdir>`
848
- (default: ``"lib" ``).
860
+ (default: ``"lib" ``, or `` "DLLs" `` on Windows ).
849
861
850
862
Part of the :ref:`Python Path Configuration <init-path-config>` input.
851
863
852
864
.. versionadded:: 3.9
853
865
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
+
854
873
.. c:member:: wchar_t* pythonpath_env
855
874
856
875
Module search paths (:data: `sys.path `) as a string separated by ``DELIM``
@@ -867,9 +886,9 @@ PyConfig
867
886
868
887
Module search paths: :data:`sys.path`.
869
888
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
873
892
:c:member:`~PyConfig.module_search_paths_set` to ``1``.
874
893
875
894
Default: empty list (``module_search_paths ``) and ``0``
@@ -941,16 +960,16 @@ PyConfig
941
960
942
961
.. c:member:: int pathconfig_warnings
943
962
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.
949
965
950
966
Default: ``1`` in Python mode, ``0`` in isolated mode.
951
967
952
968
Part of the :ref:`Python Path Configuration <init-path-config>` input.
953
969
970
+ .. versionchanged:: 3.11
971
+ Now also applies on Windows.
972
+
954
973
.. c:member:: wchar_t* prefix
955
974
956
975
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)
1302
1321
and user site directory. The C standard streams (ex: ``stdout ``) and the
1303
1322
LC_CTYPE locale are left unchanged. Signal handlers are not installed.
1304
1323
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.
1309
1327
1310
1328
1311
1329
.. _init-python-config:
0 commit comments