Skip to content

Commit 47aec4d

Browse files
Run common test suite on Python 3.12 (#2479)
Add 3.12 to the test matrix and make a tiny change to the logging integration (3.12 added taskName to LogRecord attributes, we're now ignoring that as we do the rest). --------- Co-authored-by: Anton Pirker <anton.pirker@sentry.io>
1 parent 178ab22 commit 47aec4d

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.github/workflows/test-common.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
strategy:
3232
fail-fast: false
3333
matrix:
34-
python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11"]
34+
python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"]
3535
# python3.6 reached EOL and is no longer being supported on
3636
# new versions of hosted runners on Github Actions
3737
# ubuntu-20.04 is the last version that supported python3.6

sentry_sdk/integrations/logging.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ class _BaseHandler(logging.Handler, object):
130130
"relativeCreated",
131131
"stack",
132132
"tags",
133+
"taskName",
133134
"thread",
134135
"threadName",
135136
"stack_info",

tox.ini

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[tox]
77
envlist =
88
# === Common ===
9-
{py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-common
9+
{py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-common
1010

1111
# === Integrations ===
1212
# General format is {pythonversion}-{integrationname}-v{frameworkversion}
@@ -195,7 +195,7 @@ deps =
195195
linters: werkzeug<2.3.0
196196

197197
# Common
198-
{py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-common: pytest-asyncio
198+
{py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-common: pytest-asyncio
199199

200200
# AIOHTTP
201201
aiohttp-v3.4: aiohttp>=3.4.0,<3.5.0
@@ -341,7 +341,7 @@ deps =
341341
# See https://stackoverflow.com/questions/51496550/runtime-warning-greenlet-greenlet-size-changed
342342
# for justification why greenlet is pinned here
343343
py3.5-gevent: greenlet==0.4.17
344-
{py2.7,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-gevent: gevent>=22.10.0, <22.11.0
344+
{py2.7,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-gevent: gevent>=22.10.0, <22.11.0
345345

346346
# GQL
347347
gql: gql[all]
@@ -597,6 +597,7 @@ basepython =
597597
py3.9: python3.9
598598
py3.10: python3.10
599599
py3.11: python3.11
600+
py3.12: python3.12
600601

601602
# Python version is pinned here because flake8 actually behaves differently
602603
# depending on which version is used. You can patch this out to point to
@@ -623,7 +624,7 @@ commands =
623624
; when loading tests in scenarios. In particular, django fails to
624625
; load the settings from the test module.
625626
{py2.7}: python -m pytest --ignore-glob='*py3.py' -rsx -s --durations=5 -vvv {env:TESTPATH} {posargs}
626-
{py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}: python -m pytest -rsx -s --durations=5 -vvv {env:TESTPATH} {posargs}
627+
{py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}: python -m pytest -rsx -s --durations=5 -vvv {env:TESTPATH} {posargs}
627628

628629
[testenv:linters]
629630
commands =

0 commit comments

Comments
 (0)