INNER CODE UNIT · Python

__call__

smagafurov/fastapi-jsonrpc · fastapi_jsonrpc/__init__.py:51

    def __call__(self, *args: Any, **kwargs: Any) -> Any: ...


_CallableT = TypeVar('_CallableT', bound=_MethodCallable)

try:
    import sentry_sdk
    import sentry_sdk.tracing
    from sentry_sdk.utils import transaction_from_function as sentry_transaction_from_function
except ImportError:
    sentry_sdk = None  # type: ignore[assignment]
    sentry_transaction_from_function = None  # type: ignore[assignment]

if sentry_sdk is not None and not hasattr(sentry_sdk, 'new_scope'):
    # `new_scope` marks sentry-sdk 2.x; 1.x built everything on the Hub, which 2.x deprecated
    warnings.warn(
        f"fastapi-jsonrpc supports only sentry-sdk 2.*, got {sentry_sdk.VERSION}: "
        f"the Sentry integration is turned off. Upgrade sentry-sdk to use it."

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…