summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na@python.org>2023-02-17 15:18:47 (GMT)
committerGitHub <noreply@github.com>2023-02-17 15:18:47 (GMT)
commitf482ade4c7887c49dfd8bba3be76f839e562608d (patch)
tree1ad2cf423d41506c65b8b2d76a4a80daa4203e17 /Lib/importlib
parent072011b3c38f871cdc3ab62630ea2234d09456d1 (diff)
downloadcpython-f482ade4c7887c49dfd8bba3be76f839e562608d.zip
cpython-f482ade4c7887c49dfd8bba3be76f839e562608d.tar.gz
cpython-f482ade4c7887c49dfd8bba3be76f839e562608d.tar.bz2
gh-101766: Fix refleak for _BlockingOnManager resources from test suite level (gh-101988)
Diffstat (limited to 'Lib/importlib')
-rw-r--r--Lib/importlib/_bootstrap.py5
1 files changed, 0 insertions, 5 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
index 1ef7b6a..bebe7e1 100644
--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -85,11 +85,6 @@ class _BlockingOnManager:
def __exit__(self, *args, **kwargs):
"""Remove self.lock from this thread's _blocking_on list."""
self.blocked_on.remove(self.lock)
- if len(self.blocked_on) == 0:
- # gh-101766: glboal cache should be cleaned-up
- # if there is no more _blocking_on for this thread.
- del _blocking_on[self.thread_id]
- del self.blocked_on
class _DeadlockError(RuntimeError):