From b6978450be2294ffedf523b8824ec47a94c05588 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Fri, 17 Oct 2025 14:48:57 +0200 Subject: [PATCH 01/15] Add warning about 3.0 --- sentry_sdk/_init_implementation.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sentry_sdk/_init_implementation.py b/sentry_sdk/_init_implementation.py index 06e7f28d4f..a18a206b92 100644 --- a/sentry_sdk/_init_implementation.py +++ b/sentry_sdk/_init_implementation.py @@ -1,4 +1,5 @@ from __future__ import annotations +import warnings from typing import TYPE_CHECKING @@ -25,6 +26,10 @@ def _init(*args: Optional[str], **kwargs: Any) -> None: setup_scope_context_management() client = sentry_sdk.Client(*args, **kwargs) sentry_sdk.get_global_scope().set_client(client) + warnings.warn( + "We won't be continuing development on SDK 3.0. Please use the last stable version of the SDK to get access to the newest features and fixes. See https://github.com/getsentry/sentry-python/discussions/4955", + stacklevel=2, + ) _check_python_deprecations() From ff18cb9fbab9abe5dcf58aae8a6ff1471cfdf393 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Fri, 17 Oct 2025 15:11:24 +0200 Subject: [PATCH 02/15] Drop greenlet test, skip newrelic test --- tests/conftest.py | 2 +- tests/integrations/celery/test_celery.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 6312929e96..dd55e06158 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -337,7 +337,7 @@ def read_flush(self): @pytest.fixture( scope="session", params=[None, "gevent"], - ids=("threads", "greenlet"), + ids=("threads",), ) def maybe_monkeypatched_threading(request): if request.param == "gevent": diff --git a/tests/integrations/celery/test_celery.py b/tests/integrations/celery/test_celery.py index 5f36152af0..a47ca65b3f 100644 --- a/tests/integrations/celery/test_celery.py +++ b/tests/integrations/celery/test_celery.py @@ -402,6 +402,7 @@ def dummy_task(self): @pytest.mark.forked +@pytest.skip("Failing test on a discontined branch") @pytest.mark.parametrize("newrelic_order", ["sentry_first", "sentry_last"]) def test_newrelic_interference(init_celery, newrelic_order, celery_invocation): def instrument_newrelic(): From 576fea97df3547e4058e41f40ce592fa788d0ed9 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Fri, 17 Oct 2025 15:13:37 +0200 Subject: [PATCH 03/15] maybe fix mypy --- sentry_sdk/integrations/threading.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentry_sdk/integrations/threading.py b/sentry_sdk/integrations/threading.py index 12b2e31313..bdc5bddedc 100644 --- a/sentry_sdk/integrations/threading.py +++ b/sentry_sdk/integrations/threading.py @@ -38,7 +38,7 @@ def setup_once() -> None: try: from django import VERSION as django_version # noqa: N811 - import channels # type: ignore[import-not-found] + import channels # type: ignore channels_version = channels.__version__ except ImportError: From 4ba100c51bc7b9b92342c1885fbe9e7389c215f0 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Fri, 17 Oct 2025 15:15:28 +0200 Subject: [PATCH 04/15] . --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index dd55e06158..61a2e6b3d3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -337,7 +337,7 @@ def read_flush(self): @pytest.fixture( scope="session", params=[None, "gevent"], - ids=("threads",), + ids=("threads", "gevent"), ) def maybe_monkeypatched_threading(request): if request.param == "gevent": From 4c242781f18bdc093ceb35f864af11d13164dd8e Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Mon, 20 Oct 2025 09:44:37 +0200 Subject: [PATCH 05/15] port zope.interface bound from master --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index 4a4c07e5e1..ec3c5cfe42 100644 --- a/tox.ini +++ b/tox.ini @@ -328,6 +328,8 @@ deps = {py3.8,py3.9,py3.10,py3.11,py3.12}-gevent: pytest gevent: pytest-asyncio {py3.10,py3.11}-gevent: zope.event<5.0.0 + {py3.10,py3.11}-gevent: zope.interface<8.0 + # === Integrations === From 72972373e6f9ceab51e5eb6510bd36b84aaaab6a Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Mon, 20 Oct 2025 09:50:44 +0200 Subject: [PATCH 06/15] we do not support celery < 4 on this branch anyway --- tests/integrations/celery/test_celery.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/integrations/celery/test_celery.py b/tests/integrations/celery/test_celery.py index a47ca65b3f..76a16c5c81 100644 --- a/tests/integrations/celery/test_celery.py +++ b/tests/integrations/celery/test_celery.py @@ -52,10 +52,6 @@ def inner( else: celery.conf.task_always_eager = True elif backend == "redis": - # broken on celery 3 - if VERSION < (4,): - pytest.skip("Redis backend broken for some reason") - # this backend requires capture_events_forksafe celery.conf.worker_max_tasks_per_child = 1 celery.conf.worker_concurrency = 1 From 3af577a0b4e26a55eb02335e46a743d5182919de Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Mon, 20 Oct 2025 09:53:34 +0200 Subject: [PATCH 07/15] facepalm --- tests/integrations/celery/test_celery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integrations/celery/test_celery.py b/tests/integrations/celery/test_celery.py index 76a16c5c81..7869220175 100644 --- a/tests/integrations/celery/test_celery.py +++ b/tests/integrations/celery/test_celery.py @@ -398,7 +398,7 @@ def dummy_task(self): @pytest.mark.forked -@pytest.skip("Failing test on a discontined branch") +@pytest.mark.skip("Failing test on a discontined branch") @pytest.mark.parametrize("newrelic_order", ["sentry_first", "sentry_last"]) def test_newrelic_interference(init_celery, newrelic_order, celery_invocation): def instrument_newrelic(): From ee00e217b2f65c4154c95d572a2279e748822553 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Mon, 20 Oct 2025 09:56:46 +0200 Subject: [PATCH 08/15] tox out of sync --- scripts/populate_tox/tox.jinja | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/populate_tox/tox.jinja b/scripts/populate_tox/tox.jinja index 513b522109..eba2df7b17 100644 --- a/scripts/populate_tox/tox.jinja +++ b/scripts/populate_tox/tox.jinja @@ -154,6 +154,7 @@ deps = {py3.8,py3.9,py3.10,py3.11,py3.12}-gevent: pytest gevent: pytest-asyncio {py3.10,py3.11}-gevent: zope.event<5.0.0 + {py3.10,py3.11}-gevent: zope.interface<8.0 # === Integrations === From 874e532890b036945fd7e596941c2866bb07047d Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Mon, 20 Oct 2025 09:59:53 +0200 Subject: [PATCH 09/15] still out of sync --- tox.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/tox.ini b/tox.ini index ec3c5cfe42..1e38cc6d15 100644 --- a/tox.ini +++ b/tox.ini @@ -330,7 +330,6 @@ deps = {py3.10,py3.11}-gevent: zope.event<5.0.0 {py3.10,py3.11}-gevent: zope.interface<8.0 - # === Integrations === # Arq From 9b026de0250ecc5d60abb53f1052b782a18e72e2 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Mon, 20 Oct 2025 12:43:25 +0200 Subject: [PATCH 10/15] run ci again From e8d38333a401bd6a905fc04039773ab8f8a77953 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Mon, 20 Oct 2025 13:39:13 +0200 Subject: [PATCH 11/15] restrict langchain --- scripts/populate_tox/tox.jinja | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/populate_tox/tox.jinja b/scripts/populate_tox/tox.jinja index eba2df7b17..8624ffdedc 100644 --- a/scripts/populate_tox/tox.jinja +++ b/scripts/populate_tox/tox.jinja @@ -228,7 +228,7 @@ deps = langchain-v0.3: langchain-community langchain-v0.3: tiktoken langchain-v0.3: openai - langchain-{latest,notiktoken}: langchain + langchain-{latest,notiktoken}: langchain<1.0 langchain-{latest,notiktoken}: langchain-openai langchain-{latest,notiktoken}: openai>=1.6.1 langchain-latest: tiktoken~=0.6.0 diff --git a/tox.ini b/tox.ini index 1e38cc6d15..294b8e7ebc 100644 --- a/tox.ini +++ b/tox.ini @@ -402,7 +402,7 @@ deps = langchain-v0.3: langchain-community langchain-v0.3: tiktoken langchain-v0.3: openai - langchain-{latest,notiktoken}: langchain + langchain-{latest,notiktoken}: langchain<1.0 langchain-{latest,notiktoken}: langchain-openai langchain-{latest,notiktoken}: openai>=1.6.1 langchain-latest: tiktoken~=0.6.0 From 0e367d8324e3a184997b5d450c57fae12aa2b7a0 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Mon, 20 Oct 2025 13:43:50 +0200 Subject: [PATCH 12/15] spelling --- tests/integrations/celery/test_celery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integrations/celery/test_celery.py b/tests/integrations/celery/test_celery.py index 7869220175..ef6074612e 100644 --- a/tests/integrations/celery/test_celery.py +++ b/tests/integrations/celery/test_celery.py @@ -398,7 +398,7 @@ def dummy_task(self): @pytest.mark.forked -@pytest.mark.skip("Failing test on a discontined branch") +@pytest.mark.skip("Failing test on a discontinued branch") @pytest.mark.parametrize("newrelic_order", ["sentry_first", "sentry_last"]) def test_newrelic_interference(init_celery, newrelic_order, celery_invocation): def instrument_newrelic(): From 888a2d5cbe42a1e938ae81bd6638025e5cf1ccf6 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Mon, 20 Oct 2025 14:27:41 +0200 Subject: [PATCH 13/15] ? --- scripts/populate_tox/tox.jinja | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/populate_tox/tox.jinja b/scripts/populate_tox/tox.jinja index 8624ffdedc..54581753ba 100644 --- a/scripts/populate_tox/tox.jinja +++ b/scripts/populate_tox/tox.jinja @@ -228,7 +228,7 @@ deps = langchain-v0.3: langchain-community langchain-v0.3: tiktoken langchain-v0.3: openai - langchain-{latest,notiktoken}: langchain<1.0 + langchain-{latest,notiktoken}: langchain<1.0,>=0.3 langchain-{latest,notiktoken}: langchain-openai langchain-{latest,notiktoken}: openai>=1.6.1 langchain-latest: tiktoken~=0.6.0 diff --git a/tox.ini b/tox.ini index 294b8e7ebc..0642909551 100644 --- a/tox.ini +++ b/tox.ini @@ -402,7 +402,7 @@ deps = langchain-v0.3: langchain-community langchain-v0.3: tiktoken langchain-v0.3: openai - langchain-{latest,notiktoken}: langchain<1.0 + langchain-{latest,notiktoken}: langchain<1.0,>=0.3 langchain-{latest,notiktoken}: langchain-openai langchain-{latest,notiktoken}: openai>=1.6.1 langchain-latest: tiktoken~=0.6.0 From d7910b5f60c6665fb472572cac5c7dfe01c64fe3 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Mon, 20 Oct 2025 14:35:58 +0200 Subject: [PATCH 14/15] just straight up remove the notiktoken tests --- scripts/populate_tox/tox.jinja | 9 +++------ tox.ini | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/scripts/populate_tox/tox.jinja b/scripts/populate_tox/tox.jinja index 54581753ba..94f27581ad 100644 --- a/scripts/populate_tox/tox.jinja +++ b/scripts/populate_tox/tox.jinja @@ -78,14 +78,12 @@ envlist = {py3.9,py3.11,py3.12}-langchain-v0.1 {py3.9,py3.11,py3.12}-langchain-v0.3 {py3.9,py3.11,py3.12}-langchain-latest - {py3.9,py3.11,py3.12}-langchain-notiktoken # OpenAI {py3.9,py3.11,py3.12}-openai-v1.0 {py3.9,py3.11,py3.12}-openai-v1.22 {py3.9,py3.11,py3.12}-openai-v1.55 {py3.9,py3.11,py3.12}-openai-latest - {py3.9,py3.11,py3.12}-openai-notiktoken # pure_eval {py3.7,py3.12,py3.13}-pure_eval @@ -228,9 +226,9 @@ deps = langchain-v0.3: langchain-community langchain-v0.3: tiktoken langchain-v0.3: openai - langchain-{latest,notiktoken}: langchain<1.0,>=0.3 - langchain-{latest,notiktoken}: langchain-openai - langchain-{latest,notiktoken}: openai>=1.6.1 + langchain-latest: langchain<1.0 + langchain-latest: langchain-openai + langchain-latest: openai>=1.6.1 langchain-latest: tiktoken~=0.6.0 # OpenAI @@ -245,7 +243,6 @@ deps = openai-v1.55: tiktoken openai-latest: openai openai-latest: tiktoken~=0.6.0 - openai-notiktoken: openai # pure_eval pure_eval: pure_eval diff --git a/tox.ini b/tox.ini index 0642909551..e16fc2ac61 100644 --- a/tox.ini +++ b/tox.ini @@ -78,14 +78,12 @@ envlist = {py3.9,py3.11,py3.12}-langchain-v0.1 {py3.9,py3.11,py3.12}-langchain-v0.3 {py3.9,py3.11,py3.12}-langchain-latest - {py3.9,py3.11,py3.12}-langchain-notiktoken # OpenAI {py3.9,py3.11,py3.12}-openai-v1.0 {py3.9,py3.11,py3.12}-openai-v1.22 {py3.9,py3.11,py3.12}-openai-v1.55 {py3.9,py3.11,py3.12}-openai-latest - {py3.9,py3.11,py3.12}-openai-notiktoken # pure_eval {py3.7,py3.12,py3.13}-pure_eval @@ -402,9 +400,9 @@ deps = langchain-v0.3: langchain-community langchain-v0.3: tiktoken langchain-v0.3: openai - langchain-{latest,notiktoken}: langchain<1.0,>=0.3 - langchain-{latest,notiktoken}: langchain-openai - langchain-{latest,notiktoken}: openai>=1.6.1 + langchain-latest: langchain<1.0,>=0.3 + langchain-latest: langchain-openai + langchain-latest: openai>=1.6.1 langchain-latest: tiktoken~=0.6.0 # OpenAI @@ -419,7 +417,6 @@ deps = openai-v1.55: tiktoken openai-latest: openai openai-latest: tiktoken~=0.6.0 - openai-notiktoken: openai # pure_eval pure_eval: pure_eval From 2e0d31b68907babaed6701679b4df521fa4ffacd Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Mon, 20 Oct 2025 14:42:49 +0200 Subject: [PATCH 15/15] . --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index e16fc2ac61..6ec4a77757 100644 --- a/tox.ini +++ b/tox.ini @@ -400,7 +400,7 @@ deps = langchain-v0.3: langchain-community langchain-v0.3: tiktoken langchain-v0.3: openai - langchain-latest: langchain<1.0,>=0.3 + langchain-latest: langchain<1.0 langchain-latest: langchain-openai langchain-latest: openai>=1.6.1 langchain-latest: tiktoken~=0.6.0