Make the Python 2 and 3 concurrent.futures stubs identical so fixes get
applied to both.
For example, #1305 and #2233 fixed the same problem at different times,
as did #1078 and #1911.
By making the stubs identical, we apply the fix from #1711 to Python 2.
Fixes#2234.
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.
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.
* 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
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.
* 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