From 5bd053b4f5982569f4cec3616558b31e8ce73ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Fri, 20 Sep 2024 16:12:26 +0200 Subject: [PATCH] fix rethrow --- CHANGELOG.md | 3 ++- satella/__init__.py | 2 +- satella/coding/recast_exceptions.py | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d912699e..dfd5322b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ -# v.25.a3 +# v2.25.6 +* deprecated rethrow_as * fixed circular import # v2.25.5 diff --git a/satella/__init__.py b/satella/__init__.py index e4b1c621..4416575d 100644 --- a/satella/__init__.py +++ b/satella/__init__.py @@ -1 +1 @@ -__version__ = '2.25.6a3' +__version__ = '2.25.6' diff --git a/satella/coding/recast_exceptions.py b/satella/coding/recast_exceptions.py index 6ab8ff6a..7605a875 100644 --- a/satella/coding/recast_exceptions.py +++ b/satella/coding/recast_exceptions.py @@ -2,6 +2,7 @@ import inspect import logging import threading import typing as tp +import warnings from .decorators.decorators import wraps from .typing import ExceptionClassType, T, NoArgCallable, ExceptionList @@ -238,6 +239,7 @@ class rethrow_as: exception_preprocessor: tp.Optional[tp.Callable[[Exception], str]] = repr, returns=None, returns_factory: tp.Optional[NoArgCallable[tp.Any]] = None): + warnings.warn('Deprecated, use reraise_as', DeprecationWarning) try: a, b = pairs # throws ValueError op = issubclass(b, BaseException) # throws TypeError -- GitLab