Skip to content

Commit 6b1e8a1

Browse files
authored
ref: Drop Flask < 2 (#7002)
1 parent 0656f38 commit 6b1e8a1

7 files changed

Lines changed: 949 additions & 1989 deletions

File tree

MIGRATION_GUIDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
3030
- Dropped support for Django versions below 2.0.
3131
- Dropped support for gevent versions below 20.9.
3232
- Dropped support for greenlet versions below 0.4.17.
33+
- Dropped support for Flask below 2.0.
3334
- The `enable_tracing` option was removed. Use `traces_sample_rate=1.0` instead.
3435
- The deprecated `push_scope` and `configure_scope` APIs have been removed. Use `with new_scope():` to push a new scope and `scope = get_current_scope()` to retrieve the current scope instead.
3536
- Transaction profiling and related code was removed.

scripts/populate_tox/config.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,12 @@
157157
"package": "flask",
158158
"deps": {
159159
"*": ["flask-login", "werkzeug", "blinker"],
160-
# https://github.com/pallets/flask/issues/4455
161-
"<2.0": [
162-
"werkzeug<2.1.0",
163-
"markupsafe<2.0.0",
164-
"itsdangerous>=0.24,<2.0",
165-
"jinja2<3.1.1",
166-
],
160+
"<2.3": ["werkzeug<2.3"],
167161
"py3.7": ["setuptools<82"], # Handled by importlib.metadata on Python 3.8+
168162
},
163+
"python": {
164+
"<2.3": "<3.11",
165+
},
169166
},
170167
"gql": {
171168
"package": "gql[all]",

scripts/populate_tox/package_dependencies.jsonl

Lines changed: 55 additions & 209 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/populate_tox/releases.jsonl

Lines changed: 9 additions & 664 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sentry_sdk/integrations/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def iter_default_integrations(
139139
"dramatiq": (1, 9),
140140
"falcon": (1, 4),
141141
"fastapi": (0, 79, 0),
142-
"flask": (1, 1, 4),
142+
"flask": (2, 0, 0),
143143
"gql": (3, 4, 1),
144144
"graphene": (3, 3),
145145
"google_genai": (1, 29, 0), # google-genai

tests/integrations/flask/test_flask.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
try:
2121
from werkzeug.wrappers.request import UnsupportedMediaType
2222
except ImportError:
23-
UnsupportedMediaType = None
23+
from werkzeug.exceptions import BadRequest as UnsupportedMediaType
2424

2525
import sentry_sdk
2626
import sentry_sdk.integrations.flask as flask_sentry

tox.ini

Lines changed: 878 additions & 1107 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)