]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45506: Normalize _PyPathConfig.stdlib_dir when calculated. (#29040)
authorEric Snow <ericsnowcurrently@gmail.com>
Fri, 22 Oct 2021 23:20:03 +0000 (17:20 -0600)
committerGitHub <noreply@github.com>
Fri, 22 Oct 2021 23:20:03 +0000 (17:20 -0600)
commit17c61045c51512add61a9e75e9c7343cf4e4fb82
tree59a98afdea508cacfb4dc4f10acf2f5b402ea0b2
parentf30ad65dbf3c6b1b5eec14dc954d65ef32327857
bpo-45506: Normalize _PyPathConfig.stdlib_dir when calculated. (#29040)

The recently added PyConfig.stdlib_dir was being set with ".." entries. When __file__ was added for from modules this caused a problem on out-of-tree builds. This PR fixes that by normalizing "stdlib_dir" when it is calculated in getpath.c.

https://bugs.python.org/issue45506
Include/internal/pycore_fileutils.h
Lib/test/test_fileutils.py [new file with mode: 0644]
Lib/test/test_posixpath.py
Modules/_testinternalcapi.c
Modules/getpath.c
Python/fileutils.c