◐ Shell
clean mode source ↗

Message 320577 - Python tracker

I was decided to only fix the bug in the master branch, since it's a minor bug (leak a few handles in a rare case), whereas the backport can introduce regressions.
https://github.com/python/cpython/pull/7921#issuecomment-400612321

The bug has been fixed in the master branch, I close the issue.

Sorry for the commit/revert in the 3.7 branch, it's an issue with miss-inlington bot (and also my fault!).