From 9327e4e62803330f3091b787a76ad37afe8d755e Mon Sep 17 00:00:00 2001 From: Anton Pirker Date: Thu, 22 Jun 2023 10:09:43 +0200 Subject: [PATCH] Fixed circular import --- Makefile | 2 +- sentry_sdk/_compat.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a4d07279da..2011b1b63e 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ lint: .venv apidocs: .venv @$(VENV_PATH)/bin/pip install --editable . @$(VENV_PATH)/bin/pip install -U -r ./docs-requirements.txt - @$(VENV_PATH)/bin/sphinx-build -W -b html docs/ docs/_build + @$(VENV_PATH)/bin/sphinx-build -vv -W -b html docs/ docs/_build .PHONY: apidocs apidocs-hotfix: apidocs diff --git a/sentry_sdk/_compat.py b/sentry_sdk/_compat.py index 589967f508..0e56608d13 100644 --- a/sentry_sdk/_compat.py +++ b/sentry_sdk/_compat.py @@ -2,8 +2,6 @@ from sentry_sdk._types import TYPE_CHECKING -from sentry_sdk.consts import FALSE_VALUES - if TYPE_CHECKING: from typing import Optional from typing import Tuple @@ -84,6 +82,9 @@ def check_thread_support(): if "threads" in opt: return + # put here because of circular import + from sentry_sdk.consts import FALSE_VALUES + if str(opt.get("enable-threads", "0")).lower() in FALSE_VALUES: from warnings import warn