From a8dea5e05ce22096e32848027dd3c574e5f436c0 Mon Sep 17 00:00:00 2001 From: Miguel Gaiowski Date: Fri, 16 Jun 2017 17:06:22 -0700 Subject: [PATCH] Update types for ThreadPoolExecutor for py3.6 (#1414) * Update types for ThreadPoolExecutor for py3.6 * Removed Optional from ThreadPoolExecutor thread_name_prefix argument --- stdlib/3/concurrent/futures/thread.pyi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stdlib/3/concurrent/futures/thread.pyi b/stdlib/3/concurrent/futures/thread.pyi index 1774b639c..88a45a3e0 100644 --- a/stdlib/3/concurrent/futures/thread.pyi +++ b/stdlib/3/concurrent/futures/thread.pyi @@ -1,5 +1,10 @@ from typing import Optional from ._base import Executor, Future +import sys class ThreadPoolExecutor(Executor): - def __init__(self, max_workers: Optional[int] = ...) -> None: ... + if sys.version_info >= (3, 6): + def __init__(self, max_workers: Optional[int] = ..., + thread_name_prefix: str = ...) -> None: ... + else: + def __init__(self, max_workers: Optional[int] = ...) -> None: ...