diff --git a/.gitignore b/.gitignore index 7a05be6..4db3f06 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ /mypy-0.580.tar.gz /mypy-0.600.tar.gz /mypy-0.620.tar.gz +/mypy-0.670.tar.gz diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index a6a3cce..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,156 +0,0 @@ -Contributing to Mypy -==================== - -Welcome! Mypy is a community project that aims to work for a wide -range of Python users and Python codebases. If you're trying Mypy on -your Python code, your experience and what you can contribute are -important to the project's success. - - -Getting started, building, and testing --------------------------------------- - -If you haven't already, take a look at the project's -[README.md file](README.md) -and the [Mypy documentation](http://mypy.readthedocs.io/en/latest/), -and try adding type annotations to your file and type-checking it with Mypy. - - -Discussion ----------- - -If you've run into behavior in Mypy you don't understand, or you're -having trouble working out a good way to apply it to your code, or -you've found a bug or would like a feature it doesn't have, we want to -hear from you! - -Our main forum for discussion is the project's [GitHub issue -tracker](https://github.com/python/mypy/issues). This is the right -place to start a discussion of any of the above or most any other -topic concerning the project. - -We have an IRC channel, `#python-mypy` on irc.freenode.net. This is -lightly used, but some Mypy core developers are almost always present; -feel free to find us there and we're happy to chat. Substantive -technical discussion will be directed to the issue tracker. - -#### Code of Conduct - -Everyone participating in the Mypy community, and in particular in our -issue tracker, pull requests, and IRC channel, is expected to treat -other people with respect and more generally to follow the guidelines -articulated in the [Python Community Code of -Conduct](https://www.python.org/psf/codeofconduct/). - - -Submitting Changes ------------------- - -Even more excellent than a good bug report is a fix for a bug, or the -implementation of a much-needed new feature. (*) We'd love to have -your contributions. - -(*) If your new feature will be a lot of work, we recommend talking to - us early -- see below. - -We use the usual GitHub pull-request flow, which may be familiar to -you if you've contributed to other projects on GitHub. For the mechanics, -see [our git and GitHub workflow help page](https://github.com/python/mypy/wiki/Using-Git-And-GitHub), -or [GitHub's own documentation](https://help.github.com/articles/using-pull-requests/). - -Anyone interested in Mypy may review your code. One of the Mypy core -developers will merge your pull request when they think it's ready. -For every pull request, we aim to promptly either merge it or say why -it's not yet ready; if you go a few days without a reply, please feel -free to ping the thread by adding a new comment. - -At present the core developers are (alphabetically): -* David Fisher (@ddfisher) -* Jukka Lehtosalo (@JukkaL) -* Greg Price (@gnprice) -* Guido van Rossum (@gvanrossum) - - -Preparing Changes ------------------ - -Before you begin: if your change will be a significant amount of work -to write, we highly recommend starting by opening an issue laying out -what you want to do. That lets a conversation happen early in case -other contributors disagree with what you'd like to do or have ideas -that will help you do it. - -The best pull requests are focused, clearly describe what they're for -and why they're correct, and contain tests for whatever changes they -make to the code's behavior. As a bonus these are easiest for someone -to review, which helps your pull request get merged quickly! Standard -advice about good pull requests for open-source projects applies; we -have [our own writeup](https://github.com/python/mypy/wiki/Good-Pull-Request) -of this advice. - -See also our [coding conventions](https://github.com/python/mypy/wiki/Code-Conventions) -- -which consist mainly of a reference to -[PEP 8](https://www.python.org/dev/peps/pep-0008/) -- for the code you -put in the pull request. - -You may also find other pages in the -[Mypy developer guide](https://github.com/python/mypy/wiki/Developer-Guides) -helpful in developing your change. - - -Issue-tracker conventions -------------------------- - -We aim to reply to all new issues promptly. We'll assign a milestone -to help us track which issues we intend to get to when, and may apply -labels to carry some other information. Here's what our milestones -and labels mean. - -### Milestones - -We use GitHub "milestones" ([see our -list](https://github.com/python/mypy/milestones)) to roughly order -what we want to do soon and less soon. - -This means they represent a combination of priority and scale of work. -Bugs that aren't a huge deal but do matter to users and don't seem -like a lot of work to fix generally go in a near milestone; things -that will take longer may go further out. - -Specifically: - -* **Numbered milestones** correspond to releases. These assignments - are changeable, and issues may be moved earlier or later. - Assignments to further-out milestones are more likely to - change. -* Point releases, like 0.x.y when we're already at 0.x.z, generally - have issues that are less work to tackle and whose user-facing - impact is small or a bugfix. Meatier or more radical issues - generally go to a full "minor" release, like 0.x.0. -* **Future** has other things we don't currently plan to get to anytime - soon -- akin to "backlog" in some systems. -* **Questions** is for issue threads where a user is asking a question - but it isn't yet clear that it represents something to actually - change. We use the issue tracker as the preferred venue for such - questions, even when they aren't literally issues, to keep down the - number of distinct discussion venues anyone needs to track. These - might move to a different milestone if after discussion a bug or - feature request emerges. -* Issues **without a milestone** haven't been triaged. We aim to - triage all new issues promptly, but there are some issues from 2015 - and earlier that we haven't yet reviewed for triage since adopting - these conventions. - -### Labels - -* **needs discussion**: This issue needs agreement on some kind of - design before it makes sense to implement it, and it either doesn't - yet have a design or doesn't yet have agreement on one. -* **feature**, **bug**, **refactoring**: These classify the user-facing - impact of the change. Specifically "refactoring" means there should - be no user-facing effect. -* **duplicate**, **wontfix**: These identify issues that we've closed - for the respective reasons. -* **priority**, **question**, **postponed**: These labels predate the - milestone conventions and are deprecated; they should be gone on all - issues that have been triaged to a milestone. diff --git a/CREDITS b/CREDITS deleted file mode 100644 index d4fe9ee..0000000 --- a/CREDITS +++ /dev/null @@ -1,101 +0,0 @@ -Credits -------- - -Lead developer: - - Jukka Lehtosalo - -Core team: - - Guido - David Fisher - Greg Price - -Contributors (in alphabetical order, including typeshed): - - Tim Abbott - Steven Allen (@Stebalien) - Della Anjeh - Reid Barton (@rwbarton) - Matthias Bussonnier - Anup Chenthamarakshan - Kyle Consalus - Ian Cordasco - ctcutler - Ben Darnell - Miguel Garcia (@rockneurotiko) - Mihnea Giurgea - Ryan Gonzalez (@kirbyfan64) - James Guthrie - Jared Hance - Ashley Hewson (@ashleyh) - icoxfog417 - Bob Ippolito (@etrepum) - ismail-s - Sander Kersten (@spkersten) - Matthias Kramm - Ian Kronquist (@iankronquist) - Yuval Langer - Howard Lee - Tad Leonard - Li Haoyi - Darjus Loktevic - Ben Longbons - Florian Ludwig (@FlorianLudwig) - Robert T. McGibbon - Ron Murawski - Motoki Naruse - Jared Pochtar (@jaredp) - Michal Pokorný - Eric Price (@ecprice) - Brodie Rao - Sebastian Reuße - Sebastian Riikonen - Seo Sanghyeon - Marek Sapota - Gigi Sayfan - Vlad Shcherbina - Anders Schuller - Daniel Shaulov - David Shea - Vita Smid - Schuyler Smith - Marcell Vazquez-Chanlatte (@mvcisback) - Prayag Verma - Igor Vuk (@ivuk) - Jeff Walden (@jswalden) - Michael Walter - Jing Wang - Wen Zhang - Roy Williams - wizzardx - Matthew Wright - Yuanchao Zhu (@yczhu) - Gennadiy Zlobin (@gennad) - -Additional thanks to: - - Alex Allain - Max Bolingbroke - Peter Calvert - Kannan Goundan - Kathy Gray - David J Greaves - Riitta Ikonen - Terho Ikonen - Stephen Kell - Łukasz Langa - Laura Lehtosalo - Peter Ludemann - Seppo Mattila - Robin Message - Alan Mycroft - Dominic Orchard - Pekka Rapinoja - Matt Robben - Satnam Singh - Juha Sorva - Clay Sweetser - Jorma Tarhio - Jussi Tuovila - Andrey Vlasovskikh diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 131d386..0000000 --- a/LICENSE +++ /dev/null @@ -1,228 +0,0 @@ -Mypy is licensed under the terms of the MIT license, reproduced below. - -= = = = = - -The MIT License - -Copyright (c) 2015-2016 Jukka Lehtosalo and contributors - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -= = = = = - -Portions of mypy are licensed under different licenses. The files -under stdlib-samples and lib-typing are licensed under the PSF 2 -License, reproduced below. - -= = = = = - -PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 --------------------------------------------- - -1. This LICENSE AGREEMENT is between the Python Software Foundation -("PSF"), and the Individual or Organization ("Licensee") accessing and -otherwise using this software ("Python") in source or binary form and -its associated documentation. - -2. Subject to the terms and conditions of this License Agreement, PSF hereby -grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, -analyze, test, perform and/or display publicly, prepare derivative works, -distribute, and otherwise use Python alone or in any derivative version, -provided, however, that PSF's License Agreement and PSF's notice of copyright, -i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -2011, 2012 Python Software Foundation; All Rights Reserved" are retained in Python -alone or in any derivative version prepared by Licensee. - -3. In the event Licensee prepares a derivative work that is based on -or incorporates Python or any part thereof, and wants to make -the derivative work available to others as provided herein, then -Licensee hereby agrees to include in any such work a brief summary of -the changes made to Python. - -4. PSF is making Python available to Licensee on an "AS IS" -basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR -IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND -DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS -FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT -INFRINGE ANY THIRD PARTY RIGHTS. - -5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON -FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS -A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, -OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. - -6. This License Agreement will automatically terminate upon a material -breach of its terms and conditions. - -7. Nothing in this License Agreement shall be deemed to create any -relationship of agency, partnership, or joint venture between PSF and -Licensee. This License Agreement does not grant permission to use PSF -trademarks or trade name in a trademark sense to endorse or promote -products or services of Licensee, or any third party. - -8. By copying, installing or otherwise using Python, Licensee -agrees to be bound by the terms and conditions of this License -Agreement. - - -BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 -------------------------------------------- - -BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 - -1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an -office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the -Individual or Organization ("Licensee") accessing and otherwise using -this software in source or binary form and its associated -documentation ("the Software"). - -2. Subject to the terms and conditions of this BeOpen Python License -Agreement, BeOpen hereby grants Licensee a non-exclusive, -royalty-free, world-wide license to reproduce, analyze, test, perform -and/or display publicly, prepare derivative works, distribute, and -otherwise use the Software alone or in any derivative version, -provided, however, that the BeOpen Python License is retained in the -Software, alone or in any derivative version prepared by Licensee. - -3. BeOpen is making the Software available to Licensee on an "AS IS" -basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR -IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND -DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS -FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT -INFRINGE ANY THIRD PARTY RIGHTS. - -4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE -SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS -AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY -DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. - -5. This License Agreement will automatically terminate upon a material -breach of its terms and conditions. - -6. This License Agreement shall be governed by and interpreted in all -respects by the law of the State of California, excluding conflict of -law provisions. Nothing in this License Agreement shall be deemed to -create any relationship of agency, partnership, or joint venture -between BeOpen and Licensee. This License Agreement does not grant -permission to use BeOpen trademarks or trade names in a trademark -sense to endorse or promote products or services of Licensee, or any -third party. As an exception, the "BeOpen Python" logos available at -http://www.pythonlabs.com/logos.html may be used according to the -permissions granted on that web page. - -7. By copying, installing or otherwise using the software, Licensee -agrees to be bound by the terms and conditions of this License -Agreement. - - -CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 ---------------------------------------- - -1. This LICENSE AGREEMENT is between the Corporation for National -Research Initiatives, having an office at 1895 Preston White Drive, -Reston, VA 20191 ("CNRI"), and the Individual or Organization -("Licensee") accessing and otherwise using Python 1.6.1 software in -source or binary form and its associated documentation. - -2. Subject to the terms and conditions of this License Agreement, CNRI -hereby grants Licensee a nonexclusive, royalty-free, world-wide -license to reproduce, analyze, test, perform and/or display publicly, -prepare derivative works, distribute, and otherwise use Python 1.6.1 -alone or in any derivative version, provided, however, that CNRI's -License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) -1995-2001 Corporation for National Research Initiatives; All Rights -Reserved" are retained in Python 1.6.1 alone or in any derivative -version prepared by Licensee. Alternately, in lieu of CNRI's License -Agreement, Licensee may substitute the following text (omitting the -quotes): "Python 1.6.1 is made available subject to the terms and -conditions in CNRI's License Agreement. This Agreement together with -Python 1.6.1 may be located on the Internet using the following -unique, persistent identifier (known as a handle): 1895.22/1013. This -Agreement may also be obtained from a proxy server on the Internet -using the following URL: http://hdl.handle.net/1895.22/1013". - -3. In the event Licensee prepares a derivative work that is based on -or incorporates Python 1.6.1 or any part thereof, and wants to make -the derivative work available to others as provided herein, then -Licensee hereby agrees to include in any such work a brief summary of -the changes made to Python 1.6.1. - -4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" -basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR -IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND -DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS -FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT -INFRINGE ANY THIRD PARTY RIGHTS. - -5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON -1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS -A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, -OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. - -6. This License Agreement will automatically terminate upon a material -breach of its terms and conditions. - -7. This License Agreement shall be governed by the federal -intellectual property law of the United States, including without -limitation the federal copyright law, and, to the extent such -U.S. federal law does not apply, by the law of the Commonwealth of -Virginia, excluding Virginia's conflict of law provisions. -Notwithstanding the foregoing, with regard to derivative works based -on Python 1.6.1 that incorporate non-separable material that was -previously distributed under the GNU General Public License (GPL), the -law of the Commonwealth of Virginia shall govern this License -Agreement only as to issues arising under or with respect to -Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this -License Agreement shall be deemed to create any relationship of -agency, partnership, or joint venture between CNRI and Licensee. This -License Agreement does not grant permission to use CNRI trademarks or -trade name in a trademark sense to endorse or promote products or -services of Licensee, or any third party. - -8. By clicking on the "ACCEPT" button where indicated, or by copying, -installing or otherwise using Python 1.6.1, Licensee agrees to be -bound by the terms and conditions of this License Agreement. - - ACCEPT - - -CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 --------------------------------------------------- - -Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, -The Netherlands. All rights reserved. - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Stichting Mathematisch -Centrum or CWI not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. - -STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO -THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE -FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -= = = = = diff --git a/README.md b/README.md deleted file mode 100644 index 07cbf21..0000000 --- a/README.md +++ /dev/null @@ -1,286 +0,0 @@ -Mypy: Optional Static Typing for Python -======================================= - -[![Build Status](https://travis-ci.org/python/mypy.svg)](https://travis-ci.org/python/mypy) - - -Got a question? File an issue! ------------------------------- - -We don't have a mailing list; but we are always happy to answer questions -filed as issues in our [tracker](https://github.com/python/mypy/issues). - - -What is mypy? -------------- - -Mypy is an optional static type checker for Python. You can add type -hints to your Python programs using the standard for type -annotations introduced in Python 3.5 ([PEP 484](https://www.python.org/dev/peps/pep-0484/)), and use mypy to -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.2 and later. - -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/)). - -You can mix dynamic and static typing in your programs. You can always -fall back to dynamic typing when static typing is not convenient, such -as for legacy code. - -Here is a small example to whet your appetite: - -```python -from typing import Iterator - -def fib(n: int) -> Iterator[int]: - a, b = 0, 1 - while a < n: - yield a - a, b = b, a + b -``` - -Mypy is in development; some features are missing and there are bugs. -See 'Development status' below. - - -Requirements ------------- - -You need Python 3.2 or later to run mypy. You can have multiple Python -versions (2.x and 3.x) installed on the same system without problems. - -In Ubuntu, Mint and Debian you can install Python 3 like this: - - $ sudo apt-get install python3 python3-pip - -For other Linux flavors, OS X and Windows, packages are available at - - http://www.python.org/getit/ - - -Quick start ------------ - -Mypy can be installed using pip: - - $ pip3 install mypy-lang - -*Note that the package name is `mypy-lang`, not `mypy`.* - -If you want to run the latest version of the code, you can install from git: - - $ pip3 install git+git://github.com/python/mypy.git - - -Now, if Python on your system is configured properly (else see -"Troubleshooting" below), you can type-check a program like this: - - $ mypy PROGRAM - -You can always use a Python interpreter to run your statically typed -programs, even if they have type errors: - - $ python3 PROGRAM - - -Web site and documentation --------------------------- - -Documentation and additional information is available at the web site: - - http://www.mypy-lang.org/ - -Or you can jump straight to the documentation: - - http://mypy.readthedocs.io/ - - -Troubleshooting ---------------- - -Depending on your configuration, you may have to run `pip` like -this: - - $ python3 -m pip install mypy-lang - -If the `mypy` command isn't found after installation: After either -`pip3 install` or `setup.py install`, the `mypy` script and -dependencies, including the `typing` module, will be installed to -system-dependent locations. Sometimes the script directory will not -be in `PATH`, and you have to add the target directory to `PATH` -manually or create a symbolic link to the script. In particular, on -Mac OS X, the script may be installed under `/Library/Frameworks`: - - /Library/Frameworks/Python.framework/Versions//bin - -In Windows, the script is generally installed in -`\PythonNN\Scripts`. So, type check a program like this (replace -`\Python34` with your Python installation path): - - C:\>\Python34\python \Python34\Scripts\mypy PROGRAM - -### Working with `virtualenv` - -If you are using [`virtualenv`](https://virtualenv.pypa.io/en/stable/), -make sure you are running a python3 environment. Installing via `pip3` -in a v2 environment will not configure the environment to run installed -modules from the command line. - - $ python3 -m pip install virtualenv - $ python3 -m virtualenv env - - -Quick start for contributing to mypy ------------------------------------- - -If you want to contribute, first clone the mypy git repository: - - $ git clone --recurse-submodules https://github.com/python/mypy.git - -Run the supplied `setup.py` script to install mypy: - - $ python3 setup.py install - -Replace `python3` with your Python 3 interpreter. You may have to do -the above as root. For example, in Ubuntu and Mac OS X: - - $ sudo python3 setup.py install - -Now you can use the `mypy` program just as above. In case of trouble -see "Troubleshooting" above. - -The mypy wiki contains some useful information for contributors: - - https://github.com/python/mypy/wiki/Developer-Guides - -Working with the git version of mypy ------------------------------------- - -mypy contains a submodule, "typeshed". See http://github.com/python/typeshed. -This submodule contains types for the Python standard library. - -Due to the way git submodules work, you'll have to do -``` - git submodule update typeshed -``` -whenever you change branches, merge, rebase, or pull. - -(It's possible to automate this: Search Google for "git hook update submodule") - -Running tests and linting -------------------------- - -First install any additional dependencies needed for testing: - - $ pip3 install -r test-requirements.txt - -To run all tests, run the script `runtests.py` in the mypy repository: - - $ ./runtests.py - -Note that some tests will be disabled for older python versions. - -This will run all tests, including integration and regression tests, -and will type check mypy and verify that all stubs are valid. You can also -run unit tests only, which run pretty quickly: - - $ ./runtests.py unit-test - -You can run a subset of test suites by passing positive or negative -filters: - - $ ./runtests.py lex parse -x lint -x stub - -If you want to run individual unit tests, you can run `myunit` directly, or -pass inferior arguments via `-a`: - - $ PYTHONPATH=$PWD scripts/myunit -m mypy.test.testlex -v '*backslash*' - $ ./runtests.py mypy.test.testlex -a -v -a '*backslash*' - -You can also run the type checker for manual testing without -installing anything by setting up the Python module search path -suitably (the lib-typing/3.2 path entry is not needed for Python 3.5 -or when you have manually installed the `typing` module): - - $ export PYTHONPATH=$PWD:$PWD/lib-typing/3.2 - $ python -m mypy PROGRAM.py - -You can add the entry scripts to PATH for a single python3 version: - - $ export PATH=$PWD/scripts - $ mypy PROGRAM.py - -You can check a module or string instead of a file: - - $ mypy PROGRAM.py - $ mypy -m MODULE - $ mypy -c 'import MODULE' - -To run the linter: - - $ ./runtests.py lint - - -Coverage reports ----------------- - -There is an experimental feature to generate coverage reports. To use -this feature, you need to `pip install lxml`. This is an extension -module and requires various library headers to install; on a -Debian-derived system the command - apt-get install python3-dev libxml2-dev libxslt1-dev -may provide the necessary dependencies. - -To use the feature, pass e.g. `--txt-report "$(mktemp -d)"`. - - -Development status ------------------- - -Mypy is work in progress and is not yet production quality, though -mypy development has been done using mypy for a while! - -Here are some of the more significant Python features not supported -right now (but all of these will improve): - - - Python 2.x support needs polish and documentation - - properties with setters not supported - - limited metaclass support - - only a subset of Python standard library modules are supported, and some - only partially - - 3rd party module support is limited - -The current development focus is to have a good coverage of Python -features and the standard library (both 3.x and 2.7). - - -Issue tracker -------------- - -Please report any bugs and enhancement ideas using the mypy issue -tracker: - - https://github.com/python/mypy/issues - -Feel free to also ask questions on the tracker. - - -Help wanted ------------ - -Any help in testing, development, documentation and other tasks is -highly appreciated and useful to the project. Contact the developers -to join the project, or just start coding and send pull requests! -There are tasks for contributors of all experience levels. - -For more details, see the file [CONTRIBUTING.md](CONTRIBUTING.md). - - -License -------- - -Mypy is licensed under the terms of the MIT License (see the file -LICENSE). diff --git a/python3-mypy.spec b/python3-mypy.spec index 352f1fa..143d693 100644 --- a/python3-mypy.spec +++ b/python3-mypy.spec @@ -1,6 +1,6 @@ Name: python3-mypy -Version: 0.620 -Release: 3%{?dist} +Version: 0.670 +Release: 1%{?dist} Summary: A static type checker for Python %{?python_provide:%python_provide python3-mypy} @@ -8,13 +8,7 @@ Summary: A static type checker for Python # package does not include those files License: MIT URL: https://github.com/python/mypy -Source0: https://github.com/python/mypy/releases/download/v%{version}/mypy-%{version}.tar.gz - -# doc files are missing from sdist, these are the copies from upstream github -Source1: LICENSE -Source2: README.md -Source3: CREDITS -Source4: CONTRIBUTING.md +Source0: %{url}/archive/v%{version}/mypy-%{version}.tar.gz # Change the search for data_dir to use Fedora's typeshed package instead of a # bundled version @@ -27,14 +21,13 @@ Patch2: 0002-Canonicalize-bin_dir-when-looking-for-data_dir.patch Patch3: 0003-Pass-executable-path-into-main-when-running-installe.patch BuildRequires: python3-devel +BuildRequires: python3-setuptools # Needed to generate the man pages BuildRequires: help2man -BuildRequires: python3-typed_ast +BuildRequires: (python3-typed_ast >= 1.3.1 with python3-typed_ast < 1.4.0) Requires: python-typeshed -Requires: python3-typed_ast -Requires: python3-psutil BuildArch: noarch @@ -47,10 +40,6 @@ running them! %prep %autosetup -n mypy-%{version} -p1 -cp %{SOURCE1} . -cp %{SOURCE2} . -cp %{SOURCE3} . -cp %{SOURCE4} . %build %py3_build @@ -84,6 +73,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{_prefix}/lib/mypy %changelog +* Sat Feb 23 2019 Igor Gnatenko - 0.670-1 +- Update to 0.670 + * Sat Feb 02 2019 Fedora Release Engineering - 0.620-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 294ba79..21f6a78 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mypy-0.620.tar.gz) = 97c003b771ea1da3a2a58331042e23acc870afb7bce7f1af234fe64f0f247652d26ee34628ebd5c6e8901755a4c67f86c90ce4b145a9aedff64fbf247e42c804 +SHA512 (mypy-0.670.tar.gz) = 1fb994410acb3ae3ef6c4380f1b76d2f65790fa7822067dfd75eb34d0336547f85810e475563c797dca268de35b1594217cb3edfe32033eb012d121a3a2e6406