mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-118216: Don't consider dotted __future__
imports (#118267)
This commit is contained in:
parent
67bba9dd0f
commit
7c97dc8c95
5 changed files with 26 additions and 2 deletions
|
@ -3849,7 +3849,7 @@ compiler_from_import(struct compiler *c, stmt_ty s)
|
|||
}
|
||||
|
||||
if (location_is_after(LOC(s), c->c_future.ff_location) &&
|
||||
s->v.ImportFrom.module &&
|
||||
s->v.ImportFrom.module && s->v.ImportFrom.level == 0 &&
|
||||
_PyUnicode_EqualToASCIIString(s->v.ImportFrom.module, "__future__"))
|
||||
{
|
||||
Py_DECREF(names);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue