From f796ddcb51e623a1cb2689788d9d6548d9598b6c Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Fri, 20 Sep 2024 14:04:11 +0200 Subject: [PATCH] fix: Don't use deprecated logger.warn --- sentry_sdk/integrations/langchain.py | 2 +- tests/integrations/django/myapp/settings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sentry_sdk/integrations/langchain.py b/sentry_sdk/integrations/langchain.py index fefc4619db..9a784ddf19 100644 --- a/sentry_sdk/integrations/langchain.py +++ b/sentry_sdk/integrations/langchain.py @@ -443,7 +443,7 @@ def new_configure(*args, **kwargs): elif isinstance(existing_callbacks, BaseCallbackHandler): new_callbacks.append(existing_callbacks) else: - logger.warn("Unknown callback type: %s", existing_callbacks) + logger.debug("Unknown callback type: %s", existing_callbacks) already_added = False for callback in new_callbacks: diff --git a/tests/integrations/django/myapp/settings.py b/tests/integrations/django/myapp/settings.py index 0678762b6b..d70adf63ec 100644 --- a/tests/integrations/django/myapp/settings.py +++ b/tests/integrations/django/myapp/settings.py @@ -132,7 +132,7 @@ def middleware(request): except (ImportError, KeyError): from sentry_sdk.utils import logger - logger.warn("No psycopg2 found, testing with SQLite.") + logger.warning("No psycopg2 found, testing with SQLite.") # Password validation