You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pathlib: test_resolve_common fails on Windows w/ longusername #77088
The problem is that the temporary directory path returned by tempfile.mkdtemp() contains the username in "short" (8.3) format, but Path.resolve() converts short names to long ones (thanks to ntpath._getfinalpathname()).
Since os.path.realpath() still doesn't resolve symlinks on Windows (bpo-9949, bpo-14094), and users of ntpath._getfinalpathname() have to deal with '\\?\' prefix, I think I'll just use Path.resolve() for the tmp dir path as a workaround.
changed the title [-]pathlib: test_resolve_common fails on Windows[/-][+]pathlib: test_resolve_common fails on Windows w/ longusername[/+]on Feb 24, 2018
Activity
izbyshev commentedon Feb 22, 2018
======================================================================
FAIL: test_resolve_common (test.test_pathlib.PathTest)
----------------------------------------------------------------------
======================================================================
The problem is that the temporary directory path returned by tempfile.mkdtemp() contains the username in "short" (8.3) format, but Path.resolve() converts short names to long ones (thanks to ntpath._getfinalpathname()).
Since os.path.realpath() still doesn't resolve symlinks on Windows (bpo-9949, bpo-14094), and users of ntpath._getfinalpathname() have to deal with '\\?\' prefix, I think I'll just use Path.resolve() for the tmp dir path as a workaround.
[-]pathlib: test_resolve_common fails on Windows[/-][+]pathlib: test_resolve_common fails on Windows w/ longusername[/+]