diff options
| author | Claudiu Popa <pcmanticore@gmail.com> | 2019-02-19 08:53:07 +0100 |
|---|---|---|
| committer | Claudiu Popa <pcmanticore@gmail.com> | 2019-02-19 08:53:07 +0100 |
| commit | 7d3107441f6db2153157ad0f0de65bb18d5d0773 (patch) | |
| tree | 089b1507746ebbaee452037ce5b43d0d40466a9f | |
| parent | e084ae9fc6e21baed5092ca855935408bac936a7 (diff) | |
| download | astroid-git-7d3107441f6db2153157ad0f0de65bb18d5d0773.tar.gz | |
Update to typed-ast 1.3 and drop the Python 3.7 restriction
Close #646
| -rw-r--r-- | ChangeLog | 2 | ||||
| -rw-r--r-- | astroid/__pkginfo__.py | 2 | ||||
| -rw-r--r-- | astroid/_ast.py | 5 |
3 files changed, 3 insertions, 6 deletions
@@ -6,6 +6,8 @@ What's New in astroid 2.2.0? ============================ Release Date: TBA +* ``typed_ast`` gets installed for Python 3.7, meaning type comments can now work on 3.7. + * Fix a bug concerning inference of unary operators on numpy types. Close PyCQA/pylint#2436 (first part) diff --git a/astroid/__pkginfo__.py b/astroid/__pkginfo__.py index 81177c87..afc660e7 100644 --- a/astroid/__pkginfo__.py +++ b/astroid/__pkginfo__.py @@ -30,7 +30,7 @@ install_requires = [ "six", "wrapt", 'typing;python_version<"3.5"', - 'typed-ast<=1.2.0;python_version<"3.7" and implementation_name== "cpython"', + 'typed-ast>=1.3.0;implementation_name== "cpython"', ] # pylint: disable=redefined-builtin; why license is a builtin anyway? diff --git a/astroid/_ast.py b/astroid/_ast.py index 7868a7f3..f6858ae0 100644 --- a/astroid/_ast.py +++ b/astroid/_ast.py @@ -1,5 +1,4 @@ import ast -import sys from collections import namedtuple from typing import Optional @@ -17,10 +16,6 @@ FunctionType = namedtuple("FunctionType", ["argtypes", "returns"]) def _get_parser_module(parse_python_two: bool = False): if parse_python_two: parser_module = _ast_py2 - elif sys.version_info[:2] >= (3, 7): - # The typed_ast module doesn't support the full 3.7 syntax yet. - # Remove once typed_ast is updated. - parser_module = ast else: parser_module = _ast_py3 return parser_module or ast |
