From 6d6f6c5c0d406092443f801d34a644435a857bcf Mon Sep 17 00:00:00 2001 From: Ethan Smith Date: Tue, 18 Jul 2017 12:23:43 -0700 Subject: [PATCH 1/2] Update typed_ast and README for Python 3.4 support The new typed_ast 1.1.0 includes a patch adding support for Python 3.4 and 3.3. The README is updated to discuss this. A comment on LXML on Python 3.3/3.4 was added to help those whishing to use reports on Windows. --- README.md | 11 +++++++---- setup.py | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 63b9d39b34d1e..e393aaf0259c6 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,8 @@ type check them statically. Find bugs in your programs without even running them! The type annotation standard has also been backported to earlier -Python 3.x versions. Mypy supports Python 3.3 and later. +Python 3.x versions. Mypy supports Python 3.3 and later. +XML based reports do not work on Python 3.3 and 3.4 on Windows. For Python 2.7, you can add annotations as comments (this is also specified in [PEP 484](https://www.python.org/dev/peps/pep-0484/)). @@ -156,6 +157,9 @@ In Windows, the script is generally installed in C:\>\Python34\python \Python34\Scripts\mypy PROGRAM +If you are on Windows using Python 3.3 or 3.4, and would like to use XML reports +download LXML from [PyPi](https://pypi.python.org/pypi/lxml). + ### Working with `virtualenv` If you are using [`virtualenv`](https://virtualenv.pypa.io/en/stable/), @@ -254,9 +258,8 @@ Help wanted Any help in testing, development, documentation and other tasks is highly appreciated and useful to the project. There are tasks for contributors of all experience levels. If you're just getting started, -check out the -[difficulty/easy](https://github.com/python/mypy/labels/difficulty%2Feasy) -label. +ask on the [gitter chat](https://gitter.im/python/typing) for ideas of good +beginner issues. For more details, see the file [CONTRIBUTING.md](CONTRIBUTING.md). diff --git a/setup.py b/setup.py index ccfe455fdcf7a..a3f6257800d41 100644 --- a/setup.py +++ b/setup.py @@ -111,7 +111,7 @@ def run(self): data_files=data_files, classifiers=classifiers, cmdclass={'build_py': CustomPythonBuild}, - install_requires = ['typed-ast >= 1.0.4, < 1.1.0'], + install_requires = ['typed-ast >= 1.1.0, < 1.2.0'], extras_require = { ':python_version < "3.5"': 'typing >= 3.5.3', }, From e28f12ceda1360a96a7c7f3f4f68236382d44268 Mon Sep 17 00:00:00 2001 From: Ethan Smith Date: Tue, 18 Jul 2017 15:17:53 -0700 Subject: [PATCH 2/2] update test-requirements.txt for Python3.3/3.4 --- test-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-requirements.txt b/test-requirements.txt index 62e2f4c2c2cd7..d72d4cc491811 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ flake8 flake8-bugbear; python_version >= '3.5' flake8-pyi; python_version >= '3.6' lxml; sys_platform != 'win32' or python_version == '3.5' or python_version == '3.6' -typed-ast>=1.0.4,<1.1.0; sys_platform != 'win32' or python_version >= '3.5' +typed-ast>=1.1.0,<1.2.0 pytest>=2.8 pytest-xdist>=1.13 pytest-cov>=2.4.0