This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author izbyshev
Recipients izbyshev, paul.moore, pitrou, steve.dower, tim.golden, zach.ware
Date 2018-02-22.09:40:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1519292402.67.0.467229070634.issue32907@psf.upfronthosting.co.za>
In-reply-to
Content
======================================================================
FAIL: test_resolve_common (test.test_pathlib.PathTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\workspace\cpython-3.8a\lib\test\test_pathlib.py", line 1538, in test_resolve_common
    self._check_resolve_relative(p, P(d, 'foo', 'in', 'spam'), False)
  File "C:\workspace\cpython-3.8a\lib\test\test_pathlib.py", line 1477, in _check_resolve
    self.assertEqual(q, expected)
AssertionError: WindowsPath('C:/Users/longusername/AppData/Local/Temp/tmpbenaiqaa-[
13 chars]pam') != WindowsPath('C:/Users/LONGUS~1/AppData/Local/Temp/tmpbenaiqaa-
dirD/foo/in/spam')

======================================================================

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 (#9949, #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.
History
Date User Action Args
2018-02-22 09:40:02izbyshevsetrecipients: + izbyshev, paul.moore, pitrou, tim.golden, zach.ware, steve.dower
2018-02-22 09:40:02izbyshevsetmessageid: <1519292402.67.0.467229070634.issue32907@psf.upfronthosting.co.za>
2018-02-22 09:40:02izbyshevlinkissue32907 messages
2018-02-22 09:40:02izbyshevcreate