Commit Graph

16 Commits

Author SHA1 Message Date
matthewfranglen
9a6a7a2e75 See #1977: Delete DoneAndNotDoneFutures definition (#1978)
The generic type of the futures provided to the wait method cannot
currently be preserved through this definition. For now deleting the
unused NamedTuple is the best approach.
2018-03-22 07:59:13 -07:00
Daniel Li
2c6296034f Future.set_running_or_notify_cancel returns bool (#1911)
Future.set_running_or_notify_cancel returns a bool, not None. See commit
13bcc79c12, where this problem was fixed
for Python 2.
2018-02-22 09:03:37 -08:00
Josh Staiger
bc2f88d6ee Make Executor.__enter__ self and return types match (#1711)
Specifically, this solves a problem in code such as:

with ThreadPoolExecutor() as p: ...

Where the p variable would be typed as an abstract `Executor`, rather than the specific `ThreadPoolExecutor` as expected.
2017-11-04 13:56:55 -07:00
Martin DeMello
817c270c32 Clean out the pytype blacklist (#1667) 2017-10-24 10:38:34 -07:00
Miguel Gaiowski
a8dea5e05c Update types for ThreadPoolExecutor for py3.6 (#1414)
* Update types for ThreadPoolExecutor for py3.6

* Removed Optional from ThreadPoolExecutor thread_name_prefix argument
2017-06-16 17:06:22 -07:00
Jelle Zijlstra
6c5474ae8c various fixes to asyncio stubs (#1305) 2017-05-23 16:14:29 -07:00
Max
df9df65882 More precise signatures in concurrent.futures (#1262)
* Allow None in concurrent.futures.exception() and set_exception()

* Make Executor.map() signature more precise

* Remove superfluous signatures

* Specify str type for some concurrent.futures constants

* Update concurrent.futures backport

* CR fixes
2017-05-14 13:55:27 -07:00
Richard Hansen
55d4c08a8e Use BaseException for Future.exception() and .set_exception(). (#935)
The concurrent.futures.Future class's set_exception() method might be
called with a BaseException that is not an Exception, so change
set_exception()'s parameter type from Exception to BaseException.  The
exception set via set_exception() is returned by exception(), so
change exception()'s return type from Exception to BaseException.
2017-02-15 08:19:49 -08:00
Lukasz Langa
82b2d8e3bc Fixing flake8 F403, F405 errors 2016-12-20 02:28:12 -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
Filip Figiel
d60bea14f6 Improve concurrent.futures.wait function stub (#634) 2016-10-26 07:19:24 -07:00
Sebastian Meßmer
93ef68315b Fixed types in stdlib/3/concurrent/futures: (#557)
* Fixed types in stdlib/3/concurrent/futures:
 - Remove private classes from public interface
 - Add missing types

* Remove "generated by stubgen" headers from modified type stubs

* - Use ... as default value
- Fix space formatting

* Replace more default values with '...'

* Use 'None' as default value where specified by documentation

* Use explicit Optional[T] type instead of default value None
2016-09-19 08:13:12 -07:00
David Euresti
cc8799ee36 Make Future a generic, like in python2 (#449) 2016-08-05 11:57:10 -07:00
Guido van Rossum
3a01aeb562 Fix bad syntax in two stubs. 2016-06-30 09:00:13 -07:00
Ben Darnell
57e25550bc concurrent.futures: stubgen
Imports had to be fixed up manually.
2016-04-11 00:27:58 -04:00