Skip to content

Test on Python 3.12 and PostgreSQL 16 #1084

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
PIP_DISABLE_PIP_VERSION_CHECK: 1

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 50
submodules: true
Expand All @@ -76,11 +76,11 @@ jobs:
outputs:
include: ${{ steps.set-matrix.outputs.include }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- run: pip install cibuildwheel==2.13.1
- run: pip install cibuildwheel==2.16.2
- id: set-matrix
run: |
MATRIX_INCLUDE=$(
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
PIP_DISABLE_PIP_VERSION_CHECK: 1

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 50
submodules: true
Expand All @@ -118,7 +118,7 @@ jobs:
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2

- uses: pypa/cibuildwheel@v2.13.1
- uses: pypa/cibuildwheel@fff9ec32ed25a9c576750c91e06b410ed0c15db7 # v2.16.2
with:
only: ${{ matrix.only }}
env:
Expand All @@ -138,7 +138,7 @@ jobs:

steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 5
submodules: true
Expand All @@ -154,7 +154,7 @@ jobs:
make htmldocs

- name: Checkout gh-pages
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 5
ref: gh-pages
Expand All @@ -180,7 +180,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 5
submodules: false
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ jobs:
# job.
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest, windows-latest]
loop: [asyncio, uvloop]
exclude:
# uvloop does not support windows
- loop: uvloop
os: windows-latest
# No 3.12 release yet
- loop: uvloop
python-version: "3.12"

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

Expand All @@ -35,7 +38,7 @@ jobs:
PIP_DISABLE_PIP_VERSION_CHECK: 1

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 50
submodules: true
Expand Down Expand Up @@ -76,15 +79,15 @@ jobs:
test-postgres:
strategy:
matrix:
postgres-version: ["9.5", "9.6", "10", "11", "12", "13", "14", "15"]
postgres-version: ["9.5", "9.6", "10", "11", "12", "13", "14", "15", "16"]

runs-on: ubuntu-latest

env:
PIP_DISABLE_PIP_VERSION_CHECK: 1

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 50
submodules: true
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ framework. You can read more about asyncpg in an introductory
`blog post <http://magic.io/blog/asyncpg-1m-rows-from-postgres-to-python/>`_.

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


Expand Down
5 changes: 5 additions & 0 deletions asyncpg/exceptions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,10 @@ class SQLJsonScalarRequiredError(DataError):
sqlstate = '2203F'


class SQLJsonItemCannotBeCastToTargetTypeError(DataError):
sqlstate = '2203G'


class IntegrityConstraintViolationError(_base.PostgresError):
sqlstate = '23000'

Expand Down Expand Up @@ -1163,6 +1167,7 @@ class IndexCorruptedError(InternalServerError):
'ReadingExternalRoutineSQLDataNotPermittedError',
'ReadingSQLDataNotPermittedError', 'ReservedNameError',
'RestrictViolationError', 'SQLJsonArrayNotFoundError',
'SQLJsonItemCannotBeCastToTargetTypeError',
'SQLJsonMemberNotFoundError', 'SQLJsonNumberNotFoundError',
'SQLJsonObjectNotFoundError', 'SQLJsonScalarRequiredError',
'SQLRoutineError', 'SQLStatementNotYetCompleteError',
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ of PostgreSQL server binary protocol for use with Python's ``asyncio``
framework.

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

Contents
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Database :: Front-Ends",
]
Expand All @@ -32,8 +33,8 @@ github = "https://github.com/MagicStack/asyncpg"

[project.optional-dependencies]
test = [
'flake8~=5.0',
'uvloop>=0.15.3; platform_system != "Windows"',
'flake8~=6.1',
'uvloop>=0.15.3; platform_system != "Windows" and python_version < "3.12.0"',
]
docs = [
'Sphinx~=5.3.0',
Expand All @@ -46,7 +47,7 @@ requires = [
"setuptools>=60",
"wheel",

"Cython(>=0.29.24,<0.30.0)"
"Cython(>=0.29.24,<3.0.0)"
]
build-backend = "setuptools.build_meta"

Expand Down