Feature or enhancement
Proposal:
Currently in
|
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
Feature or enhancement
Proposal:
Currently in
cpython/Lib/site.py
Line 336 in d7b9ea5
the string "python" is hardcoded.
This creates issues for alternative Python implementations (e.g. PyPy, RustPython, etc.), which often rely on
sys.implementation.nameto 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 functionHas this already been discussed elsewhere?
No
Linked PRs
site._get_pathto respect non-default implementation name #138610