We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4e4e35 commit ab79c71Copy full SHA for ab79c71
1 file changed
Python/future.c
@@ -87,7 +87,8 @@ future_parse(PyFutureFeatures *ff, mod_ty mod, const char *filename)
87
88
if (s->kind == ImportFrom_kind) {
89
PyObject *modname = s->v.ImportFrom.module;
90
- if (!PyUnicode_CompareWithASCIIString(modname, "__future__")) {
+ if (modname &&
91
+ !PyUnicode_CompareWithASCIIString(modname, "__future__")) {
92
if (done) {
93
PyErr_SetString(PyExc_SyntaxError,
94
ERR_LATE_FUTURE);
0 commit comments