gh-92913: Clarify changes to PyInitConfig.module_search_paths[_set] fields (GH-92980)

This commit is contained in:
Steve Dower 2022-05-19 20:23:53 +01:00 committed by GitHub
parent 3fd8610002
commit 403d16fa28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 8 deletions

View file

@ -403,6 +403,11 @@ Other CPython Implementation Changes
instead of prepending them.
(Contributed by Bastian Neuburger in :issue:`44934`.)
* The :c:member:`PyConfig.module_search_paths_set` field must now be set to 1 for
initialization to use :c:member:`PyConfig.module_search_paths` to initialize
:data:`sys.path`. Otherwise, initialization will recalculate the path and replace
any values added to ``module_search_paths``.
New Modules
===========
@ -1861,6 +1866,16 @@ Porting to Python 3.11
* Distributors are encouraged to build Python with the optimized Blake2
library `libb2`_.
* The :c:member:`PyConfig.module_search_paths_set` field must now be set to 1 for
initialization to use :c:member:`PyConfig.module_search_paths` to initialize
:data:`sys.path`. Otherwise, initialization will recalculate the path and replace
any values added to ``module_search_paths``.
* :c:func:`PyConfig_Read` no longer calculates the initial search path, and will not
fill any values into :c:member:`PyConfig.module_search_paths`. To calculate default
paths and then modify them, finish initialization and use :c:func:`PySys_GetObject`
to retrieve :data:`sys.path` as a Python list object and modify it directly.
Deprecated
----------