From 966583c002859def1a917c4b4f57dbd3c0ec9135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rog=C3=A9rio=20Sampaio?= Date: Wed, 8 Nov 2023 20:23:00 -0300 Subject: [PATCH 1/2] ignore more errors when trying to set hooks --- alive_progress/core/hook_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() From 2b4d3cb66c9ca0c0e2b9e921c39759e9dd5a7b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rog=C3=A9rio=20Sampaio?= Date: Wed, 8 Nov 2023 20:23:17 -0300 Subject: [PATCH 2/2] bump version --- CHANGELOG.md | 4 ++++ alive_progress/__init__.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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'