arpakitlib 1.8.236__py3-none-any.whl → 1.8.237__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- arpakitlib/raise_own_exception_if_exception.py +6 -2
- {arpakitlib-1.8.236.dist-info → arpakitlib-1.8.237.dist-info}/METADATA +1 -1
- {arpakitlib-1.8.236.dist-info → arpakitlib-1.8.237.dist-info}/RECORD +6 -6
- {arpakitlib-1.8.236.dist-info → arpakitlib-1.8.237.dist-info}/LICENSE +0 -0
- {arpakitlib-1.8.236.dist-info → arpakitlib-1.8.237.dist-info}/WHEEL +0 -0
- {arpakitlib-1.8.236.dist-info → arpakitlib-1.8.237.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,7 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
3
|
import inspect
|
4
|
+
import logging
|
4
5
|
from functools import wraps
|
5
6
|
from typing import Any, Callable, Awaitable, Tuple, TypeVar, ParamSpec, cast
|
6
7
|
|
@@ -9,6 +10,7 @@ _ARPAKIT_LIB_MODULE_VERSION = "3.0"
|
|
9
10
|
PARAMS_SPEC = ParamSpec("PARAMS_SPEC")
|
10
11
|
RESULT_SPEC = TypeVar("RESULT_SPEC")
|
11
12
|
|
13
|
+
_logger = logging.getLogger(__name__)
|
12
14
|
|
13
15
|
def raise_own_exception_if_exception(
|
14
16
|
*,
|
@@ -78,7 +80,8 @@ def raise_own_exception_if_exception(
|
|
78
80
|
if forward_kwargs_in_own_exception is not None:
|
79
81
|
_kwargs.update(forward_kwargs_in_own_exception)
|
80
82
|
raise own_exception(**_kwargs) from caught_exception
|
81
|
-
except TypeError:
|
83
|
+
except TypeError as exception:
|
84
|
+
_logger.warning(exception)
|
82
85
|
raise own_exception() from caught_exception
|
83
86
|
|
84
87
|
return cast(Callable[PARAMS_SPEC, Awaitable[RESULT_SPEC]], async_wrapper)
|
@@ -101,7 +104,8 @@ def raise_own_exception_if_exception(
|
|
101
104
|
if forward_kwargs_in_own_exception is not None:
|
102
105
|
_kwargs.update(forward_kwargs_in_own_exception)
|
103
106
|
raise own_exception(**_kwargs) from caught_exception
|
104
|
-
except TypeError:
|
107
|
+
except TypeError as exception:
|
108
|
+
_logger.warning(exception)
|
105
109
|
raise own_exception() from caught_exception
|
106
110
|
|
107
111
|
return cast(Callable[PARAMS_SPEC, RESULT_SPEC], wrapper)
|
@@ -422,9 +422,9 @@ arpakitlib/ar_type_util.py,sha256=Cs_tef-Fc5xeyAF54KgISCsP11NHyzIsglm4S3Xx7iM,40
|
|
422
422
|
arpakitlib/ar_yookassa_api_client_util.py,sha256=VozuZeCJjmLd1zj2BdC9WfiAQ3XYOrIMsdpNK-AUlm0,5347
|
423
423
|
arpakitlib/clone_pydantic_model_fields.py,sha256=xxLwtvJzDf8EWMvBE4psWIj8c-cyeCxLRX76oCY_4zk,1214
|
424
424
|
arpakitlib/pydantic_schema_from_sqlalchemy_model.py,sha256=_5Y79kQ4lLIOL6_afIFVwxY1EXzTMpi-veRR-WkPFOs,2879
|
425
|
-
arpakitlib/raise_own_exception_if_exception.py,sha256=
|
426
|
-
arpakitlib-1.8.
|
427
|
-
arpakitlib-1.8.
|
428
|
-
arpakitlib-1.8.
|
429
|
-
arpakitlib-1.8.
|
430
|
-
arpakitlib-1.8.
|
425
|
+
arpakitlib/raise_own_exception_if_exception.py,sha256=81OHXgjrvdNdRaf6NuhPAXucBzj7wwf9deUdVWE7Hlg,5762
|
426
|
+
arpakitlib-1.8.237.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
|
427
|
+
arpakitlib-1.8.237.dist-info/METADATA,sha256=HzHwt14Ui3Kj8IXkEn2NIUgwEVb7LygpLFoV-Y_xtgA,3741
|
428
|
+
arpakitlib-1.8.237.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
429
|
+
arpakitlib-1.8.237.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
|
430
|
+
arpakitlib-1.8.237.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|