-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Feature or enhancement
Proposal:
Currently in
Line 336 in d7b9ea5
return f'{userbase}/lib/python{version[0]}.{version[1]}{abi_thread}/site-packages' |
the string "python" is hardcoded.
This creates issues for alternative Python implementations (e.g. PyPy, RustPython, etc.), which often rely on sys.implementation.name
to determine the correct directory layout. By hardcoding "python", the code assumes CPython specifically, making it less portable.
Proposed change:
Change the offending line to use the {implementation_lower}
instead as it is already used throughout the function
Has this already been discussed elsewhere?
No
Linked PRs
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error