From 9fa67616e7555ada485020012c6629c077999362 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Mon, 9 Mar 2026 14:52:39 +0100 Subject: [PATCH 1/2] test(pyramid): Support alpha suffixes in version parsing --- tests/integrations/pyramid/test_pyramid.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/integrations/pyramid/test_pyramid.py b/tests/integrations/pyramid/test_pyramid.py index cd200f7f7b..e138623533 100644 --- a/tests/integrations/pyramid/test_pyramid.py +++ b/tests/integrations/pyramid/test_pyramid.py @@ -6,6 +6,7 @@ import pytest from pyramid.authorization import ACLAuthorizationPolicy from pyramid.response import Response +from packaging.version import Version from werkzeug.test import Client from sentry_sdk import capture_message, add_breadcrumb @@ -18,7 +19,7 @@ try: from importlib.metadata import version - PYRAMID_VERSION = tuple(map(int, version("pyramid").split("."))) + PYRAMID_VERSION = Version(version("pyramid")) except ImportError: # < py3.8 @@ -311,7 +312,7 @@ def errorhandler(exc, request): @pytest.mark.skipif( - PYRAMID_VERSION < (1, 9), + PYRAMID_VERSION < Version("1.9"), reason="We don't have the right hooks in older Pyramid versions", ) def test_errorhandler_500( From 22093773f3aad3c90ea42f3224f471e5cce2f7e3 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Mon, 9 Mar 2026 17:01:44 +0100 Subject: [PATCH 2/2] . --- tests/integrations/pyramid/test_pyramid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integrations/pyramid/test_pyramid.py b/tests/integrations/pyramid/test_pyramid.py index e138623533..95efe8172b 100644 --- a/tests/integrations/pyramid/test_pyramid.py +++ b/tests/integrations/pyramid/test_pyramid.py @@ -19,7 +19,7 @@ try: from importlib.metadata import version - PYRAMID_VERSION = Version(version("pyramid")) + PYRAMID_VERSION = Version(version("pyramid")).release except ImportError: # < py3.8 @@ -312,7 +312,7 @@ def errorhandler(exc, request): @pytest.mark.skipif( - PYRAMID_VERSION < Version("1.9"), + PYRAMID_VERSION < (1, 9), reason="We don't have the right hooks in older Pyramid versions", ) def test_errorhandler_500(