diff options
author | Guido van Rossum <guido@python.org> | 2020-06-27 17:34:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-27 17:34:30 -0700 |
commit | 2a1ee1d970460047bd88da9638f8c1789431d9ab (patch) | |
tree | f9d788be367da763dc8d712b78aa5005c3d0dd35 /Python/pythonrun.c | |
parent | dab533d0ee067159812d4ea51f6fbbb1bd37d8b7 (diff) | |
download | cpython-git-2a1ee1d970460047bd88da9638f8c1789431d9ab.tar.gz |
[3.9] bpo-35975: Only use cf_feature_version if PyCF_ONLY_AST in cf_flags (#21022)
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 cb0e3b02e1..70748dc584 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1402,7 +1402,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, |