Message286717
If a path has a non-existent anchor, Path.mkdir can get into a RecursionError as it tries to recursively create the parent. I expect a more sane error.
This is readily reproducible in Windows with `Path('Z:').mkdir(parents=True)`
Example execution:
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pathlib import Path
>>> Path('Z:').mkdir(parents=True)
Traceback (most recent call last):
File "C:\Python36\lib\pathlib.py", line 1231, in mkdir
self._accessor.mkdir(self, mode)
File "C:\Python36\lib\pathlib.py", line 388, in wrapped
return strfunc(str(pathobj), *args)
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'Z:'
During handling of the above exception, another exception occurred:
...
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python36\lib\pathlib.py", line 1238, in mkdir
self.parent.mkdir(parents=True)
File "C:\Python36\lib\pathlib.py", line 1238, in mkdir
self.parent.mkdir(parents=True)
File "C:\Python36\lib\pathlib.py", line 1238, in mkdir
self.parent.mkdir(parents=True)
[Previous line repeated 989 more times]
File "C:\Python36\lib\pathlib.py", line 1231, in mkdir
self._accessor.mkdir(self, mode)
File "C:\Python36\lib\pathlib.py", line 388, in wrapped
return strfunc(str(pathobj), *args)
RecursionError: maximum recursion depth exceeded |
|
Date |
User |
Action |
Args |
2017-02-01 22:46:33 | Dan Buchoff | set | recipients:
+ Dan Buchoff, paul.moore, tim.golden, zach.ware, steve.dower |
2017-02-01 22:46:32 | Dan Buchoff | set | messageid: <1485989192.98.0.740495069051.issue29416@psf.upfronthosting.co.za> |
2017-02-01 22:46:32 | Dan Buchoff | link | issue29416 messages |
2017-02-01 22:46:32 | Dan Buchoff | create | |
|