Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add dotted import check in future.c
  • Loading branch information
thatbirdguythatuknownot committed May 2, 2024
commit cfa0f3e5d2015c044fa3674ddf264636ebeecdf4
2 changes: 1 addition & 1 deletion Python/future.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__")) {
Expand Down