diff options
author | Crowthebird <78076854+thatbirdguythatuknownot@users.noreply.github.com> | 2024-05-02 13:32:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-02 13:32:20 (GMT) |
commit | 7c97dc8c9594c71bd3d1f69758a27de45f57e4c3 (patch) | |
tree | 480d75833e594394bccb168b6b8d86c131d0d65a /Python/future.c | |
parent | 67bba9dd0f5b9c2d24c2bc6d239c4502040484af (diff) | |
download | cpython-7c97dc8c9594c71bd3d1f69758a27de45f57e4c3.zip cpython-7c97dc8c9594c71bd3d1f69758a27de45f57e4c3.tar.gz cpython-7c97dc8c9594c71bd3d1f69758a27de45f57e4c3.tar.bz2 |
gh-118216: Don't consider dotted `__future__` imports (#118267)
Diffstat (limited to 'Python/future.c')
-rw-r--r-- | Python/future.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/future.c b/Python/future.c index 399345b..8d94d51 100644 --- a/Python/future.c +++ b/Python/future.c @@ -77,7 +77,7 @@ future_parse(_PyFutureFeatures *ff, mod_ty mod, PyObject *filename) * are another future statement and a doc string. */ - if (s->kind == ImportFrom_kind) { + if (s->kind == ImportFrom_kind && s->v.ImportFrom.level == 0) { identifier modname = s->v.ImportFrom.module; if (modname && _PyUnicode_EqualToASCIIString(modname, "__future__")) { |