From 908c96a76926443cc134fa05167e9d39170eb7ce Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jul 2022 10:38:26 -0400 Subject: [PATCH] =?UTF-8?q?Identify=20the=20attribute=20name,=20not=20just?= =?UTF-8?q?=20the=20module=20in=20which=20it=20appears=20=F0=9F=A4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Thomas Grainger --- Lib/importlib/abc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/importlib/abc.py b/Lib/importlib/abc.py index 396eeb2b198885..8fa9a0f3bc1e4b 100644 --- a/Lib/importlib/abc.py +++ b/Lib/importlib/abc.py @@ -32,7 +32,7 @@ def __getattr__(name): """ if name in _resources_abc.__all__: obj = getattr(_resources_abc, name) - warnings._deprecated(__name__, remove=(3, 14)) + warnings._deprecated(f"{__name__}.{name}", remove=(3, 14)) globals()[name] = obj return obj raise AttributeError(f'module {__name__!r} has no attribute {name!r}')