]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45582: Port getpath[p].c to Python (GH-29041)
authorSteve Dower <steve.dower@python.org>
Fri, 3 Dec 2021 00:08:42 +0000 (00:08 +0000)
committerGitHub <noreply@github.com>
Fri, 3 Dec 2021 00:08:42 +0000 (00:08 +0000)
commit99fcf1505218464c489d419d4500f126b6d6dc28
treea9d607d854e943b3651248eadbe2f31f8c410021
parent9f2f7e42269db74a89fc8cd74d82a875787f01d7
bpo-45582: Port getpath[p].c to Python (GH-29041)

The getpath.py file is frozen at build time and executed as code over a namespace. It is never imported, nor is it meant to be importable or reusable. However, it should be easier to read, modify, and patch than the previous code.

This commit attempts to preserve every previously tested quirk, but these may be changed in the future to better align platforms.
40 files changed:
.gitignore
Doc/c-api/init_config.rst
Include/cpython/fileutils.h
Include/cpython/initconfig.h
Include/internal/pycore_fileutils.h
Include/internal/pycore_initconfig.h
Include/internal/pycore_pathconfig.h
Lib/ntpath.py
Lib/posixpath.py
Lib/site.py
Lib/sysconfig.py
Lib/test/_test_embed_set_config.py
Lib/test/test_embed.py
Lib/test/test_getpath.py [new file with mode: 0644]
Lib/test/test_ntpath.py
Lib/test/test_site.py
Lib/test/test_sysconfig.py
Lib/test/test_venv.py
Makefile.pre.in
Misc/NEWS.d/next/Core and Builtins/2021-10-23-00-39-31.bpo-45582.YONPuo.rst [new file with mode: 0644]
Modules/_testinternalcapi.c
Modules/clinic/posixmodule.c.h
Modules/getpath.c
Modules/getpath.py [new file with mode: 0644]
Modules/getpath_noop.c [new file with mode: 0644]
Modules/main.c
Modules/posixmodule.c
PC/config_minimal.c
PC/getpathp.c [deleted file]
PC/pyconfig.h
PCbuild/_freeze_module.vcxproj
PCbuild/_freeze_module.vcxproj.filters
PCbuild/python.vcxproj
PCbuild/pythoncore.vcxproj
PCbuild/pythoncore.vcxproj.filters
Python/dynload_win.c
Python/fileutils.c
Python/initconfig.c
Python/pathconfig.c
Python/pylifecycle.c