pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/f482ade4c7887c49dfd8bba3be76f839e562608d

48faa60c69660fa.css" /> gh-101766: Fix refleak for _BlockingOnManager resources from test sui… · python/cpython@f482ade · GitHub
Skip to content

Commit f482ade

Browse files
authored
gh-101766: Fix refleak for _BlockingOnManager resources from test suite level (gh-101988)
1 parent 072011b commit f482ade

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Lib/importlib/_bootstrap.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ def __enter__(self):
8585
def __exit__(self, *args, **kwargs):
8686
"""Remove self.lock from this thread's _blocking_on list."""
8787
self.blocked_on.remove(self.lock)
88-
if len(self.blocked_on) == 0:
89-
# gh-101766: glboal cache should be cleaned-up
90-
# if there is no more _blocking_on for this thread.
91-
del _blocking_on[self.thread_id]
92-
del self.blocked_on
9388

9489

9590
class _DeadlockError(RuntimeError):

Lib/test/test_importlib/test_locks.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ class ModuleLockAsRLockTests:
3333
test_repr = None
3434
test_locked_repr = None
3535

36+
def tearDown(self):
37+
for splitinit in init.values():
38+
splitinit._bootstrap._blocking_on.clear()
39+
40+
3641
LOCK_TYPES = {kind: splitinit._bootstrap._ModuleLock
3742
for kind, splitinit in init.items()}
3843

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy