diff options
author | Guido van Rossum <guido@python.org> | 2020-06-28 00:35:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-28 00:35:05 (GMT) |
commit | e653369e76d7da6bcbcf1f09a141f47fb77df6c3 (patch) | |
tree | 4b49461500a8246c0d2d5e3a1a592ee72ad6ddbc /Python/pythonrun.c | |
parent | 749d3bc04177ff9e2ddfd58d919b84cb4f6cf894 (diff) | |
download | cpython-e653369e76d7da6bcbcf1f09a141f47fb77df6c3.zip cpython-e653369e76d7da6bcbcf1f09a141f47fb77df6c3.tar.gz cpython-e653369e76d7da6bcbcf1f09a141f47fb77df6c3.tar.bz2 |
[3.8] bpo-35975: Only use cf_feature_version if PyCF_ONLY_AST in cf_flags (#21023)
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 a7da143..6cdd8ea 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, |