Skip to content

Commit 6a58e5f

Browse files
authored
tests: Regenerate tox (#4484)
Regular tox update. This includes a fix for a new Bottle version which made one of our tests get stuck in a neverending `while` loop.
1 parent 449b2fa commit 6a58e5f

File tree

2 files changed

+47
-58
lines changed

2 files changed

+47
-58
lines changed

tests/integrations/bottle/test_bottle.py

Lines changed: 23 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
from werkzeug.test import Client
1313
from werkzeug.wrappers import Response
1414

15-
import sentry_sdk.integrations.bottle as bottle_sentry
16-
1715

1816
@pytest.fixture(scope="function")
1917
def app(sentry_init):
@@ -46,7 +44,7 @@ def inner():
4644

4745

4846
def test_has_context(sentry_init, app, capture_events, get_client):
49-
sentry_init(integrations=[bottle_sentry.BottleIntegration()])
47+
sentry_init(integrations=[BottleIntegration()])
5048
events = capture_events()
5149

5250
client = get_client()
@@ -77,11 +75,7 @@ def test_transaction_style(
7775
capture_events,
7876
get_client,
7977
):
80-
sentry_init(
81-
integrations=[
82-
bottle_sentry.BottleIntegration(transaction_style=transaction_style)
83-
]
84-
)
78+
sentry_init(integrations=[BottleIntegration(transaction_style=transaction_style)])
8579
events = capture_events()
8680

8781
client = get_client()
@@ -100,7 +94,7 @@ def test_transaction_style(
10094
def test_errors(
10195
sentry_init, capture_exceptions, capture_events, app, debug, catchall, get_client
10296
):
103-
sentry_init(integrations=[bottle_sentry.BottleIntegration()])
97+
sentry_init(integrations=[BottleIntegration()])
10498

10599
app.catchall = catchall
106100
set_debug(mode=debug)
@@ -127,7 +121,7 @@ def index():
127121

128122

129123
def test_large_json_request(sentry_init, capture_events, app, get_client):
130-
sentry_init(integrations=[bottle_sentry.BottleIntegration()])
124+
sentry_init(integrations=[BottleIntegration()])
131125

132126
data = {"foo": {"bar": "a" * 2000}}
133127

@@ -157,7 +151,7 @@ def index():
157151

158152
@pytest.mark.parametrize("data", [{}, []], ids=["empty-dict", "empty-list"])
159153
def test_empty_json_request(sentry_init, capture_events, app, data, get_client):
160-
sentry_init(integrations=[bottle_sentry.BottleIntegration()])
154+
sentry_init(integrations=[BottleIntegration()])
161155

162156
@app.route("/", method="POST")
163157
def index():
@@ -180,7 +174,7 @@ def index():
180174

181175

182176
def test_medium_formdata_request(sentry_init, capture_events, app, get_client):
183-
sentry_init(integrations=[bottle_sentry.BottleIntegration()])
177+
sentry_init(integrations=[BottleIntegration()])
184178

185179
data = {"foo": "a" * 2000}
186180

@@ -209,9 +203,7 @@ def index():
209203
def test_too_large_raw_request(
210204
sentry_init, input_char, capture_events, app, get_client
211205
):
212-
sentry_init(
213-
integrations=[bottle_sentry.BottleIntegration()], max_request_body_size="small"
214-
)
206+
sentry_init(integrations=[BottleIntegration()], max_request_body_size="small")
215207

216208
data = input_char * 2000
217209

@@ -239,9 +231,7 @@ def index():
239231

240232

241233
def test_files_and_form(sentry_init, capture_events, app, get_client):
242-
sentry_init(
243-
integrations=[bottle_sentry.BottleIntegration()], max_request_body_size="always"
244-
)
234+
sentry_init(integrations=[BottleIntegration()], max_request_body_size="always")
245235

246236
data = {"foo": "a" * 2000, "file": (BytesIO(b"hello"), "hello.txt")}
247237

@@ -278,9 +268,7 @@ def index():
278268
def test_json_not_truncated_if_max_request_body_size_is_always(
279269
sentry_init, capture_events, app, get_client
280270
):
281-
sentry_init(
282-
integrations=[bottle_sentry.BottleIntegration()], max_request_body_size="always"
283-
)
271+
sentry_init(integrations=[BottleIntegration()], max_request_body_size="always")
284272

285273
data = {
286274
"key{}".format(i): "value{}".format(i) for i in range(MAX_DATABAG_BREADTH + 10)
@@ -309,8 +297,8 @@ def index():
309297
@pytest.mark.parametrize(
310298
"integrations",
311299
[
312-
[bottle_sentry.BottleIntegration()],
313-
[bottle_sentry.BottleIntegration(), LoggingIntegration(event_level="ERROR")],
300+
[BottleIntegration()],
301+
[BottleIntegration(), LoggingIntegration(event_level="ERROR")],
314302
],
315303
)
316304
def test_errors_not_reported_twice(
@@ -324,23 +312,24 @@ def test_errors_not_reported_twice(
324312

325313
@app.route("/")
326314
def index():
327-
try:
328-
1 / 0
329-
except Exception as e:
330-
logger.exception(e)
331-
raise e
315+
1 / 0
332316

333317
events = capture_events()
334318

335319
client = get_client()
320+
336321
with pytest.raises(ZeroDivisionError):
337-
client.get("/")
322+
try:
323+
client.get("/")
324+
except ZeroDivisionError as e:
325+
logger.exception(e)
326+
raise e
338327

339328
assert len(events) == 1
340329

341330

342331
def test_mount(app, capture_exceptions, capture_events, sentry_init, get_client):
343-
sentry_init(integrations=[bottle_sentry.BottleIntegration()])
332+
sentry_init(integrations=[BottleIntegration()])
344333

345334
app.catchall = False
346335

@@ -367,7 +356,7 @@ def crashing_app(environ, start_response):
367356

368357

369358
def test_error_in_errorhandler(sentry_init, capture_events, app, get_client):
370-
sentry_init(integrations=[bottle_sentry.BottleIntegration()])
359+
sentry_init(integrations=[BottleIntegration()])
371360

372361
set_debug(False)
373362
app.catchall = True
@@ -397,7 +386,7 @@ def error_handler(err):
397386

398387

399388
def test_bad_request_not_captured(sentry_init, capture_events, app, get_client):
400-
sentry_init(integrations=[bottle_sentry.BottleIntegration()])
389+
sentry_init(integrations=[BottleIntegration()])
401390
events = capture_events()
402391

403392
@app.route("/")
@@ -412,7 +401,7 @@ def index():
412401

413402

414403
def test_no_exception_on_redirect(sentry_init, capture_events, app, get_client):
415-
sentry_init(integrations=[bottle_sentry.BottleIntegration()])
404+
sentry_init(integrations=[BottleIntegration()])
416405
events = capture_events()
417406

418407
@app.route("/")
@@ -436,7 +425,7 @@ def test_span_origin(
436425
capture_events,
437426
):
438427
sentry_init(
439-
integrations=[bottle_sentry.BottleIntegration()],
428+
integrations=[BottleIntegration()],
440429
traces_sample_rate=1.0,
441430
)
442431
events = capture_events()

tox.ini

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# The file (and all resulting CI YAMLs) then need to be regenerated via
1111
# "scripts/generate-test-files.sh".
1212
#
13-
# Last generated: 2025-06-11T12:20:52.494394+00:00
13+
# Last generated: 2025-06-17T08:49:27.078408+00:00
1414

1515
[tox]
1616
requires =
@@ -146,9 +146,9 @@ envlist =
146146
{py3.9,py3.11,py3.12}-cohere-v5.15.0
147147

148148
{py3.8,py3.10,py3.11}-huggingface_hub-v0.22.2
149-
{py3.8,py3.10,py3.11}-huggingface_hub-v0.25.2
150-
{py3.8,py3.12,py3.13}-huggingface_hub-v0.28.1
151-
{py3.8,py3.12,py3.13}-huggingface_hub-v0.32.6
149+
{py3.8,py3.11,py3.12}-huggingface_hub-v0.26.5
150+
{py3.8,py3.12,py3.13}-huggingface_hub-v0.30.2
151+
{py3.8,py3.12,py3.13}-huggingface_hub-v0.33.0
152152

153153

154154
# ~~~ DBs ~~~
@@ -157,7 +157,7 @@ envlist =
157157
{py3.6}-pymongo-v3.5.1
158158
{py3.6,py3.10,py3.11}-pymongo-v3.13.0
159159
{py3.6,py3.9,py3.10}-pymongo-v4.0.2
160-
{py3.9,py3.12,py3.13}-pymongo-v4.13.0
160+
{py3.9,py3.12,py3.13}-pymongo-v4.13.2
161161

162162
{py3.6}-redis_py_cluster_legacy-v1.3.6
163163
{py3.6,py3.7}-redis_py_cluster_legacy-v2.0.0
@@ -180,7 +180,7 @@ envlist =
180180
{py3.7,py3.12,py3.13}-statsig-v0.55.3
181181
{py3.7,py3.12,py3.13}-statsig-v0.56.0
182182
{py3.7,py3.12,py3.13}-statsig-v0.57.3
183-
{py3.7,py3.12,py3.13}-statsig-v0.58.1
183+
{py3.7,py3.12,py3.13}-statsig-v0.58.2
184184

185185
{py3.8,py3.12,py3.13}-unleash-v6.0.1
186186
{py3.8,py3.12,py3.13}-unleash-v6.1.0
@@ -201,9 +201,9 @@ envlist =
201201
{py3.8,py3.12,py3.13}-graphene-v3.4.3
202202

203203
{py3.8,py3.10,py3.11}-strawberry-v0.209.8
204-
{py3.8,py3.11,py3.12}-strawberry-v0.230.0
205-
{py3.8,py3.12,py3.13}-strawberry-v0.251.0
206-
{py3.9,py3.12,py3.13}-strawberry-v0.273.0
204+
{py3.8,py3.11,py3.12}-strawberry-v0.231.1
205+
{py3.8,py3.12,py3.13}-strawberry-v0.253.1
206+
{py3.9,py3.12,py3.13}-strawberry-v0.274.0
207207

208208

209209
# ~~~ Network ~~~
@@ -261,10 +261,10 @@ envlist =
261261
{py3.7}-aiohttp-v3.4.4
262262
{py3.7,py3.8,py3.9}-aiohttp-v3.7.4
263263
{py3.8,py3.12,py3.13}-aiohttp-v3.10.11
264-
{py3.9,py3.12,py3.13}-aiohttp-v3.12.12
264+
{py3.9,py3.12,py3.13}-aiohttp-v3.12.13
265265

266266
{py3.6,py3.7}-bottle-v0.12.25
267-
{py3.8,py3.12,py3.13}-bottle-v0.13.3
267+
{py3.8,py3.12,py3.13}-bottle-v0.13.4
268268

269269
{py3.6}-falcon-v1.4.1
270270
{py3.6,py3.7}-falcon-v2.0.0
@@ -515,9 +515,9 @@ deps =
515515
cohere-v5.15.0: cohere==5.15.0
516516

517517
huggingface_hub-v0.22.2: huggingface_hub==0.22.2
518-
huggingface_hub-v0.25.2: huggingface_hub==0.25.2
519-
huggingface_hub-v0.28.1: huggingface_hub==0.28.1
520-
huggingface_hub-v0.32.6: huggingface_hub==0.32.6
518+
huggingface_hub-v0.26.5: huggingface_hub==0.26.5
519+
huggingface_hub-v0.30.2: huggingface_hub==0.30.2
520+
huggingface_hub-v0.33.0: huggingface_hub==0.33.0
521521

522522

523523
# ~~~ DBs ~~~
@@ -526,7 +526,7 @@ deps =
526526
pymongo-v3.5.1: pymongo==3.5.1
527527
pymongo-v3.13.0: pymongo==3.13.0
528528
pymongo-v4.0.2: pymongo==4.0.2
529-
pymongo-v4.13.0: pymongo==4.13.0
529+
pymongo-v4.13.2: pymongo==4.13.2
530530
pymongo: mockupdb
531531

532532
redis_py_cluster_legacy-v1.3.6: redis-py-cluster==1.3.6
@@ -550,7 +550,7 @@ deps =
550550
statsig-v0.55.3: statsig==0.55.3
551551
statsig-v0.56.0: statsig==0.56.0
552552
statsig-v0.57.3: statsig==0.57.3
553-
statsig-v0.58.1: statsig==0.58.1
553+
statsig-v0.58.2: statsig==0.58.2
554554
statsig: typing_extensions
555555

556556
unleash-v6.0.1: UnleashClient==6.0.1
@@ -580,13 +580,13 @@ deps =
580580
py3.6-graphene: aiocontextvars
581581

582582
strawberry-v0.209.8: strawberry-graphql[fastapi,flask]==0.209.8
583-
strawberry-v0.230.0: strawberry-graphql[fastapi,flask]==0.230.0
584-
strawberry-v0.251.0: strawberry-graphql[fastapi,flask]==0.251.0
585-
strawberry-v0.273.0: strawberry-graphql[fastapi,flask]==0.273.0
583+
strawberry-v0.231.1: strawberry-graphql[fastapi,flask]==0.231.1
584+
strawberry-v0.253.1: strawberry-graphql[fastapi,flask]==0.253.1
585+
strawberry-v0.274.0: strawberry-graphql[fastapi,flask]==0.274.0
586586
strawberry: httpx
587587
strawberry-v0.209.8: pydantic<2.11
588-
strawberry-v0.230.0: pydantic<2.11
589-
strawberry-v0.251.0: pydantic<2.11
588+
strawberry-v0.231.1: pydantic<2.11
589+
strawberry-v0.253.1: pydantic<2.11
590590

591591

592592
# ~~~ Network ~~~
@@ -696,13 +696,13 @@ deps =
696696
aiohttp-v3.4.4: aiohttp==3.4.4
697697
aiohttp-v3.7.4: aiohttp==3.7.4
698698
aiohttp-v3.10.11: aiohttp==3.10.11
699-
aiohttp-v3.12.12: aiohttp==3.12.12
699+
aiohttp-v3.12.13: aiohttp==3.12.13
700700
aiohttp: pytest-aiohttp
701701
aiohttp-v3.10.11: pytest-asyncio
702-
aiohttp-v3.12.12: pytest-asyncio
702+
aiohttp-v3.12.13: pytest-asyncio
703703

704704
bottle-v0.12.25: bottle==0.12.25
705-
bottle-v0.13.3: bottle==0.13.3
705+
bottle-v0.13.4: bottle==0.13.4
706706
bottle: werkzeug<2.1.0
707707

708708
falcon-v1.4.1: falcon==1.4.1

0 commit comments

Comments
 (0)