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 jimbo1qaz_
Recipients eryksun, jimbo1qaz_, paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware
Date 2019-01-06.08:10:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1546762256.49.0.737730299602.issue35306@roundup.psfhosted.org>
In-reply-to
Content
Should Path.resolve() also avoid raising OSError?

Path('*').resolve()

Traceback (most recent call last):
...truncated
  File "<ipython-input-5-4fa2fec5c8b3>", line 1, in <module>
    Path('*').resolve()
  File "C:\Users\jimbo1qaz\AppData\Local\Programs\Python\Python37\lib\pathlib.py", line 1134, in resolve
    s = self._flavour.resolve(self, strict=strict)
  File "C:\Users\jimbo1qaz\AppData\Local\Programs\Python\Python37\lib\pathlib.py", line 192, in resolve
    s = self._ext_to_normal(_getfinalpathname(s))
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '*'


os.path.realpath('"*')
Out[8]: 'C:\\Users\\jimbo1qaz\\Dropbox\\encrypted\\code\\corrscope\\"*'
os.path.abspath('*"')
Out[13]: 'C:\\Users\\jimbo1qaz\\Dropbox\\encrypted\\code\\corrscope\\*"'

(sidenote: what os.path operation does Path.resolve() match? Path('nonexistent').resolve() returns a relative path on Python 3.7.1, whereas Path().resolve() returns an absolute path.)
History
Date User Action Args
2019-01-06 08:10:57jimbo1qaz_setrecipients: + jimbo1qaz_, paul.moore, tim.golden, zach.ware, serhiy.storchaka, eryksun, steve.dower
2019-01-06 08:10:56jimbo1qaz_setmessageid: <1546762256.49.0.737730299602.issue35306@roundup.psfhosted.org>
2019-01-06 08:10:56jimbo1qaz_linkissue35306 messages
2019-01-06 08:10:56jimbo1qaz_create