Skip to content

Commit bc9af26

Browse files
committed
Merge remote-tracking branch 'origin/master' into potel-base
2 parents a012fe4 + c2d5a76 commit bc9af26

File tree

8 files changed

+61
-12
lines changed

8 files changed

+61
-12
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ jobs:
3939
allow-prereleases: true
4040
- name: Start Redis
4141
uses: supercharge/[email protected]
42+
- name: Install Java
43+
uses: actions/setup-java@v4
44+
with:
45+
distribution: 'temurin'
46+
java-version: '21'
4247
- name: Setup Test Env
4348
run: |
4449
pip install "coverage[toml]" tox
@@ -115,6 +120,11 @@ jobs:
115120
allow-prereleases: true
116121
- name: Start Redis
117122
uses: supercharge/[email protected]
123+
- name: Install Java
124+
uses: actions/setup-java@v4
125+
with:
126+
distribution: 'temurin'
127+
java-version: '21'
118128
- name: Setup Test Env
119129
run: |
120130
pip install "coverage[toml]" tox

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ relay
2929
pip-wheel-metadata
3030
.mypy_cache
3131
.vscode/
32+
toxgen.venv
3233

3334
# for running AWS Lambda tests using AWS SAM
3435
sam.template.yaml

scripts/populate_tox/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@
7171
"pytest-django",
7272
"Werkzeug",
7373
],
74-
">=3.0": ["pytest-asyncio"],
74+
">=2.0": ["channels[daphne]"],
7575
">=2.2,<3.1": ["six"],
76+
">=3.0": ["pytest-asyncio"],
7677
"<3.3": [
7778
"djangorestframework>=3.0,<4.0",
7879
"Werkzeug<2.1.0",

scripts/populate_tox/tox.jinja

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ deps =
152152
# for justification of the upper bound on pytest
153153
py3.7-gevent: pytest<7.0.0
154154
{py3.8,py3.9,py3.10,py3.11,py3.12}-gevent: pytest
155+
gevent: pytest-asyncio
155156
156157
# === Integrations ===
157158
@@ -332,6 +333,7 @@ setenv =
332333
333334
django: DJANGO_SETTINGS_MODULE=tests.integrations.django.myapp.settings
334335
py3.12-django: PIP_CONSTRAINT=constraints.txt
336+
spark-v{3.0.3,3.5.6}: JAVA_HOME=/usr/lib/jvm/temurin-11-jdk-amd64
335337
336338
common: TESTPATH=tests
337339
gevent: TESTPATH=tests

scripts/split_tox_gh_actions/split_tox_gh_actions.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
"aws_lambda",
4848
}
4949

50+
FRAMEWORKS_NEEDING_JAVA = {
51+
"spark",
52+
}
53+
5054
# Frameworks grouped here will be tested together to not hog all GitHub runners.
5155
# If you add or remove a group, make sure to git rm the generated YAML file as
5256
# well.
@@ -288,6 +292,7 @@ def render_template(group, frameworks, py_versions_pinned, py_versions_latest):
288292
"needs_docker": bool(set(frameworks) & FRAMEWORKS_NEEDING_DOCKER),
289293
"needs_postgres": bool(set(frameworks) & FRAMEWORKS_NEEDING_POSTGRES),
290294
"needs_redis": bool(set(frameworks) & FRAMEWORKS_NEEDING_REDIS),
295+
"needs_java": bool(set(frameworks) & FRAMEWORKS_NEEDING_JAVA),
291296
"py_versions": {
292297
category: [f'"{version}"' for version in _normalize_py_versions(versions)]
293298
for category, versions in py_versions.items()

scripts/split_tox_gh_actions/templates/test_group.jinja

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
with:
4242
python-version: {% raw %}${{ matrix.python-version }}{% endraw %}
4343
allow-prereleases: true
44+
4445
{% if needs_clickhouse %}
4546
- name: "Setup ClickHouse Server"
4647
uses: getsentry/[email protected]
@@ -51,6 +52,14 @@
5152
uses: supercharge/[email protected]
5253
{% endif %}
5354

55+
{% if needs_java %}
56+
- name: Install Java
57+
uses: actions/setup-java@v4
58+
with:
59+
distribution: 'temurin'
60+
java-version: '21'
61+
{% endif %}
62+
5463
- name: Setup Test Env
5564
run: |
5665
pip install "coverage[toml]" tox

tests/integrations/django/asgi/test_asgi.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
@pytest.mark.parametrize("application", APPS)
3131
@pytest.mark.asyncio
3232
@pytest.mark.forked
33+
@pytest.mark.skipif(
34+
django.VERSION < (3, 0), reason="Django ASGI support shipped in 3.0"
35+
)
3336
async def test_basic(sentry_init, capture_events, application):
3437
sentry_init(
3538
integrations=[DjangoIntegration()],
@@ -575,6 +578,9 @@ async def test_asgi_request_body(
575578
"asyncio.iscoroutinefunction has been replaced in 3.12 by inspect.iscoroutinefunction"
576579
),
577580
)
581+
@pytest.mark.skipif(
582+
django.VERSION < (3, 0), reason="Django ASGI support shipped in 3.0"
583+
)
578584
async def test_asgi_mixin_iscoroutinefunction_before_3_12():
579585
sentry_asgi_mixin = _asgi_middleware_mixin_factory(lambda: None)
580586

@@ -632,6 +638,9 @@ def get_response(): ...
632638

633639
@pytest.mark.parametrize("application", APPS)
634640
@pytest.mark.asyncio
641+
@pytest.mark.skipif(
642+
django.VERSION < (3, 1), reason="async views have been introduced in Django 3.1"
643+
)
635644
async def test_async_view(sentry_init, capture_events, application):
636645
sentry_init(
637646
integrations=[DjangoIntegration()],
@@ -651,6 +660,9 @@ async def test_async_view(sentry_init, capture_events, application):
651660

652661
@pytest.mark.parametrize("application", APPS)
653662
@pytest.mark.asyncio
663+
@pytest.mark.skipif(
664+
django.VERSION < (3, 0), reason="Django ASGI support shipped in 3.0"
665+
)
654666
async def test_transaction_http_method_default(
655667
sentry_init, capture_events, application
656668
):
@@ -688,6 +700,9 @@ async def test_transaction_http_method_default(
688700

689701
@pytest.mark.parametrize("application", APPS)
690702
@pytest.mark.asyncio
703+
@pytest.mark.skipif(
704+
django.VERSION < (3, 0), reason="Django ASGI support shipped in 3.0"
705+
)
691706
async def test_transaction_http_method_custom(sentry_init, capture_events, application):
692707
sentry_init(
693708
integrations=[

tox.ini

Lines changed: 17 additions & 11 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-02T10:27:12.681988+00:00
13+
# Last generated: 2025-06-04T11:51:35.459320+00:00
1414

1515
[tox]
1616
requires =
@@ -134,7 +134,7 @@ envlist =
134134
{py3.8,py3.11,py3.12}-anthropic-v0.16.0
135135
{py3.8,py3.11,py3.12}-anthropic-v0.28.1
136136
{py3.8,py3.11,py3.12}-anthropic-v0.40.0
137-
{py3.8,py3.11,py3.12}-anthropic-v0.52.1
137+
{py3.8,py3.11,py3.12}-anthropic-v0.52.2
138138

139139
{py3.9,py3.10,py3.11}-cohere-v5.4.0
140140
{py3.9,py3.11,py3.12}-cohere-v5.8.1
@@ -144,7 +144,7 @@ envlist =
144144
{py3.8,py3.10,py3.11}-huggingface_hub-v0.22.2
145145
{py3.8,py3.10,py3.11}-huggingface_hub-v0.25.2
146146
{py3.8,py3.12,py3.13}-huggingface_hub-v0.28.1
147-
{py3.8,py3.12,py3.13}-huggingface_hub-v0.32.3
147+
{py3.8,py3.12,py3.13}-huggingface_hub-v0.32.4
148148

149149

150150
# ~~~ DBs ~~~
@@ -257,8 +257,7 @@ envlist =
257257
{py3.7}-aiohttp-v3.4.4
258258
{py3.7,py3.8,py3.9}-aiohttp-v3.7.4
259259
{py3.8,py3.12,py3.13}-aiohttp-v3.10.11
260-
{py3.9,py3.12,py3.13}-aiohttp-v3.12.6
261-
{py3.9,py3.12,py3.13}-aiohttp-v3.12.7rc0
260+
{py3.9,py3.12,py3.13}-aiohttp-v3.12.8
262261

263262
{py3.7}-bottle-v0.12.25
264263
{py3.8,py3.12,py3.13}-bottle-v0.13.3
@@ -318,6 +317,7 @@ deps =
318317
# for justification of the upper bound on pytest
319318
py3.7-gevent: pytest<7.0.0
320319
{py3.8,py3.9,py3.10,py3.11,py3.12}-gevent: pytest
320+
gevent: pytest-asyncio
321321

322322
# === Integrations ===
323323

@@ -488,7 +488,7 @@ deps =
488488
anthropic-v0.16.0: anthropic==0.16.0
489489
anthropic-v0.28.1: anthropic==0.28.1
490490
anthropic-v0.40.0: anthropic==0.40.0
491-
anthropic-v0.52.1: anthropic==0.52.1
491+
anthropic-v0.52.2: anthropic==0.52.2
492492
anthropic: pytest-asyncio
493493
anthropic-v0.16.0: httpx<0.28.0
494494
anthropic-v0.28.1: httpx<0.28.0
@@ -502,7 +502,7 @@ deps =
502502
huggingface_hub-v0.22.2: huggingface_hub==0.22.2
503503
huggingface_hub-v0.25.2: huggingface_hub==0.25.2
504504
huggingface_hub-v0.28.1: huggingface_hub==0.28.1
505-
huggingface_hub-v0.32.3: huggingface_hub==0.32.3
505+
huggingface_hub-v0.32.4: huggingface_hub==0.32.4
506506

507507

508508
# ~~~ DBs ~~~
@@ -619,11 +619,17 @@ deps =
619619
django: djangorestframework
620620
django: pytest-django
621621
django: Werkzeug
622+
django-v2.0.13: channels[daphne]
623+
django-v2.2.28: channels[daphne]
624+
django-v3.2.25: channels[daphne]
625+
django-v4.2.21: channels[daphne]
626+
django-v5.0.14: channels[daphne]
627+
django-v5.2.1: channels[daphne]
628+
django-v2.2.28: six
622629
django-v3.2.25: pytest-asyncio
623630
django-v4.2.21: pytest-asyncio
624631
django-v5.0.14: pytest-asyncio
625632
django-v5.2.1: pytest-asyncio
626-
django-v2.2.28: six
627633
django-v2.0.13: djangorestframework>=3.0,<4.0
628634
django-v2.0.13: Werkzeug<2.1.0
629635
django-v2.2.28: djangorestframework>=3.0,<4.0
@@ -676,11 +682,10 @@ deps =
676682
aiohttp-v3.4.4: aiohttp==3.4.4
677683
aiohttp-v3.7.4: aiohttp==3.7.4
678684
aiohttp-v3.10.11: aiohttp==3.10.11
679-
aiohttp-v3.12.6: aiohttp==3.12.6
680-
aiohttp-v3.12.7rc0: aiohttp==3.12.7rc0
685+
aiohttp-v3.12.8: aiohttp==3.12.8
681686
aiohttp: pytest-aiohttp
682687
aiohttp-v3.10.11: pytest-asyncio
683-
aiohttp-v3.12.6: pytest-asyncio
688+
aiohttp-v3.12.8: pytest-asyncio
684689

685690
bottle-v0.12.25: bottle==0.12.25
686691
bottle-v0.13.3: bottle==0.13.3
@@ -749,6 +754,7 @@ setenv =
749754

750755
django: DJANGO_SETTINGS_MODULE=tests.integrations.django.myapp.settings
751756
py3.12-django: PIP_CONSTRAINT=constraints.txt
757+
spark-v{3.0.3,3.5.6}: JAVA_HOME=/usr/lib/jvm/temurin-11-jdk-amd64
752758

753759
common: TESTPATH=tests
754760
gevent: TESTPATH=tests

0 commit comments

Comments
 (0)