Commit Graph

1006 Commits

Author SHA1 Message Date
Guido van Rossum
970b6d5eb0 The distutils.Extension class does take positional args, and name+sources do not have defaults (#670) 2016-11-07 17:50:55 -08:00
Jon Dufresne
4b369945d0 Change struct fmt argument to str instead of AnyStr (#669)
Switching between a bytes fmt and str fmt argument can cause a BytesWarning
when running Python with the -b command line argument.
2016-11-07 16:58:25 -08:00
Guido van Rossum
49a8a28c29 Use self-type for parent[s] properties too (#667)
This is possible now that python/mypy#2404 has landed.
2016-11-06 11:21:45 -08:00
TrueBrain
341c4edc37 Args is a predefined attribute on BaseException, and always Tuple[Any, ...] (#666) 2016-11-05 16:33:58 -07:00
TrueBrain
cecb64b59f In TextIO, 'errors' is Optional (#665) 2016-11-05 15:02:35 -07:00
TrueBrain
3452ff5bbd GenericBrowser has two parameters swapped around (#664) 2016-11-05 11:20:14 -07:00
onnokort
cd1ef9149b Queue.get(...) takes optional float (#661) 2016-11-05 10:43:52 -07:00
Guido van Rossum
9881a2567e Start using selftype in 3.5 pathlib (#658) 2016-11-04 15:32:57 -07:00
Guido van Rossum
b476028df7 Fix signature of run_coroutine_threadsafe() (#657) 2016-11-04 14:49:49 -07:00
Guido van Rossum
53014497c4 Add Coroutine. Fix signature for Generator.throw(). (#656) 2016-11-04 11:46:50 -07:00
Guido van Rossum
7f7e2d4e75 Fixes for asyncio (#654)
* Fix signature of gather().  Also fold long lines and kill _GatheringFuture.

* Add several missing exports from tasks.
2016-11-04 11:19:22 -07:00
Guido van Rossum
7c20adb715 Fix memoryview stub (#651)
Fixes python/mypy#2390
2016-11-02 17:18:44 -07:00
Jakub Stasiak
5a2a46d3bd lxml: Document _Element.tag and __iter__ (#650) 2016-11-02 07:44:22 -07:00
Elazar Gershuni
58d60343ba fix self for thirdparty (#646) 2016-10-30 15:02:23 -07:00
Elazar Gershuni
090667c7b2 fix self in urllib (#643) 2016-10-30 15:01:46 -07:00
Elazar Gershuni
59f86e1b6a fix self type for stdlib/2 (#645) 2016-10-30 14:51:52 -07:00
Elazar Gershuni
252a772b67 fix self in ssl, unittest and multiprocessing/managers (#644) 2016-10-30 12:20:03 -07:00
Kai Lautaportti
b1c545cee6 Mark use of tzinfo optional in the datetime module. (#637) 2016-10-30 12:00:18 -07:00
TrueBrain
15ec66cdd6 Consider __doc__ always Optional. (#641)
python/mypy#2380 showed a discrepancy between object and FunctionType in stdlib2. The first defined __doc__ to be str, the second Optional[str]. As FunctionType depends on object, this is no longer valid.

As suggested by @gvanrossum in python/mypy#2380, all __doc__ should be considered Optional.

(Final verdict was just to remove most __doc__ attributes since it's inherited from object.)
2016-10-30 11:48:23 -07:00
Elazar Gershuni
1d47c6fdb8 Directly import ABCMeta (and abstractmethod) from abc (#640)
This change is needed for mypy/#2365.
2016-10-30 11:30:22 -07:00
Elazar Gershuni
7a623f2cea Dedicated TypeVar for type.__subclasses__ (#639) 2016-10-30 10:29:51 -07:00
Dima Gerasimov
58d864d726 Add __enter__ and __exit__ to Pool stub (#642) 2016-10-30 10:18:51 -07:00
nobuggy
fa1eeb024e Two minor glitches in stdlib asyncio.Event.wait() / asyncio.wait_for() (#636)
* Event.wait() is a coroutine (https://docs.python.org/3/library/asyncio-sync.html#asyncio.Event)

* asyncio.wait_for accepts None as timeout (https://docs.python.org/3/library/asyncio-task.html)
2016-10-29 07:58:09 -07:00
Guido van Rossum
fed966cf7f Explain how to run the tests 2016-10-28 08:47:31 -07:00
Guido van Rossum
c3ddd3c5f2 Improve __subclasses__() signature. Fixes python/mypy#2236. 2016-10-27 17:31:03 -07:00
Guido van Rossum
cb97bb54c0 Move 2.7 to 2 (#635)
Closes #579.
2016-10-26 16:24:49 -07:00
Filip Figiel
d60bea14f6 Improve concurrent.futures.wait function stub (#634) 2016-10-26 07:19:24 -07:00
Gerhard Hagerer
96123f8474 Added Lock.locked() method stub (#633)
https://docs.python.org/3/library/asyncio-sync.html#asyncio.Lock.locked
2016-10-26 07:17:59 -07:00
Gerhard Hagerer
0c2e9cf3be Added variable types for resources.pyi (#632)
Just some output from stubgen.pyi
2016-10-26 07:16:48 -07:00
Herbert Ho
3ea39a7c1b update constraints definition for 2.7 sqlalchemy (#630) 2016-10-25 16:00:37 -07:00
Roy Williams
bfbe4f8540 Update lxml stubs to add Element.append and Element.text (#629) 2016-10-25 12:04:42 -07:00
Kai Lautaportti
c8f324298d Added typing for os.cpu_count() (#628) 2016-10-25 10:46:33 -07:00
Kai Lautaportti
f6bbc46c35 Fix functools.lru_cache() type hint to allow maxsize=None (#627) 2016-10-22 15:45:57 -07:00
Elazar
7224b67532 Remove @builtinclass (#626) 2016-10-22 12:25:02 -07:00
Jordan Pittier
83802c6724 stdlib/2and3/pkgutil: Arg 1 to "iter_modules" should be List[str] (#625)
According to https://docs.python.org/2.7/library/pkgutil.html#pkgutil.iter_modules and https://docs.python.org/3/library/pkgutil.html#pkgutil.iter_modules: "path should be either None or a list of paths to look for modules in."
2016-10-21 16:56:34 -07:00
David Fisher
ca318e444f Fix strings that were really bytes in typed_ast (#624) 2016-10-19 16:34:41 -07:00
Matthias Kramm
3253d3cc46 Add more methods to return type of tempfile.{,Named,Spooled}TemporaryFile(). (#623) 2016-10-19 16:07:03 -07:00
Matthias Kramm
df6aeef9fd Add missing methods to 2.7/posixpath.pyi. (#622) 2016-10-19 15:53:36 -07:00
Matthias Kramm
7d80824092 Better definition for xml/sax/__init__.pyi. (#621)
Also, merge 2.7/xml/sax and 3/xml/sax into 2and3/xml/sax.
2016-10-19 15:30:25 -07:00
Kai Lautaportti
8fec896898 Added RecursionError to builtins for Python >= 3.5 (#620)
Closes #619.
2016-10-19 15:06:10 -07:00
Calen Pennington
1db6a12ead assertWarns is only for python >= 3.2 (#618) 2016-10-18 12:23:19 -07:00
Xavier Mehrenberger
6e67acd8b1 2.7/uuid: fix types for NAMESPACE_*: use UUID instead of str (#617) 2016-10-18 08:21:02 -07:00
Matthias Kramm
94d3ddb60a change the way 'os' imports 'os.path' (#601)
* use 'from . import path' instead, in both PY2 and PY3
* update blacklist to include os/__init__.pyi
2016-10-17 17:49:12 -07:00
David Foster
5c4300a4bd Add mypy_extensions. (#611) 2016-10-17 16:39:17 -07:00
Guido van Rossum
bf319675c4 Clarify how to get consent from third party package owners. 2016-10-17 13:19:33 -07:00
Joshua Smock
e503ad4594 Allow any kind of item in the list returned by select (#615) 2016-10-17 12:11:10 -07:00
Calen Pennington
8865baf840 Make ABCMeta inherit from type in py3 (#613) 2016-10-17 09:19:10 -07:00
Guido van Rossum
8d1026cade Fix timeout parameter to Popen.wait() -- it is optional (in both senses). 2016-10-15 21:12:32 -07:00
Sebastian Meßmer
b9ab4ae1c2 Add timeout parameter to subprocess.Popen.wait() (#607)
Also define TimeoutExpired exception.
2016-10-15 14:59:40 -07:00
Yegor Roganov
e4073e385a Improve types of staticmethod and classmethod (#609)
Fixes #318
2016-10-15 14:17:17 -07:00