Skip to content

Commit 2e07898

Browse files
Enable testing on Python 3.12 (#400)
Co-authored-by: Carol Abadeer <[email protected]>
1 parent 9e6fa9f commit 2e07898

File tree

2 files changed

+29
-25
lines changed

2 files changed

+29
-25
lines changed

.github/workflows/UnitTesting.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ jobs:
1616
py39: 3.9
1717
py310: '3.10'
1818
py311: '3.11'
19+
py312: '3.12'
1920
DB_DATABASE: test_db
2021
DB_USER: root
2122
DB_PASSWORD: root
2223
strategy:
2324
fail-fast: false
2425
matrix:
25-
python-version: [py37, py38, py39, py310, py311]
26+
python-version: [py37, py38, py39, py310, py311, py312]
2627
testenv: [core, ext]
2728
steps:
2829
- name: Checkout repo
@@ -40,7 +41,7 @@ jobs:
4041
python-version: ${{ env[matrix.python-version] }}
4142

4243
- name: Install tox
43-
run: pip install "tox<=3.27.1" -U tox-factor
44+
run: pip install "tox<=3.27.1" -U tox-factor setuptools
4445

4546
- name: Cache tox environment
4647
# Preserves .tox directory between runs for faster installs

tox.ini

+26-23
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
[tox]
22
skip_missing_interpreters = True
33
envlist =
4-
py{37,38,39,310,311}-core
4+
py{37,38,39,310,311,312}-core
55

6-
py{37,38,39,310,311}-ext-aiobotocore
6+
py{37,38,39,310,311,312}-ext-aiobotocore
77

8-
py{37,38,39,310,311}-ext-aiohttp
8+
py{37,38,39,310,311,312}-ext-aiohttp
99

10-
py{37,38,39,310,311}-ext-botocore
10+
py{37,38,39,310,311,312}-ext-botocore
1111

12-
py{37,38,39,310,311}-ext-bottle
12+
py{37,38,39,310,311,312}-ext-bottle
1313

1414
py{37,38,39}-ext-django-2
1515

1616
py{37,38,39,310}-ext-django-3
1717

1818
; Django4 is only for python 3.8+
19-
py{38,39,310,311}-ext-django-4
19+
py{38,39,310,311,312}-ext-django-4
2020

21-
py{37,38,39,310,311}-ext-flask
21+
py{37,38,39,310,311,312}-ext-flask
2222

23-
py{37,38,39,310,311}-ext-flask_sqlalchemy
23+
py{37,38,39,310,311,312}-ext-flask_sqlalchemy
2424

25-
py{37,38,39,310,311}-ext-httplib
25+
py{37,38,39,310,311,312}-ext-httplib
2626

27-
py{37,38,39,310,311}-ext-httpx
27+
py{37,38,39,310,311,312}-ext-httpx
2828

29-
py{37,38,39,310,311}-ext-pg8000
29+
py{37,38,39,310,311,312}-ext-pg8000
3030

31-
py{37,38,39,310,311}-ext-psycopg2
31+
py{37,38,39,310,311,312}-ext-psycopg2
3232

33-
py{37,38,39,310,311}-ext-pymysql
33+
py{37,38,39,310,311,312}-ext-pymysql
3434

35-
py{37,38,39,310,311}-ext-pynamodb
35+
py{37,38,39,310,311,312}-ext-pynamodb
3636

37-
py{37,38,39,310,311}-ext-requests
37+
py{37,38,39,310,311,312}-ext-requests
3838

39-
py{37,38,39,310,311}-ext-sqlalchemy
39+
py{37,38,39,310,311,312}-ext-sqlalchemy
4040

41-
py{37,38,39,310,311}-ext-sqlalchemy_core
41+
py{37,38,39,310,311,312}-ext-sqlalchemy_core
4242

43-
py{37,38,39,310,311}-ext-sqlite3
43+
py{37,38,39,310,311,312}-ext-sqlite3
4444

4545
[testenv]
4646
passenv = TOXENV,CI,CODECOV_*
@@ -56,7 +56,10 @@ deps =
5656
wrapt
5757

5858
; Python 3.5+ only deps
59-
py{37,38,39,310,311}: pytest-asyncio
59+
py{37,38,39,310,311,312}: pytest-asyncio
60+
61+
; For pkg_resources
62+
py{37,38,39,310,311,312}: setuptools
6063

6164
ext-aiobotocore: aiobotocore >= 0.10.0
6265
ext-aiobotocore: pytest-asyncio
@@ -89,15 +92,15 @@ deps =
8992
ext-django-4: Django >=4.0,<5.0
9093
ext-django: django-fake-model
9194

92-
py{37,38,39,310,311}-ext-pynamodb: pynamodb >=3.3.1
95+
py{37,38,39,310,311,312}-ext-pynamodb: pynamodb >=3.3.1
9396

9497
ext-psycopg2: psycopg2
9598
ext-psycopg2: testing.postgresql
9699

97100
ext-pg8000: pg8000 <= 1.20.0
98101
ext-pg8000: testing.postgresql
99102

100-
py{37,38,39,310,311}-ext-pymysql: pymysql >= 1.0.0
103+
py{37,38,39,310,311,312}-ext-pymysql: pymysql >= 1.0.0
101104

102105
setenv =
103106
DJANGO_SETTINGS_MODULE = tests.ext.django.app.settings
@@ -107,7 +110,7 @@ setenv =
107110
commands =
108111
coverage erase
109112

110-
py{37,38,39,310,311}-core: coverage run --append --source aws_xray_sdk -m pytest --ignore tests/ext {posargs}
113+
py{37,38,39,310,311,312}-core: coverage run --append --source aws_xray_sdk -m pytest --ignore tests/ext {posargs}
111114

112115
ext-aiobotocore: coverage run --append --source aws_xray_sdk -m pytest tests/ext/aiobotocore {posargs}
113116

@@ -139,7 +142,7 @@ commands =
139142

140143
ext-sqlalchemy: coverage run --append --source aws_xray_sdk -m pytest tests/ext/sqlalchemy {posargs}
141144

142-
py{37,38,39,310,311}-ext-sqlalchemy_core: coverage run --append --source aws_xray_sdk -m pytest tests/ext/sqlalchemy_core {posargs}
145+
py{37,38,39,310,311,312}-ext-sqlalchemy_core: coverage run --append --source aws_xray_sdk -m pytest tests/ext/sqlalchemy_core {posargs}
143146

144147
ext-sqlite3: coverage run --append --source aws_xray_sdk -m pytest tests/ext/sqlite3 {posargs}
145148

0 commit comments

Comments
 (0)