Skip to content

Commit f7244a2

Browse files
committed
anthropic
1 parent 52211a3 commit f7244a2

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

sentry_sdk/integrations/anthropic.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import sentry_sdk
55
from sentry_sdk.ai.monitoring import record_token_usage
66
from sentry_sdk.consts import OP, SPANDATA
7-
from sentry_sdk.integrations import DidNotEnable, Integration
7+
from sentry_sdk.integrations import _check_minimum_version, DidNotEnable, Integration
88
from sentry_sdk.scope import should_send_default_pii
99
from sentry_sdk.utils import (
1010
capture_internal_exceptions,
@@ -37,12 +37,7 @@ def __init__(self, include_prompts=True):
3737
def setup_once():
3838
# type: () -> None
3939
version = package_version("anthropic")
40-
41-
if version is None:
42-
raise DidNotEnable("Unparsable anthropic version.")
43-
44-
if version < (0, 16):
45-
raise DidNotEnable("anthropic 0.16 or newer required.")
40+
_check_minimum_version(AnthropicIntegration, version)
4641

4742
Messages.create = _wrap_message_create(Messages.create)
4843
AsyncMessages.create = _wrap_message_create_async(AsyncMessages.create)

sentry_sdk/integrations/asyncpg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ def __init__(self, *, record_params: bool = False):
3333
def setup_once() -> None:
3434
# asyncpg.__version__ is a string containing the semantic version in the form of "<major>.<minor>.<patch>"
3535
asyncpg_version = parse_version(asyncpg.__version__)
36-
3736
_check_minimum_version(AsyncPGIntegration, asyncpg_version)
3837

3938
asyncpg.Connection.execute = _wrap_execute(

0 commit comments

Comments
 (0)