summaryrefslogtreecommitdiff
path: root/Python/future.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/future.c')
-rw-r--r--Python/future.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/future.c b/Python/future.c
index 81eab54dd6..4de801bfc0 100644
--- a/Python/future.c
+++ b/Python/future.c
@@ -40,6 +40,8 @@ future_check_features(PyFutureFeatures *ff, stmt_ty s, PyObject *filename)
continue;
} else if (strcmp(feature, FUTURE_BARRY_AS_BDFL) == 0) {
ff->ff_features |= CO_FUTURE_BARRY_AS_BDFL;
+ } else if (strcmp(feature, FUTURE_GENERATOR_STOP) == 0) {
+ ff->ff_features |= CO_FUTURE_GENERATOR_STOP;
} else if (strcmp(feature, "braces") == 0) {
PyErr_SetString(PyExc_SyntaxError,
"not a chance");
@@ -97,7 +99,7 @@ future_parse(PyFutureFeatures *ff, mod_ty mod, PyObject *filename)
if (s->kind == ImportFrom_kind) {
identifier modname = s->v.ImportFrom.module;
if (modname &&
- !PyUnicode_CompareWithASCIIString(modname, "__future__")) {
+ _PyUnicode_EqualToASCIIString(modname, "__future__")) {
if (done) {
PyErr_SetString(PyExc_SyntaxError,
ERR_LATE_FUTURE);