Skip to content

Add PostgreSQL 14 to the support matrix #852

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
Nov 16, 2021
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
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
# job.
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, 3.10.0-rc.1]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest, macos-latest, windows-latest]
loop: [asyncio, uvloop]
exclude:
# uvloop does not support Python 3.6
- loop: uvloop
python-version: 3.6
python-version: "3.6"
# uvloop does not support windows
- loop: uvloop
os: windows-latest
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
test-postgres:
strategy:
matrix:
postgres-version: [9.5, 9.6, 10, 11, 12, 13]
postgres-version: ["9.5", "9.6", "10", "11", "12", "13", "14"]

runs-on: ubuntu-latest

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.6 or later and is supported for PostgreSQL
versions 9.5 to 13. Older PostgreSQL versions or other databases implementing
versions 9.5 to 14. Older PostgreSQL versions or other databases implementing
the PostgreSQL protocol *may* work, but are not being actively tested.


Expand Down
13 changes: 11 additions & 2 deletions asyncpg/exceptions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,10 @@ class DuplicateJsonObjectKeyValueError(DataError):
sqlstate = '22030'


class InvalidArgumentForSQLJsonDatetimeFunctionError(DataError):
sqlstate = '22031'


class InvalidJsonTextError(DataError):
sqlstate = '22032'

Expand Down Expand Up @@ -872,6 +876,10 @@ class DatabaseDroppedError(OperatorInterventionError):
sqlstate = '57P04'


class IdleSessionTimeoutError(OperatorInterventionError):
sqlstate = '57P05'


class PostgresSystemError(_base.PostgresError):
sqlstate = '58000'

Expand Down Expand Up @@ -1086,8 +1094,8 @@ class IndexCorruptedError(InternalServerError):
'ForeignKeyViolationError', 'FunctionExecutedNoReturnStatementError',
'GeneratedAlwaysError', 'GroupingError',
'HeldCursorRequiresSameIsolationLevelError',
'IdleInTransactionSessionTimeoutError', 'ImplicitZeroBitPadding',
'InFailedSQLTransactionError',
'IdleInTransactionSessionTimeoutError', 'IdleSessionTimeoutError',
'ImplicitZeroBitPadding', 'InFailedSQLTransactionError',
'InappropriateAccessModeForBranchTransactionError',
'InappropriateIsolationLevelForBranchTransactionError',
'IndeterminateCollationError', 'IndeterminateDatatypeError',
Expand All @@ -1098,6 +1106,7 @@ class IndexCorruptedError(InternalServerError):
'InvalidArgumentForNthValueFunctionError',
'InvalidArgumentForNtileFunctionError',
'InvalidArgumentForPowerFunctionError',
'InvalidArgumentForSQLJsonDatetimeFunctionError',
'InvalidArgumentForWidthBucketFunctionError',
'InvalidAuthorizationSpecificationError',
'InvalidBinaryRepresentationError', 'InvalidCachedStatementError',
Expand Down
3 changes: 2 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ of PostgreSQL server binary protocol for use with Python's ``asyncio``
framework.

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

Contents
--------
Expand Down
4 changes: 3 additions & 1 deletion tools/generate_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,11 @@ def _add_class(clsname, base, sqlstate, docstring):
buf += '\n\n\n'.join(classes)

_all = textwrap.wrap(', '.join('{!r}'.format(c) for c in sorted(clsnames)))
buf += '\n\n\n__all__ = _base.__all__ + (\n {}\n)'.format(
buf += '\n\n\n__all__ = (\n {}\n)'.format(
'\n '.join(_all))

buf += '\n\n__all__ += _base.__all__'

print(buf)


Expand Down