From 0280e83c2dda9958fc3d9696c6023bcea7c37e42 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Fri, 6 Nov 2026 16:14:55 +0300 Subject: [PATCH] gh-161490: Fix leak in `test_any_str_deprecated` in `test_typing` --- Lib/test/test_typing.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index b1775ba7d81e521..3879c49c714dd9b 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -11300,6 +11300,7 @@ def test_all_exported_names(self): def test_any_str_deprecated(self): # gh-105578 fresh = import_helper.import_fresh_module('typing') + self.addCleanup(atexit.unregister, fresh._clear_caches) with self.assertWarnsRegex(DeprecationWarning, r'typing\.AnyStr'): fresh.AnyStr