diff options
author | Alex Waygood <Alex.Waygood@Gmail.com> | 2024-02-26 09:22:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-26 09:22:09 (GMT) |
commit | 7a3518e43aa50ea57fd35863da831052749b6115 (patch) | |
tree | bfd5cdecb5d3d71a74f2ec7f4fbf3981c0e2a20c /Parser | |
parent | 8e8ab75d97f51c2850eb8cd711010662d5f1d360 (diff) | |
download | cpython-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.c | 2 |
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--; |