[issue22759] pathlib: Path.exists broken

2014-10-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is now fixed. Thanks for the report! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue22759] pathlib: Path.exists broken

2014-10-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 40497cc445f4 by Antoine Pitrou in branch '3.4': Issue #22759: Query methods on pathlib.Path() (exists(), is_dir(), etc.) now return False when the underlying stat call raises NotADirectoryError. https://hg.python.org/cpython/rev/40497cc445f4 New ch

[issue22759] pathlib: Path.exists broken

2014-10-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch for other querying function. -- Added file: http://bugs.python.org/file37079/path_exists_enotdir2.patch ___ Python tracker ___ ___

[issue22759] pathlib: Path.exists broken

2014-10-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 30/10/2014 20:36, Hristo Venev a écrit : > > Hristo Venev added the comment: > > Should I file bugs for is_dir, is_file, is_symlink, is_socket, is_fifo, > is_block_device and is_char_device? Hmm... good catch. No, this issue will do. -- _

[issue22759] pathlib: Path.exists broken

2014-10-30 Thread Hristo Venev
Hristo Venev added the comment: Should I file bugs for is_dir, is_file, is_symlink, is_socket, is_fifo, is_block_device and is_char_device? -- ___ Python tracker ___ ___

[issue22759] pathlib: Path.exists broken

2014-10-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch with tests. -- stage: test needed -> patch review Added file: http://bugs.python.org/file37078/path_exists_enotdir.patch ___ Python tracker

[issue22759] pathlib: Path.exists broken

2014-10-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: ENAMETOOLONG: that doesn't mean the file doesn't exist. For example, it could be accessed by changing the current directory and shortening the residual path name. ELOOP: unfortunately it doesn't guarantee that there is a real symlink loop, just that the OS de

[issue22759] pathlib: Path.exists broken

2014-10-29 Thread Hristo Venev
Hristo Venev added the comment: ENAMETOOLONG and possibly ELOOP should also return False. EACCES, EOVERFLOW and ENOMEM should probably be forwarded. EFAULT should not happen. -- ___ Python tracker _

[issue22759] pathlib: Path.exists broken

2014-10-29 Thread Georg Brandl
Georg Brandl added the comment: os.path.exists() ignores *all* OSErrors from stat. This is probably too broad, but only ignoring ENOENT is probably too narrow. -- nosy: +georg.brandl ___ Python tracker __

[issue22759] pathlib: Path.exists broken

2014-10-29 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +pitrou stage: -> test needed type: -> behavior versions: +Python 3.4, Python 3.5 ___ Python tracker ___ __

[issue22759] pathlib: Path.exists broken

2014-10-29 Thread Hristo Venev
Hristo Venev added the comment: Tested and works. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue22759] pathlib: Path.exists broken

2014-10-29 Thread Hristo Venev
New submission from Hristo Venev: $ touch a c: stat("a/x", ...) -> errno=ENOTDIR $ python >>> pathlib.Path('a/x').exists() This should return False and not throw an exception. Patch not tested. -- files: py.patch keywords: patch messages: 230214 nosy: h.venev priority: normal severity: