Commit Graph

37 Commits

Author SHA1 Message Date
Lukasz Langa
6b5c6626d6 Fixing flake8 E121, E122, E123, E124, E125, E126 errors 2016-12-19 23:53:19 -08:00
Lukasz Langa
67e38b6806 Fixing flake8 E231 errors 2016-12-19 23:53:19 -08:00
Lukasz Langa
fe0e3744cc Fixing flake8 E261 errors 2016-12-19 22:09:35 -08:00
Lukasz Langa
b84f20a011 Fixing flake8 W errors 2016-12-19 21:52:56 -08:00
TrueBrain
7e89fc0d49 Define __slots__ for object as Iterable[str] / Iterable[Union[str, unicode]] (#780)
* Define __slots__ for object as Iterable[str] / Iterable[Union[str, unicode]]
* A string as __slots__ value is also valid and represents a single item
2016-12-19 13:09:04 -08:00
Simon Ekstrand
aa6f4a07c1 Fix AbstractEventLoop.call* callable definitions. (#753)
Several asyncio AbstractEventLoop methods take a callback as
an argument that is passed *args. The Callable definition was
incorrect for those callbacks.
2016-12-16 15:15:20 -08:00
nobuggy
3f03849b70 Fix asyncio.wait for() and add exceptions (#676)
* asyncio.wait_for() should accept Awaitable[_T] same as asyncio.gather()

* {Cancelled,Timeout,InvalidState}Error types missing
2016-11-10 11:00:43 -08:00
Guido van Rossum
bf8b5ac5fd Relax signature of gather() (#677)
Fixes #675
2016-11-10 10:55:29 -08:00
Guido van Rossum
b476028df7 Fix signature of run_coroutine_threadsafe() (#657) 2016-11-04 14:49:49 -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
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
claws
35cdafa10e add some missing asyncio items such as gather (#511)
* add some missing asyncio items

* sort items
2016-08-31 07:28:22 -07:00
Guido van Rossum
de4e87f574 Changes required by mypy async-await support (#435) 2016-08-03 17:01:35 -07:00
Guido van Rossum
39325bf159 Mypy now supports sys.platform and sys.version_info checks (#410) 2016-07-27 13:25:29 -07:00
Guido van Rossum
6d8628c247 Misc asyncio changes (#373)
* Add stub for cgi.parse_header().

* Improve asyncio stubs (far from complete)

* More asyncio changes.

* Use @overload to solve strange test failures.

* Add some TODOs. Make ProactorEventLoop conditional.

* Future should not inherit from Awaitable or implement __await__.

At least not yet.

* Fix AbstractServer.wait_closed() return type.

It's a generator, not a future.
2016-07-15 15:44:29 -07:00
tewe
c84c138194 Annotate **kwargs with dictionary value type only (#320) 2016-06-29 08:43:13 -07:00
Alvaro Caceres
d0ac66f5f8 Use "..." for attribute values, instead of None, [], {} 2016-06-15 14:10:04 -05:00
Guido van Rossum
54ba6d9b73 Fix typos: termina[ta]te(). 2016-03-09 09:21:15 -08:00
David Fisher
c50e0e6179 Remove contents of problematic asyncio __all__s 2016-02-25 11:59:25 -08:00
David Fisher
c48d66f28a Fix asyncio.coroutine signature 2016-02-24 11:35:42 -08:00
David Soria Parra
70ddf02d21 Use relative imports in asyncio.tasks and asyncio.futures 2016-02-19 19:52:54 -08:00
David Soria Parra
3223a693d5 Add type information for asyncio.subprocess 2016-02-19 19:52:36 -08:00
David Soria Parra
bce32b0382 Add type information for asyncio.streams 2016-02-19 19:52:36 -08:00
David Soria Parra
3910b79361 Add type information for asyncio.protocols 2016-02-10 23:12:31 -08:00
David Soria Parra
23ecee29d3 Add type information for asyncio.transports 2016-02-10 23:12:31 -08:00
David Soria Parra
0f5c38a2ce Add type information for asyncio.events.AbstractServer
Add the appropriate types for AbstractServer in asyncio.events. wait_closed() is
a couroutine, however in the implementation of AbstractServer not marked
as such. We are adding the couroutine defintion here anyway, as we do want
to make it typeable as a coroutine if necessary.
2016-02-10 22:09:22 -08:00
David Soria Parra
4d0a9e6d49 Add type information for asyncio.coroutines 2016-02-10 22:09:22 -08:00
David Fisher
1a10134d54 Fix up uses of Future as an argument in asyncio
Most functions which can take a Future can take Generators as well.
2016-01-19 16:53:52 -08:00
Guido van Rossum
a080d6cee5 Make Future stub resemble reality better. 2016-01-19 14:23:09 -08:00
Guido van Rossum
107104dfe5 Fix type annotation syntax used in asyncio/futures.pyi. 2015-12-04 11:43:45 -08:00
Roy Williams
7f22db0492 Add Async classes to typing stub. 2015-12-01 23:36:19 -08:00
Matthias Kramm
94c9ce8fd0 Consistently use '= ...' for optional parameters. 2015-11-09 13:55:02 -08:00
Matthias Kramm
d2a3d4a4ed Use explicit "# type: str" instead of '' shortcut. 2015-11-09 07:59:24 -08:00
Ben Longbons
c2f892a409 Fix stubs that assumed reexport without as 2015-10-19 20:02:39 -07:00
Vita Smid
4d39065569 Change Queue.put return type to Future[None] 2015-10-12 08:15:41 -07:00
Vita Smid
b90372f226 Fixed Queue.get and Queue.put return types. 2015-10-12 08:09:22 -07:00
Matthias Kramm
337abed05a add (overwrite with) mypy stubs, if available 2015-09-30 09:59:44 -07:00