File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 84
84
except AttributeError :
85
85
pass
86
86
87
- if platform .python_implementation () == "PyPy" :
87
+ if platform .python_implementation () == "PyPy" and sys . version_info < ( 3 , 8 ) :
88
88
# PyPy stores the stdlib in two places: sys.prefix/lib_pypy and sys.prefix/lib-python/3
89
89
# sysconfig.get_path on PyPy returns the first, but without an underscore so we patch this manually.
90
+ # Beginning with 3.8 the stdlib is only stored in: sys.prefix/pypy{py_version_short}
90
91
STD_LIB_DIRS .add (str (Path (sysconfig .get_path ("stdlib" )).parent / "lib_pypy" ))
91
- STD_LIB_DIRS .add (
92
- sysconfig .get_path ("stdlib" , vars = {"implementation_lower" : "python/3" })
93
- )
92
+ STD_LIB_DIRS .add (str (Path (sysconfig .get_path ("stdlib" )).parent / "lib-python/3" ))
93
+
94
94
# TODO: This is a fix for a workaround in virtualenv. At some point we should revisit
95
95
# whether this is still necessary. See https://github.com/PyCQA/astroid/pull/1324.
96
96
STD_LIB_DIRS .add (str (Path (sysconfig .get_path ("platstdlib" )).parent / "lib_pypy" ))
97
97
STD_LIB_DIRS .add (
98
- sysconfig .get_path ("platstdlib" , vars = { "implementation_lower" : " python/3"} )
98
+ str ( Path ( sysconfig .get_path ("platstdlib" )). parent / "lib- python/3" )
99
99
)
100
100
101
101
if os .name == "posix" :
You can’t perform that action at this time.
0 commit comments