Need to support single_input explicitly so from __future__ imports
are legal at the interactive interpreter prompt. They don't do
anything yet...
diff --git a/Python/future.c b/Python/future.c
index 18bae1f..37d5476 100644
--- a/Python/future.c
+++ b/Python/future.c
@@ -71,6 +71,13 @@
switch (TYPE(n)) {
+ case single_input:
+ if (TYPE(CHILD(n, 0)) == simple_stmt) {
+ n = CHILD(n, 0);
+ goto loop;
+ }
+ return 0;
+
case file_input:
for (i = 0; i < NCH(n); i++) {
node *ch = CHILD(n, i);
@@ -157,6 +164,7 @@
return 0;
if (future_check_features(ff, n) < 0)
return -1;
+ ff->ff_last_lineno = n->n_lineno + 1;
return 1;
}