From cbd2bcc92aeab59fb54dc03a7be4e24e4a967160 Mon Sep 17 00:00:00 2001 From: Shail Shouryya Date: Sat, 19 Jun 2021 12:14:16 -0700 Subject: [PATCH] 0.0.7: Provide start, end, & runtime duration logging for thread - ==> If you want to mute logging this message to the terminal for all ThreadWithResult instances, set the `log_thread_status` class attribute to False: ``` ThreadWithResult.log_thread_status = False ``` - ==> If you only want to mute logging this message to the terminal for a specific instance of ThreadWithResult, set the `log_thread_status` attribute for the specific instance to False: ``` thread_with_result_instance.log_thread_status = False ``` - Keep in mind python prioritizes the `log_thread_status` instance attribute over the `log_thread_status` class attribute! - ==> If you want to log this message to an output file (or multiple output files) for all ThreadWithResult instances, set the `log_files` class attribute to an iterable object contatining objects that support the `.write()` method: ``` ThreadWithResult.log_files = [file_object_1, file_object_2] ``` - ==> If you only want to log this message to an output file (or multiple output files) for a specific instance of ThreadWithResult, set the `log_files` attribute for the specific instance to an iterable object contatining objects that support the `.write()` method: ``` thread_with_result_instance.log_files = [file_object_1, file_object_2] ``` - Keep in mind python prioritizes the `log_files` instance attribute over the `log_files` class attribute! - ==> To see a more detailed explanation, see the updated documentation with ``` import save_thread_result help(save_thread_result) ``` - release 0.0.7 also removes the irrelevant "Operating System :: RISC OS" PyPI classifier --- python/save_thread_result/__init__.py | 2 +- python/setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/save_thread_result/__init__.py b/python/save_thread_result/__init__.py index a0e6751..e7585ea 100644 --- a/python/save_thread_result/__init__.py +++ b/python/save_thread_result/__init__.py @@ -9,7 +9,7 @@ from datetime import datetime -__version__ = '0.0.6' +__version__ = '0.0.7' __author__ = 'Shail-Shouryya' __email__ = 'shailshouryya@gmail.com' __development_status__ = '4 - Beta' diff --git a/python/setup.py b/python/setup.py index 70920a0..4627ae8 100644 --- a/python/setup.py +++ b/python/setup.py @@ -31,7 +31,7 @@ # 3. MAINTENANCE version when they make backwards-compatible bug fixes. # Adopting this approach as a project author allows users to make use of “compatible release” specifiers, where name ~= X.Y requires at least release X.Y, but also allows any later release with a matching MAJOR version. # Python projects adopting semantic versioning should abide by clauses 1-8 of the Semantic Versioning 2.0.0 specification: https://semver.org/. - version = '0.0.6', + version = '0.0.7', name = 'save-thread-result', description = 'Simple subclass wrapper around `threading.Thread` to get the return value from a thread in python. Exact same interface as `threading.Thread`! 🌟 Star this repo if you found it useful! 🌟', long_description = long_description,