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

2019-05-21 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6 ___ Python tracker ___ ___

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

2019-05-21 Thread miss-islington
miss-islington added the comment: New changeset aea49b18752880e5d0260f16ca7ff2c6dce78515 by Miss Islington (bot) in branch '3.7': [3.7] bpo-36035: fix Path.rglob for broken links (GH-11988) (GH-13469) https://github.com/python/cpython/commit/aea49b18752880e5d0260f16ca7ff2c6dce78515

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

2019-05-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +13380 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

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

2019-05-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset d5c120f7eb6f2a9cdab282a5d588afed307a23df by Antoine Pitrou (Jörg Stucke) in branch 'master': bpo-36035: fix Path.rglob for broken links (GH-11988) https://github.com/python/cpython/commit/d5c120f7eb6f2a9cdab282a5d588afed307a23df -- ___

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

2019-05-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +13379 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

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

[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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

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

2019-02-21 Thread Emmanuel Arias
Emmanuel Arias added the comment: Hello! I make the PR: https://github.com/python/cpython/pull/11964 But I need help to test it :-( Any could help me please? -- nosy: +eamanu ___ Python tracker

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

2019-02-20 Thread Eryk Sun
Eryk Sun added the comment: In Windows, the error for a path reparse (e.g. symlink or junction) that can't be resolved is ERROR_CANT_RESOLVE_FILENAME. Another common error is ERROR_INVALID_REPARSE_DATA. This can occur if the reparse data is malformed or if the target device is invalid for th

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

2019-02-20 Thread Emmanuel Arias
Change by Emmanuel Arias : -- keywords: +patch pull_requests: +11990 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

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

2019-02-20 Thread Brett Cannon
Brett Cannon added the comment: And I don't know what a good solution would be. :) I.e. should some other exception be raised? Should it be ignored? I just don't know personally. -- ___ Python tracker _

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

2019-02-20 Thread Brett Cannon
Brett Cannon added the comment: I consider this an enhancement since you do have a loop in your symlinks and so having it not exactly work isn't totally shocking. But that doesn't mean that if someone can come up with a reasonable solution to fixing this annoyance it woudn't be accepted or a

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

2019-02-20 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: 3.5 is in security mode, we can remove 3.5 from the list for this issue. -- versions: -Python 3.5 ___ Python tracker ___ ___

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

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

2019-02-19 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

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

2019-02-19 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I confirm this issue with python 3.7 but your script is wrong (you declare f and use x in your script) /tmp$ mkdir demo /tmp$ cd demo/ /t/demo$ mkdir tmp

[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/foo cd tmp