Python 3.11 and above adding default module search path from the “PythonPath” registry key if the standard library was found already
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Bug report
Bug description:
There's also another issue highlited in the same module by the author, but it's not important as we can workaround by setting PYTHONNOUSERSITE as seen below.
"Including import site inadvertently enables the user site packages directory because the configuration with a ._pth file doesn’t explicitly disable it. I think it should because I can’t imagine why an embedding application would ever want that. You’ll have to set PYTHONNOUSERSITE to work around this."
CPython versions tested on:
3.10, 3.11, 3.12
Operating systems tested on:
Windows
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Python discussion and reproduce the behavior on Windows using CPython 3.10, 3.11, and 3.12. Trace how the PythonPath registry key contributes to the default module search path after the standard library is found; done means the intended behavior and any required regression coverage are established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100