On Fri, Mar 4, 2022 at 1:37 PM Eryk Sun <eryksun@gmail.com> 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.
Certain entries not being on sys.path when the site module isn't loaded is a feature (the "-S" CLI option), not a bug to be fixed.
Those site entries haven't historically been the really confusing part of path inititialisation - it's been finding out where all the *other* default entries are coming from, so you can get a clearer picture of what's always there vs what's being added by the site module.
Cheers,
Nick.