From 9435b7515895195a8b9b7a9d4cd4b33ce3b7eca8 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Mon, 22 Jun 2026 10:02:53 +0200 Subject: [PATCH 1/3] ci: Remove jsonschema from requirements-testing.txt --- requirements-testing.txt | 1 - scripts/populate_tox/tox.jinja | 1 + tox.ini | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements-testing.txt b/requirements-testing.txt index a6041972cd..3008342626 100644 --- a/requirements-testing.txt +++ b/requirements-testing.txt @@ -6,7 +6,6 @@ pytest-forked pytest-localserver pytest-timeout pytest-watch -jsonschema executing asttokens responses diff --git a/scripts/populate_tox/tox.jinja b/scripts/populate_tox/tox.jinja index 40426d30fb..9203ba26bc 100644 --- a/scripts/populate_tox/tox.jinja +++ b/scripts/populate_tox/tox.jinja @@ -79,6 +79,7 @@ deps = # === Common === py3.8-common: hypothesis + common: jsonschema common: pytest-asyncio common: httpcore[asyncio] # See https://github.com/pytest-dev/pytest/issues/9621 diff --git a/tox.ini b/tox.ini index e91115d32e..8e667adf79 100644 --- a/tox.ini +++ b/tox.ini @@ -402,6 +402,7 @@ deps = # === Common === py3.8-common: hypothesis + common: jsonschema common: pytest-asyncio common: httpcore[asyncio] # See https://github.com/pytest-dev/pytest/issues/9621 From ca7cdd4ca9a8513e0c38dcefa5a70564b919d3b9 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Mon, 22 Jun 2026 11:04:50 +0200 Subject: [PATCH 2/3] import fallback --- tests/conftest.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 11abd66e46..8f971ebfe5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -14,7 +14,12 @@ from urllib.parse import parse_qs, urlparse import brotli -import jsonschema + +try: + import jsonschema +except ImportError: + jsonschema = None + import pytest from pytest_localserver.http import WSGIServer from werkzeug.wrappers import Request, Response @@ -232,6 +237,7 @@ def _capture_internal_warnings(): @pytest.fixture def validate_event_schema(tmpdir): def inner(event): + assert jsonschema is not None if SENTRY_EVENT_SCHEMA: jsonschema.validate(instance=event, schema=SENTRY_EVENT_SCHEMA) From f9457cc88d09af9dd300c8ff8aa47d303d5377cd Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Mon, 22 Jun 2026 11:22:53 +0200 Subject: [PATCH 3/3] . --- scripts/populate_tox/tox.jinja | 1 + tox.ini | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/populate_tox/tox.jinja b/scripts/populate_tox/tox.jinja index 9203ba26bc..5abadfe281 100644 --- a/scripts/populate_tox/tox.jinja +++ b/scripts/populate_tox/tox.jinja @@ -98,6 +98,7 @@ deps = # for justification of the upper bound on pytest {py3.6,py3.7}-gevent: pytest<7.0.0 {py3.8,py3.9,py3.10,py3.11,py3.12}-gevent: pytest + gevent: jsonschema gevent: pytest-asyncio gevent: setuptools<82 {py3.10,py3.11}-gevent: zope.event<5.0.0 diff --git a/tox.ini b/tox.ini index 8e667adf79..f17f9ae8e4 100644 --- a/tox.ini +++ b/tox.ini @@ -421,6 +421,7 @@ deps = # for justification of the upper bound on pytest {py3.6,py3.7}-gevent: pytest<7.0.0 {py3.8,py3.9,py3.10,py3.11,py3.12}-gevent: pytest + gevent: jsonschema gevent: pytest-asyncio gevent: setuptools<82 {py3.10,py3.11}-gevent: zope.event<5.0.0