]> granicus.if.org Git - python/commit
bpo-37834: Normalise handling of reparse points on Windows (GH-15231)
authorSteve Dower <steve.dower@python.org>
Wed, 21 Aug 2019 22:27:33 +0000 (15:27 -0700)
committerGitHub <noreply@github.com>
Wed, 21 Aug 2019 22:27:33 +0000 (15:27 -0700)
commitdf2d4a6f3d5da2839c4fc11d31511c8e028daf2c
treee60154de9e835976aed87ab51ac3d5d9fda7f45f
parentbcc446f525421156fe693139140e7051d000592e
bpo-37834: Normalise handling of reparse points on Windows (GH-15231)

bpo-37834: Normalise handling of reparse points on Windows
* ntpath.realpath() and nt.stat() will traverse all supported reparse points (previously was mixed)
* nt.lstat() will let the OS traverse reparse points that are not name surrogates (previously would not traverse any reparse point)
* nt.[l]stat() will only set S_IFLNK for symlinks (previous behaviour)
* nt.readlink() will read destinations for symlinks and junction points only

bpo-1311: os.path.exists('nul') now returns True on Windows
* nt.stat('nul').st_mode is now S_IFCHR (previously was an error)
16 files changed:
Doc/library/os.rst
Doc/library/shutil.rst
Doc/library/stat.rst
Doc/whatsnew/3.8.rst
Include/fileutils.h
Lib/shutil.py
Lib/test/test_os.py
Lib/test/test_shutil.py
Lib/test/test_tools/test_lll.py
Lib/test/test_venv.py
Misc/NEWS.d/next/Windows/2019-08-12-12-00-24.bpo-37834.VB2QVj.rst [new file with mode: 0644]
Misc/NEWS.d/next/Windows/2019-08-21-12-58-18.bpo-1311.BoW1wU.rst [new file with mode: 0644]
Modules/_stat.c
Modules/clinic/posixmodule.c.h
Modules/posixmodule.c
Python/fileutils.c