Skip to content

make doctor only inspects site-packages, not PYTHONPATH entries or the working directory #1267

Open

Description

@yakew7

Where: scripts/check_environment.py.

Current gap: The check looks at the purelib, platlib and user site directories. A stdlib-named module in a directory listed in PYTHONPATH, or a stray random.py next to the script being run, shadows the standard library just as well but is not reported.

Suggested approach: Also scan the entries of sys.path that come from PYTHONPATH and the current directory, and name where each came from.

Done when: a test with a fake PYTHONPATH directory containing enum.py reports it.

Activity

  1. added
    enhancementNew feature or request
    toolingScripts, Makefile and contributor tooling
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttoolingScripts, Makefile and contributor tooling

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions