summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorAlex Waygood <Alex.Waygood@Gmail.com>2024-02-26 09:22:09 (GMT)
committerGitHub <noreply@github.com>2024-02-26 09:22:09 (GMT)
commit7a3518e43aa50ea57fd35863da831052749b6115 (patch)
treebfd5cdecb5d3d71a74f2ec7f4fbf3981c0e2a20c /Parser
parent8e8ab75d97f51c2850eb8cd711010662d5f1d360 (diff)
downloadcpython-7a3518e43aa50ea57fd35863da831052749b6115.zip
cpython-7a3518e43aa50ea57fd35863da831052749b6115.tar.gz
cpython-7a3518e43aa50ea57fd35863da831052749b6115.tar.bz2
gh-115881: Ensure `ast.parse()` parses conditional context managers even with low `feature_version` passed (#115920)
Diffstat (limited to 'Parser')
-rw-r--r--Parser/parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Parser/parser.c b/Parser/parser.c
index 779b18e..f1170c2 100644
--- a/Parser/parser.c
+++ b/Parser/parser.c
@@ -6603,7 +6603,7 @@ with_stmt_rule(Parser *p)
UNUSED(_end_lineno); // Only used by EXTRA macro
int _end_col_offset = _token->end_col_offset;
UNUSED(_end_col_offset); // Only used by EXTRA macro
- _res = CHECK_VERSION ( stmt_ty , 9 , "Parenthesized context managers are" , _PyAST_With ( a , b , NEW_TYPE_COMMENT ( p , tc ) , EXTRA ) );
+ _res = _PyAST_With ( a , b , NEW_TYPE_COMMENT ( p , tc ) , EXTRA );
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
p->level--;