[Python-Dev] Re: Improvements to the sys.path initialization documentation

2022-03-07 Thread Nick Coghlan
On Mon, 7 Mar 2022, 7:42 pm Victor Stinner, wrote: > On Fri, Mar 4, 2022 at 1:37 PM Eryk Sun wrote: > > I don't understand. The site packages directories, including virtual > > environments, are a site extension. > > I propose to change that. Move all code related to sys.path from the > site

[Python-Dev] Re: Improvements to the sys.path initialization documentation

2022-03-07 Thread Victor Stinner
On Fri, Mar 4, 2022 at 1:37 PM Eryk Sun wrote: > I don't understand. The site packages directories, including virtual > environments, are a site extension. I propose to change that. Move all code related to sys.path from the site module to the Modules/getpath.py module. Victor -- Night

[Python-Dev] Re: Improvements to the sys.path initialization documentation

2022-03-04 Thread Russel Webber
Hi, I will add a link to https://docs.python.org/dev/c-api/init_config.html#python-path-configuration as we're trying to at least mention every way sys.path can be initialised. I think the audience for the C API docs are likely to be more knowledgeable than those reading the Setup and Usage

[Python-Dev] Re: Improvements to the sys.path initialization documentation

2022-03-04 Thread Eryk Sun
On 3/4/22, Victor Stinner wrote: > it would be nice to move the last bits of the sys.path initialization > from the site module to the getpath module. It's unpleasant to > have a different sys.path depending if the site module is loaded > or not. I don't understand. The site packages

[Python-Dev] Re: Improvements to the sys.path initialization documentation

2022-03-04 Thread Victor Stinner
Unrelated to the doc, now that getpath has been rewritten in pure Python, thanks to Steve Dower!, it would be nice to move the last bits of the sys.path initialization from the site module to the getpath module. It's unpleasant to have a different sys.path depending if the site module is loaded or

[Python-Dev] Re: Improvements to the sys.path initialization documentation

2022-03-03 Thread Victor Stinner
Hi, I tried to document inputs and outputs of Modules/getpath.py in the C API Initialization API: https://docs.python.org/dev/c-api/init_config.html#python-path-configuration I don't know if it would be possible to merge most of these information at a single place to avoid oudated documentation.