From cedb74cef4f1fd3fb398d656443548a4580b4419 Mon Sep 17 00:00:00 2001 From: pwwang Date: Wed, 9 Oct 2024 11:42:54 -0700 Subject: [PATCH] DEPRECATED: add warning to deprecate nameof in the future --- varname/core.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/varname/core.py b/varname/core.py index 8c69e80..3418023 100644 --- a/varname/core.py +++ b/varname/core.py @@ -291,6 +291,11 @@ def nameof( VarnameRetrievingError: When the callee's node cannot be retrieved or trying to retrieve the full name of non attribute series calls. """ + warnings.warn( + "`nameof` is deprecated and will be removed in the future. " + "Please use `argname` instead.", + DeprecationWarning, + ) # Frame is anyway used in get_node frameobj = IgnoreList.create( ignore_lambda=False,