mirror of
https://github.com/python/cpython.git
synced 2025-09-22 16:33:26 +00:00
[3.12] gh-115881: Ensure ast.parse()
parses conditional context managers even with low feature_version
passed (#115920) (#115959)
This commit is contained in:
parent
1932da0c3d
commit
53b84e772c
4 changed files with 10 additions and 10 deletions
2
Parser/parser.c
generated
2
Parser/parser.c
generated
|
@ -6566,7 +6566,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 , NULL , EXTRA ) );
|
||||
_res = _PyAST_With ( a , b , NULL , EXTRA );
|
||||
if (_res == NULL && PyErr_Occurred()) {
|
||||
p->error_indicator = 1;
|
||||
p->level--;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue