[issue36035] pathlib.Path().rglob() breaks with broken symlinks

2019-02-22 Thread Jörg Stucke
Jörg Stucke added the comment: As expected the Windows CI build failed. All test fails were caused by: OSError: [WinError 1921] The name of the file cannot be resolved by the system: 'C:\\projects\\cpython\\build\\test_python_936\\@test_936_tmp\\brokenLinkLoop' Therefore, I added WinError

[issue36035] pathlib.Path().rglob() breaks with broken symlinks

2019-02-22 Thread Jörg Stucke
Jörg Stucke added the comment: I tried to add a test file in https://github.com/python/cpython/pull/11988 To fix all now broken tests I had to add a try except block to the _WildcardSelector as well (analogous to the _RecursiveWildcardSelector). I could only check on Linux and I have no idea

[issue36035] pathlib.Path().rglob() breaks with broken symlinks

2019-02-22 Thread Jörg Stucke
Change by Jörg Stucke : -- pull_requests: +12011 ___ Python tracker <https://bugs.python.org/issue36035> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36035] pathlib.Path().rglob() breaks with broken symlinks

2019-02-19 Thread Jörg Stucke
Jörg Stucke added the comment: A possible solution for python 3.7+ could be to add "ELOOP" to _IGNORED_ERROS in pathlib but I'm not exactly sure of the side effects. -- ___ Python tracker <https://bugs.python.o

[issue36035] pathlib.Path().rglob() breaks with broken symlinks

2019-02-19 Thread Jörg Stucke
New submission from Jörg Stucke : When using rglob() to iterate over the files of a directory containing a broken symlink (a link pointing to itself) rglob breaks with "[Errno 40] Too many levels of symbolic links" (OS: Linux). Steps to reproduce: mkdir tmp touch foo ls -s foo tmp/