diff --git a/MANIFEST.in b/MANIFEST.in index bef5282c..8905ef71 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,4 @@ recursive-include ast27 *.h recursive-include ast3 *.h +recursive-include ast3/tests *.py include LICENSE diff --git a/README.md b/README.md index 2a50ea39..521c08cf 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ instead. To avoid feature bloat, any new features for `typed_ast` should have the potential to be broadly useful and not be built just for one niche usecase or in a manner such that only one project can use them. -### Incompatabilities +### Incompatibilities For the purposes of *consuming* syntax trees, this should be a drop-in replacement. It is not a drop-in replacement for users that wish to create or transform ASTs, diff --git a/ast3/Python/ast.c b/ast3/Python/ast.c index 9eeaf15a..b50412e6 100644 --- a/ast3/Python/ast.c +++ b/ast3/Python/ast.c @@ -1445,7 +1445,7 @@ handle_keywordonly_args(struct compiling *c, const node *n, int start, goto error; asdl_seq_SET(kwonlyargs, j++, arg); i += 1; /* the name */ - if (TYPE(CHILD(n, i)) == COMMA) + if (i < NCH(n) && TYPE(CHILD(n, i)) == COMMA) i += 1; /* the comma, if present */ break; case TYPE_COMMENT: @@ -1644,7 +1644,7 @@ ast_for_arguments(struct compiling *c, const node *n) if (!kwarg) return NULL; i += 2; /* the double star and the name */ - if (TYPE(CHILD(n, i)) == COMMA) + if (i < NCH(n) && TYPE(CHILD(n, i)) == COMMA) i += 1; /* the comma, if present */ break; case TYPE_COMMENT: diff --git a/setup.py b/setup.py index 15c4ee70..cbc74cda 100644 --- a/setup.py +++ b/setup.py @@ -116,6 +116,7 @@ 'Programming Language :: Python :: 3.7', 'Topic :: Software Development', ], - packages = ['typed_ast'], + packages = ['typed_ast', 'typed_ast.tests'], + package_dir={ 'typed_ast.tests': 'ast3/tests' }, ext_package='typed_ast', ext_modules = [_ast27, _ast3]) diff --git a/typed_ast/__init__.py b/typed_ast/__init__.py index 9c73af26..f708a9b2 100644 --- a/typed_ast/__init__.py +++ b/typed_ast/__init__.py @@ -1 +1 @@ -__version__ = "1.3.1" +__version__ = "1.3.2"