From d8daf64e8cd95bb5055fa1ff2248c8f56a3ce6c2 Mon Sep 17 00:00:00 2001 From: Aurelius84 Date: Mon, 10 Oct 2022 17:40:57 +0800 Subject: [PATCH] [Dy2St]Fix Regex DeprecationWarning in PY3 (#46829) --- python/paddle/fluid/dygraph/dygraph_to_static/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/dygraph/dygraph_to_static/utils.py b/python/paddle/fluid/dygraph/dygraph_to_static/utils.py index 65437240d5..410743b7b1 100644 --- a/python/paddle/fluid/dygraph/dygraph_to_static/utils.py +++ b/python/paddle/fluid/dygraph/dygraph_to_static/utils.py @@ -94,7 +94,7 @@ FOR_ITER_VAR_NAME_PREFIX = '__for_loop_iter_var' FOR_ITER_ZIP_TO_LIST_PREFIX = '__for_loop_iter_zip' RE_PYNAME = '[a-zA-Z0-9_]+' -RE_PYMODULE = '[a-zA-Z0-9_]+\.' +RE_PYMODULE = r'[a-zA-Z0-9_]+\.' # FullArgSpec is valid from Python3. Defined a Namedtuple to # to make it available in Python2. -- GitLab