From 140f3b245b6f3f616c07da00dceb245eb78ce37c Mon Sep 17 00:00:00 2001 From: Aurelius84 Date: Mon, 10 Oct 2022 10:46:07 +0800 Subject: [PATCH] [Dy2St]Fix Regex DeprecationWarning in PY3 (#46800) --- 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 c664cc986d..dbd5dc800d 100644 --- a/python/paddle/fluid/dygraph/dygraph_to_static/utils.py +++ b/python/paddle/fluid/dygraph/dygraph_to_static/utils.py @@ -92,7 +92,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