diff options
| author | Guido van Rossum <guido@python.org> | 2020-06-20 17:10:25 -0700 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 2020-06-20 17:20:03 -0700 |
| commit | 05e8a550e14912fe2152862d97876f362c6b1bb9 (patch) | |
| tree | 4597ccdcd730a3455404ea38047ad1010b2ba400 /Python/pythonrun.c | |
| parent | a4c09560eaa1e3b9733c7e63d570b6fa7626724c (diff) | |
| download | cpython-git-05e8a550e14912fe2152862d97876f362c6b1bb9.tar.gz | |
[3.8] bpo-35975: Only use cf_feature_version if PyCF_ONLY_AST in cf_flags
Diffstat (limited to 'Python/pythonrun.c')
| -rw-r--r-- | Python/pythonrun.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index a7da143077..6cdd8ea7a6 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1337,7 +1337,7 @@ PyParser_ASTFromStringObject(const char *s, PyObject *filename, int start, PyCompilerFlags localflags = _PyCompilerFlags_INIT; perrdetail err; int iflags = PARSER_FLAGS(flags); - if (flags && flags->cf_feature_version < 7) + if (flags && (flags->cf_flags & PyCF_ONLY_AST) && flags->cf_feature_version < 7) iflags |= PyPARSE_ASYNC_HACKS; node *n = PyParser_ParseStringObject(s, filename, |
