[issue45987] os.chdir in unittest's test case causes RecursionError on Windows

2021-12-05 Thread Toshihiro Kamiya
Toshihiro Kamiya added the comment: I think it may be difficult to understand the error message that deleting a directory causes "RecursionError or stack overflow", though. I hope the issue reported as msg377358 will be resolved in some way. -- __

[issue45987] os.chdir in unittest's test case causes RecursionError on Windows

2021-12-05 Thread Toshihiro Kamiya
Toshihiro Kamiya added the comment: Thank you, eryksun, for pointing out the cause of the problem. I have modified the test script and it can now be run on Windows. The attached file is a revised version of the reproduction script, which reflects the modifications made to the test script to

[issue45987] os.chdir in unittest's test case causes RecursionError on Windows

2021-12-05 Thread Toshihiro Kamiya
Toshihiro Kamiya added the comment: Sorry, the "(snip)" means that it was omitted because it was too long. I' ll attach a screenshot. -- Added file: https://bugs.python.org/file50477/FF2dfQ_acAc497b.png ___ Python tracker

[issue45987] os.chdir in unittest's test case causes RecursionError on Windows

2021-12-05 Thread Eryk Sun
Eryk Sun added the comment: Windows opens the working directory without delete sharing, so trying to delete it fails with a PermissionError for ERROR_SHARING_VIOLATION (winerror 32). I discussed a modified version of the _rmtree() method in msg377358. The proposed version would try to reset

[issue45987] os.chdir in unittest's test case causes RecursionError on Windows

2021-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is (snip)? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45987] os.chdir in unittest's test case causes RecursionError on Windows

2021-12-05 Thread Alex Waygood
Change by Alex Waygood : -- type: crash -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue45987] os.chdir in unittest's test case causes RecursionError on Windows

2021-12-05 Thread Toshihiro Kamiya
New submission from Toshihiro Kamiya : When I was writing unit tests, I noticed that os.chdir in the unittest test case failed with RecursionError. It seems to work fine on Ubuntu 20.04, but fails on Windows 10 (might fail on macOS). The attached file is a minimal code to reproduce this. Wh