diff --git a/CHANGELOG.md b/CHANGELOG.md index b2f9993..c4214c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog +## 3.1.5 - Nov 08, 2023 +- ignore more errors when trying to set hooks (it seems `pyam` uses `setuptools_scm` which does `assert value is sys.stderr` in `setStream()` for whatever reason) + + ## 3.1.4 - May 31, 2023 - support spaces at the start and end of titles and units (removed trim) diff --git a/alive_progress/__init__.py b/alive_progress/__init__.py index 92c6606..2d28b98 100644 --- a/alive_progress/__init__.py +++ b/alive_progress/__init__.py @@ -1,7 +1,7 @@ from .core.configuration import config_handler from .core.progress import alive_bar, alive_it -VERSION = (3, 1, 4) +VERSION = (3, 1, 5) __author__ = 'Rogério Sampaio de Almeida' __email__ = 'rsalmei@gmail.com' diff --git a/alive_progress/core/hook_manager.py b/alive_progress/core/hook_manager.py index 8d5c932..9031bf6 100644 --- a/alive_progress/core/hook_manager.py +++ b/alive_progress/core/hook_manager.py @@ -90,8 +90,8 @@ def get_all_loggers(): def set_hook(h): try: return h.setStream(get_hook_for(h)) - except AttributeError: - pass # ignores errors and return None + except Exception: # captures AttributeError, AssertionError, and anything else, + pass # then returns None, effectively leaving that handler alone, unchanged. # account for reused handlers within loggers. handlers = set(h for logger in get_all_loggers()