diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-04-16 17:51:17 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-04-16 17:51:17 +0300 |
commit | ca2fbf79712704df53b6a35902dfb898ef5ff0c7 (patch) | |
tree | 5eb5cd45b334eb0e06d4133c47feae1feb9cda4a /Python/future.c | |
parent | 0a90ca70c8aa04bf47777088baed8e1d6acaadea (diff) | |
parent | f93daabc06d2966489c85bf24b4542da99b55049 (diff) | |
download | cpython-ca2fbf79712704df53b6a35902dfb898ef5ff0c7.tar.gz |
Issue #26783: test_os.WalkTests.test_walk_topdown did't test fwalk and bytes.
Patch by Aviv Palivoda.
Diffstat (limited to 'Python/future.c')
-rw-r--r-- | Python/future.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/future.c b/Python/future.c index 163f87f673..75f210769e 100644 --- a/Python/future.c +++ b/Python/future.c @@ -79,7 +79,10 @@ future_parse(PyFutureFeatures *ff, mod_ty mod, PyObject *filename) i = 0; first = (stmt_ty)asdl_seq_GET(mod->v.Module.body, i); - if (first->kind == Expr_kind && first->v.Expr.value->kind == Str_kind) + if (first->kind == Expr_kind + && (first->v.Expr.value->kind == Str_kind + || (first->v.Expr.value->kind == Constant_kind + && PyUnicode_CheckExact(first->v.Expr.value->v.Constant.value)))) i++; |