Skip to content

Commit deea86c

Browse files
authored
Test on Python 3.12 and PostgreSQL 16 (#1084)
1 parent 0c3bf60 commit deea86c

File tree

6 files changed

+26
-17
lines changed

6 files changed

+26
-17
lines changed

.github/workflows/release.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
PIP_DISABLE_PIP_VERSION_CHECK: 1
5151

5252
steps:
53-
- uses: actions/checkout@v3
53+
- uses: actions/checkout@v4
5454
with:
5555
fetch-depth: 50
5656
submodules: true
@@ -76,11 +76,11 @@ jobs:
7676
outputs:
7777
include: ${{ steps.set-matrix.outputs.include }}
7878
steps:
79-
- uses: actions/checkout@v3
79+
- uses: actions/checkout@v4
8080
- uses: actions/setup-python@v4
8181
with:
8282
python-version: "3.x"
83-
- run: pip install cibuildwheel==2.13.1
83+
- run: pip install cibuildwheel==2.16.2
8484
- id: set-matrix
8585
run: |
8686
MATRIX_INCLUDE=$(
@@ -109,7 +109,7 @@ jobs:
109109
PIP_DISABLE_PIP_VERSION_CHECK: 1
110110

111111
steps:
112-
- uses: actions/checkout@v3
112+
- uses: actions/checkout@v4
113113
with:
114114
fetch-depth: 50
115115
submodules: true
@@ -118,7 +118,7 @@ jobs:
118118
if: runner.os == 'Linux'
119119
uses: docker/setup-qemu-action@v2
120120

121-
- uses: pypa/cibuildwheel@v2.13.1
121+
- uses: pypa/cibuildwheel@fff9ec32ed25a9c576750c91e06b410ed0c15db7 # v2.16.2
122122
with:
123123
only: ${{ matrix.only }}
124124
env:
@@ -138,7 +138,7 @@ jobs:
138138

139139
steps:
140140
- name: Checkout source
141-
uses: actions/checkout@v3
141+
uses: actions/checkout@v4
142142
with:
143143
fetch-depth: 5
144144
submodules: true
@@ -154,7 +154,7 @@ jobs:
154154
make htmldocs
155155
156156
- name: Checkout gh-pages
157-
uses: actions/checkout@v3
157+
uses: actions/checkout@v4
158158
with:
159159
fetch-depth: 5
160160
ref: gh-pages
@@ -180,7 +180,7 @@ jobs:
180180
runs-on: ubuntu-latest
181181

182182
steps:
183-
- uses: actions/checkout@v3
183+
- uses: actions/checkout@v4
184184
with:
185185
fetch-depth: 5
186186
submodules: false

.github/workflows/tests.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@ jobs:
1717
# job.
1818
strategy:
1919
matrix:
20-
python-version: ["3.8", "3.9", "3.10", "3.11"]
20+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
2121
os: [ubuntu-latest, macos-latest, windows-latest]
2222
loop: [asyncio, uvloop]
2323
exclude:
2424
# uvloop does not support windows
2525
- loop: uvloop
2626
os: windows-latest
27+
# No 3.12 release yet
28+
- loop: uvloop
29+
python-version: "3.12"
2730

2831
runs-on: ${{ matrix.os }}
2932

@@ -35,7 +38,7 @@ jobs:
3538
PIP_DISABLE_PIP_VERSION_CHECK: 1
3639

3740
steps:
38-
- uses: actions/checkout@v3
41+
- uses: actions/checkout@v4
3942
with:
4043
fetch-depth: 50
4144
submodules: true
@@ -76,15 +79,15 @@ jobs:
7679
test-postgres:
7780
strategy:
7881
matrix:
79-
postgres-version: ["9.5", "9.6", "10", "11", "12", "13", "14", "15"]
82+
postgres-version: ["9.5", "9.6", "10", "11", "12", "13", "14", "15", "16"]
8083

8184
runs-on: ubuntu-latest
8285

8386
env:
8487
PIP_DISABLE_PIP_VERSION_CHECK: 1
8588

8689
steps:
87-
- uses: actions/checkout@v3
90+
- uses: actions/checkout@v4
8891
with:
8992
fetch-depth: 50
9093
submodules: true

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ framework. You can read more about asyncpg in an introductory
1414
`blog post <http://magic.io/blog/asyncpg-1m-rows-from-postgres-to-python/>`_.
1515

1616
asyncpg requires Python 3.8 or later and is supported for PostgreSQL
17-
versions 9.5 to 15. Older PostgreSQL versions or other databases implementing
17+
versions 9.5 to 16. Older PostgreSQL versions or other databases implementing
1818
the PostgreSQL protocol *may* work, but are not being actively tested.
1919

2020

asyncpg/exceptions/__init__.py

+5
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,10 @@ class SQLJsonScalarRequiredError(DataError):
397397
sqlstate = '2203F'
398398

399399

400+
class SQLJsonItemCannotBeCastToTargetTypeError(DataError):
401+
sqlstate = '2203G'
402+
403+
400404
class IntegrityConstraintViolationError(_base.PostgresError):
401405
sqlstate = '23000'
402406

@@ -1163,6 +1167,7 @@ class IndexCorruptedError(InternalServerError):
11631167
'ReadingExternalRoutineSQLDataNotPermittedError',
11641168
'ReadingSQLDataNotPermittedError', 'ReservedNameError',
11651169
'RestrictViolationError', 'SQLJsonArrayNotFoundError',
1170+
'SQLJsonItemCannotBeCastToTargetTypeError',
11661171
'SQLJsonMemberNotFoundError', 'SQLJsonNumberNotFoundError',
11671172
'SQLJsonObjectNotFoundError', 'SQLJsonScalarRequiredError',
11681173
'SQLRoutineError', 'SQLStatementNotYetCompleteError',

docs/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ of PostgreSQL server binary protocol for use with Python's ``asyncio``
1616
framework.
1717

1818
**asyncpg** requires Python 3.8 or later and is supported for PostgreSQL
19-
versions 9.5 to 15. Older PostgreSQL versions or other databases implementing
19+
versions 9.5 to 16. Older PostgreSQL versions or other databases implementing
2020
the PostgreSQL protocol *may* work, but are not being actively tested.
2121

2222
Contents

pyproject.toml

+4-3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ classifiers = [
2323
"Programming Language :: Python :: 3.9",
2424
"Programming Language :: Python :: 3.10",
2525
"Programming Language :: Python :: 3.11",
26+
"Programming Language :: Python :: 3.12",
2627
"Programming Language :: Python :: Implementation :: CPython",
2728
"Topic :: Database :: Front-Ends",
2829
]
@@ -32,8 +33,8 @@ github = "https://github.com/MagicStack/asyncpg"
3233

3334
[project.optional-dependencies]
3435
test = [
35-
'flake8~=5.0',
36-
'uvloop>=0.15.3; platform_system != "Windows"',
36+
'flake8~=6.1',
37+
'uvloop>=0.15.3; platform_system != "Windows" and python_version < "3.12.0"',
3738
]
3839
docs = [
3940
'Sphinx~=5.3.0',
@@ -46,7 +47,7 @@ requires = [
4647
"setuptools>=60",
4748
"wheel",
4849

49-
"Cython(>=0.29.24,<0.30.0)"
50+
"Cython(>=0.29.24,<3.0.0)"
5051
]
5152
build-backend = "setuptools.build_meta"
5253

0 commit comments

Comments
 (0)