Skip to content

Commit d59c20b

Browse files
committed
chore: Drop support for old frameworks
1 parent 445ebc9 commit d59c20b

File tree

11 files changed

+59
-62
lines changed

11 files changed

+59
-62
lines changed

.github/workflows/test-integrations-dbs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
strategy:
116116
fail-fast: false
117117
matrix:
118-
python-version: ["3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
118+
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
119119
os: [ubuntu-22.04]
120120
services:
121121
postgres:

.github/workflows/test-integrations-graphql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
python-version: ["3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
32+
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
3333
os: [ubuntu-22.04]
3434
steps:
3535
- uses: actions/[email protected]

.github/workflows/test-integrations-misc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
python-version: ["3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
32+
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
3333
os: [ubuntu-22.04]
3434
steps:
3535
- uses: actions/[email protected]

.github/workflows/test-integrations-tasks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
strategy:
106106
fail-fast: false
107107
matrix:
108-
python-version: ["3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
108+
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
109109
os: [ubuntu-22.04]
110110
steps:
111111
- uses: actions/[email protected]

.github/workflows/test-integrations-web-1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
strategy:
106106
fail-fast: false
107107
matrix:
108-
python-version: ["3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
108+
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
109109
os: [ubuntu-22.04]
110110
services:
111111
postgres:

.github/workflows/test-integrations-web-2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
strategy:
112112
fail-fast: false
113113
matrix:
114-
python-version: ["3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
114+
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
115115
os: [ubuntu-22.04]
116116
steps:
117117
- uses: actions/[email protected]

MIGRATION_GUIDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
158158
- `Transport.capture_event` has been removed. Use `Transport.capture_envelope` instead.
159159
- Function transports are no longer supported. Subclass the `Transport` instead.
160160
- `start_transaction` (`start_span`) no longer takes a `baggage` argument. Use the `continue_trace()` context manager instead to propagate baggage.
161+
- Dropped support for trytond versions below 5.0.
162+
- Dropped support for Falcon versions below 3.0.
161163

162164
### Deprecated
163165

sentry_sdk/integrations/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def iter_default_integrations(with_auto_enabling_integrations):
134134
"clickhouse_driver": (0, 2, 0),
135135
"django": (1, 8),
136136
"dramatiq": (1, 9),
137-
"falcon": (1, 4),
137+
"falcon": (3, 0),
138138
"fastapi": (0, 79, 0),
139139
"flask": (1, 1, 4),
140140
"gql": (3, 4, 1),
@@ -157,6 +157,7 @@ def iter_default_integrations(with_auto_enabling_integrations):
157157
"statsig": (0, 55, 3),
158158
"strawberry": (0, 209, 5),
159159
"tornado": (6, 0),
160+
"trytond": (5, 0),
160161
"typer": (0, 15),
161162
"unleash": (6, 0, 1),
162163
}

sentry_sdk/integrations/falcon.py

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919

2020
from sentry_sdk._types import Event, EventProcessor
2121

22-
# In Falcon 3.0 `falcon.api_helpers` is renamed to `falcon.app_helpers`
23-
# and `falcon.API` to `falcon.App`
2422

2523
try:
2624
import falcon # type: ignore
@@ -29,24 +27,15 @@
2927
except ImportError:
3028
raise DidNotEnable("Falcon not installed")
3129

32-
try:
33-
import falcon.app_helpers # type: ignore
34-
35-
falcon_helpers = falcon.app_helpers
36-
falcon_app_class = falcon.App
37-
FALCON3 = True
38-
except ImportError:
39-
import falcon.api_helpers # type: ignore
30+
import falcon.app_helpers # type: ignore
4031

41-
falcon_helpers = falcon.api_helpers
42-
falcon_app_class = falcon.API
43-
FALCON3 = False
32+
falcon_helpers = falcon.app_helpers
33+
falcon_app_class = falcon.App
4434

4535

4636
_FALCON_UNSET = None # type: Optional[object]
47-
if FALCON3: # falcon.request._UNSET is only available in Falcon 3.0+
48-
with capture_internal_exceptions():
49-
from falcon.request import _UNSET as _FALCON_UNSET # type: ignore[import-not-found, no-redef]
37+
with capture_internal_exceptions():
38+
from falcon.request import _UNSET as _FALCON_UNSET # type: ignore[import-not-found, no-redef]
5039

5140

5241
class FalconRequestExtractor(RequestExtractor):
@@ -232,14 +221,7 @@ def _exception_leads_to_http_5xx(ex, response):
232221
ex, (falcon.HTTPError, falcon.http_status.HTTPStatus)
233222
)
234223

235-
# We only check the HTTP status on Falcon 3 because in Falcon 2, the status on the response
236-
# at the stage where we capture it is listed as 200, even though we would expect to see a 500
237-
# status. Since at the time of this change, Falcon 2 is ca. 4 years old, we have decided to
238-
# only perform this check on Falcon 3+, despite the risk that some handled errors might be
239-
# reported to Sentry as unhandled on Falcon 2.
240-
return (is_server_error or is_unhandled_error) and (
241-
not FALCON3 or _has_http_5xx_status(response)
242-
)
224+
return (is_server_error or is_unhandled_error) and _has_http_5xx_status(response)
243225

244226

245227
def _has_http_5xx_status(response):

sentry_sdk/integrations/trytond.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import sentry_sdk
2-
from sentry_sdk.integrations import Integration
2+
from sentry_sdk.integrations import _check_minimum_version, Integration
33
from sentry_sdk.integrations.wsgi import SentryWsgiMiddleware
44
from sentry_sdk.utils import ensure_integration_enabled, event_from_exception
55

6+
from trytond import __version__ as trytond_version # type: ignore
67
from trytond.exceptions import TrytonException # type: ignore
78
from trytond.wsgi import app # type: ignore
89

@@ -19,6 +20,8 @@ def __init__(self): # type: () -> None
1920

2021
@staticmethod
2122
def setup_once(): # type: () -> None
23+
_check_minimum_version(TrytondWSGIIntegration, trytond_version)
24+
2225
app.wsgi_app = SentryWsgiMiddleware(
2326
app.wsgi_app,
2427
span_origin=TrytondWSGIIntegration.origin,

0 commit comments

Comments
 (0)