diff options
| author | hippo91 <guillaume.peillex@gmail.com> | 2019-02-24 14:35:03 +0100 |
|---|---|---|
| committer | hippo91 <guillaume.peillex@gmail.com> | 2019-02-24 14:35:03 +0100 |
| commit | bb10f8057cfa18567fa11d4b70613a5942886c6c (patch) | |
| tree | 44e6fcfcbac261302c7b3a201c23eed4f90342d2 | |
| parent | 1d9b387abb93df5cd8f5015eddb9dc00359e51a7 (diff) | |
| parent | a00f1911b148ef9f42afc32fe3a117de5a4095cd (diff) | |
| download | astroid-git-bb10f8057cfa18567fa11d4b70613a5942886c6c.tar.gz | |
Merges master
| -rw-r--r-- | ChangeLog | 10 | ||||
| -rw-r--r-- | astroid/__pkginfo__.py | 5 | ||||
| -rw-r--r-- | astroid/_ast.py | 5 |
3 files changed, 11 insertions, 9 deletions
@@ -6,12 +6,18 @@ What's New in astroid 2.2.0? ============================ Release Date: TBA -* Fix a bug concerning inference of unary operators on numpy types and -inference of calls to numpy function that should not return Tuple or List +<<<<<<< HEAD +* Fix a bug concerning inference of calls to numpy function that should not return Tuple or List instances. Close PyCQA/pylint#2436 +* ``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) + * Fix a crash with ``typing.NamedTuple`` and empty fields. Close PyCQA/pylint#2745 * Add a proper ``strerror`` inference to the ``OSError`` exceptions. diff --git a/astroid/__pkginfo__.py b/astroid/__pkginfo__.py index 81177c87..f88b6989 100644 --- a/astroid/__pkginfo__.py +++ b/astroid/__pkginfo__.py @@ -21,7 +21,7 @@ distname = "astroid" modname = "astroid" -version = "2.2.0-dev" +version = "2.2.0-dev1" numversion = tuple(int(elem) for elem in version.split(".") if elem.isdigit()) extras_require = {} @@ -30,7 +30,8 @@ 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;python_version>="3.7" and implementation_name== "cpython"', + 'typed-ast<1.3.0;python_version<"3.7" and 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 |
