[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 Rossum in branch '3.5':
Add another try/except PermissionError to avoid depending on listdir order. Fix 
issues #24120 and #26012. (Merge 3.4->3.5)
https://hg.python.org/cpython/rev/8a3b0c1fb3d3

New changeset 398cb8c183da by Guido van Rossum in branch 'default':
Add another try/except PermissionError to avoid depending on listdir order. Fix 
issues #24120 and #26012. (Merge 3.5->3.6)
https://hg.python.org/cpython/rev/398cb8c183da

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 #24120: Ignore PermissionError in pathlib.Path.[r]glob(). Ulrich Petri. 
(Merge 3.4->3.5)
https://hg.python.org/cpython/rev/224a026b4ca1

New changeset f6ae90450a4d by Guido van Rossum in branch 'default':
Issue #24120: Ignore PermissionError in pathlib.Path.[r]glob(). Ulrich Petri. 
(Merge 3.5->3.6)
https://hg.python.org/cpython/rev/f6ae90450a4d

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--
Added file: http://bugs.python.org/file39843/issue24120_2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24120
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)
except PermissionError:
return

def _select_from2(self, parent_path, is_dir, exists, listdir):
... # implementation

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24120
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
else) will have to do that before accepting it.

--
nosy: +zach.ware

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24120
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 filenames during pathname 
expansion result in an expansion error.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24120
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
different issue.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24120
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 is no special test for PermissionError.

--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24120
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: http://bugs.python.org/file39634/issue24120.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24120
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 dir2/dir3/
exit

python 3.4.1

from pathlib import Path
p = Path('/tmp/path_test')
for x in p.rglob('*') : print(x)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24120
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 situations where a single file/directory in a tree has restricted 
permissions.

--
components: Library (Lib)
messages: 242496
nosy: Gregorio
priority: normal
severity: normal
status: open
title: pathlib.(r)glob stops on PermissionDenied exception
type: behavior
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24120
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com