[issue46977] tempfile.TemporaryDirectory fails removing dir in some edge cases related to symlinks

2022-03-10 Thread Alexandre Feblot
Change by Alexandre Feblot : -- type: -> crash ___ Python tracker <https://bugs.python.org/issue46977> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46977] tempfile.TemporaryDirectory fails removing dir in some edge cases related to symlinks

2022-03-10 Thread Alexandre Feblot
New submission from Alexandre Feblot : ```python #!/usr/bin/env python3 import os import tempfile def createUnremovableDir(workdir): print(workdir) os.mkdir(f'{workdir}/mydir') os.symlink('/bin/bash', f'{workdir}/mydir/mylink') # Symlink to a r