diff --git a/CHANGELOG.md b/CHANGELOG.md index a91902992a263ba7e9e8b63ae83e97eb51e09976..0f535d16bf4b67713ffe8cfa36c763b5b612f506 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,3 +2,4 @@ * deprecated `call_and_return_stdout` * deprecated `retry(call_on_failure=)` +* added default parameter to `ThreadCollection` diff --git a/satella/__init__.py b/satella/__init__.py index c339b6e498d991af313662b868b7c1b0b84e7c97..88c43039a497631a40a674d8382798ac2d3f4efa 100644 --- a/satella/__init__.py +++ b/satella/__init__.py @@ -1 +1 @@ -__version__ = '2.17.16a4' +__version__ = '2.17.16a5' diff --git a/satella/coding/concurrent/thread_collection.py b/satella/coding/concurrent/thread_collection.py index b4c5aadedce04fa68c8d760b7824589f31a77a41..bb1b9a1640e5ed8a8e546883e7579e1e7f1ec109 100644 --- a/satella/coding/concurrent/thread_collection.py +++ b/satella/coding/concurrent/thread_collection.py @@ -72,8 +72,11 @@ class ThreadCollection: for thread in self.threads: thread.daemon = v - def __init__(self, threads: tp.Sequence[Thread]): - self.threads = list(threads) + def __init__(self, threads: tp.Optional[tp.Sequence[Thread]] = None): + if threads is None: + self.threads = [] + else: + self.threads = list(threads) or [] def append(self, thread: Thread) -> 'ThreadCollection': """