[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2020-10-29 Thread daniel hahler
Change by daniel hahler : -- nosy: +blueyed nosy_count: 7.0 -> 8.0 pull_requests: +21942 pull_request: https://github.com/python/cpython/pull/23025 ___ Python tracker ___

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2016-01-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4043e08e6e52 by Guido van Rossum in branch '3.4': Add another try/except PermissionError to avoid depending on listdir order. Fix issues #24120 and #26012. https://hg.python.org/cpython/rev/4043e08e6e52 New changeset 8a3b0c1fb3d3 by Guido van

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2016-01-06 Thread Gregorio
Gregorio added the comment: thanks On 01/06/2016 06:42 PM, Guido van Rossum wrote: > Guido van Rossum added the comment: > > I'm just going to commit this. > > -- > assignee: -> gvanrossum > > ___ > Python tracker >

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2016-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: I'm just going to commit this. -- assignee: -> gvanrossum ___ Python tracker ___

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2016-01-06 Thread Guido van Rossum
Changes by Guido van Rossum : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2016-01-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset bac18cb7b011 by Guido van Rossum in branch '3.4': Issue #24120: Ignore PermissionError in pathlib.Path.[r]glob(). Ulrich Petri. https://hg.python.org/cpython/rev/bac18cb7b011 New changeset 224a026b4ca1 by Guido van Rossum in branch '3.5': Issue

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2016-01-04 Thread Guido van Rossum
Guido van Rossum added the comment: I just ran into this issue. What's keeping it from being committed, except perhaps that Antoine decided to leave core developments? -- nosy: +gvanrossum ___ Python tracker

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2015-07-21 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: -ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24120 ___ ___ Python-bugs-list

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2015-07-02 Thread Ulrich Petri
Ulrich Petri added the comment: Antoine, thanks for the review. I didn't realise that `tree` outputs non-ASCII by default. I've updated the patch with a pure ASCII file tree. Unfortunately I don't have a Windows dev environment available at the moment, so I can't easily test for that.

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2015-07-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, thanks. The tests are running ok on my Windows VM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24120 ___

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2015-07-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be slightly refactor the code? def _select_from(self, parent_path, is_dir, exists, listdir): try: if not is_dir(parent_path): return yield from self._select_from2(parent_path, is_dir, exists, listdir)

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2015-06-27 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: - patch review versions: +Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24120 ___

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2015-06-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you Ulrich for the patch. I basically agree with the solution you proposed (I'm not a fan of the non-ASCII ASCII art, by the way, but I won't block the patch on that :-)). Have you tested the patch and tests under Windows? Otherwise, I (or someone

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2015-06-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not sure that Path.(r)glob() (and perhaps glob.glob()) should unconditionally ignore errors. Python has lover level than shell, and even bash has an option that controls this behavior. failglob If set, patterns which fail to match

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2015-06-08 Thread Ethan Furman
Ethan Furman added the comment: Failing to find any matches with a pattern is an entirely different class of error than finding matches but hitting permission problems or broken links or suddenly deleted files or ... If glob doesn't already have a 'failglob' option we could add that, but in a

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2015-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The glob module is not affected because it ignores all OSErrors (including Permission denied and Too many levels of symbolic links). import glob glob.glob('**/*', recursive=True) ['dir2/file1', 'dir2/file2', 'dir2/dir3', 'dir1/file1', 'dir1/file2'] There

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2015-06-05 Thread Ulrich Petri
Ulrich Petri added the comment: The attached patch adds an unaccessible directory to the pathlib tests to provoke the problem and also fixes the cause in pathlib. It applies to at least 3.4 - 3.6 -- keywords: +patch nosy: +ulope Added file:

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2015-05-07 Thread Ethan Furman
Ethan Furman added the comment: From Frank Woodall on python-ideas: == How to reproduce: mkdir /tmp/path_test cd /tmp/path_test mkdir dir1 dir2 dir2/dir3 touch dir1/file1 dir1/file2 dir2/file1 dir2/file2 dir2/dir3/file1 su chmod 700 dir2/dir3/ chown root:root

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2015-05-07 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24120 ___ ___ Python-bugs-list

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2015-05-05 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24120 ___ ___ Python-bugs-list mailing list

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2015-05-03 Thread Gregorio
New submission from Gregorio: Debian 8 Python 3.4.3 Path.(r)glob stops when it encounters a PermissionDenied exception. However, os.walk just skips files/directories it does not have permission to access. In my opinion, the os.walk behavior is better because it doesn't prevent usage in