Skip to content

Commit f8661f7

Browse files
Version gate unraisable exception integration
1 parent 3756921 commit f8661f7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sentry_sdk/integrations/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from abc import ABC, abstractmethod
22
from threading import Lock
3+
import sys
34

45
from sentry_sdk.utils import logger
56

@@ -71,9 +72,13 @@ def iter_default_integrations(with_auto_enabling_integrations):
7172
"sentry_sdk.integrations.modules.ModulesIntegration",
7273
"sentry_sdk.integrations.stdlib.StdlibIntegration",
7374
"sentry_sdk.integrations.threading.ThreadingIntegration",
74-
"sentry_sdk.integrations.unraisablehook.UnraisablehookIntegration",
7575
]
7676

77+
if sys.version_info >= (3, 8):
78+
_DEFAULT_INTEGRATIONS.append(
79+
"sentry_sdk.integrations.unraisablehook.UnraisablehookIntegration"
80+
)
81+
7782
_AUTO_ENABLING_INTEGRATIONS = [
7883
"sentry_sdk.integrations.aiohttp.AioHttpIntegration",
7984
"sentry_sdk.integrations.anthropic.AnthropicIntegration",

0 commit comments

Comments
 (0)