diff options
author | shadchin <shadchin@yandex-team.com> | 2023-12-13 02:43:57 +0300 |
---|---|---|
committer | shadchin <shadchin@yandex-team.com> | 2023-12-13 03:08:48 +0300 |
commit | 5b48aabc614c6d407f885f3b228dc484ad4c5ba9 (patch) | |
tree | 602eb5cc5d85bf730c1de1fa50a13c2ee552830d /contrib/tools/python3/src/Parser/string_parser.c | |
parent | 35d7049b38602e8cbfcd3f96257329a1abce947e (diff) | |
download | ydb-5b48aabc614c6d407f885f3b228dc484ad4c5ba9.tar.gz |
Update Python 3 to 3.11.7
Diffstat (limited to 'contrib/tools/python3/src/Parser/string_parser.c')
-rw-r--r-- | contrib/tools/python3/src/Parser/string_parser.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/tools/python3/src/Parser/string_parser.c b/contrib/tools/python3/src/Parser/string_parser.c index fb2b9808af..7079b82d04 100644 --- a/contrib/tools/python3/src/Parser/string_parser.c +++ b/contrib/tools/python3/src/Parser/string_parser.c @@ -11,6 +11,11 @@ static int warn_invalid_escape_sequence(Parser *p, const char *first_invalid_escape, Token *t) { + if (p->call_invalid_rules) { + // Do not report warnings if we are in the second pass of the parser + // to avoid showing the warning twice. + return 0; + } unsigned char c = *first_invalid_escape; int octal = ('4' <= c && c <= '7'); PyObject *msg = |