bpo-36035: pathlib.Path().rglob() breaks with broken symlinks by eamanu · Pull Request #11964 · python/cpython

@eamanu

@eamanu

Based on  Jörg Stucke suggestion

@eamanu

pganssle

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be best if you also added a test for this, presumably in test_pathlib.

BoboTiG

@@ -35,7 +35,7 @@
#

# EBADF - guard agains macOS `stat` throwing EBADF

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhpas adding a comment here about ELOOP ould be helpful as this name is not transparent.

@csabella

Thank you for the contribution, @eamanu. I'm going to close this as a duplicate of GH-36035, since that pull request is by Jörg Stucke (the original author created in your comment) and is more complete than this PR.