Skip to content
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
7 changes: 3 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ jobs:
__version__\s*=\s*(?:['"])([[:PEP440:]])(?:['"])

- name: Setup PostgreSQL
uses: tj-actions/install-postgresql@2a80e9368dff47cd05fee5bf3cf7d88f68c2f8e9 # v3.1.1
if: steps.release.outputs.version == 0 && matrix.os == 'macos-latest'
with:
postgresql-version: 16
run: |
brew install postgresql

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand Down Expand Up @@ -83,7 +82,7 @@ jobs:
test-postgres:
strategy:
matrix:
postgres-version: ["9.5", "9.6", "10", "11", "12", "13", "14", "15", "16"]
postgres-version: ["9.5", "9.6", "10", "11", "12", "13", "14", "15", "16", "17"]

runs-on: ubuntu-latest

Expand Down
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ 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 16. Older PostgreSQL versions or other databases implementing
the PostgreSQL protocol *may* work, but are not being actively tested.
versions 9.5 to 17. Other PostgreSQL versions or other databases
implementing the PostgreSQL protocol *may* work, but are not being
actively tested.


Documentation
Expand Down
25 changes: 19 additions & 6 deletions asyncpg/exceptions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ class StackedDiagnosticsAccessedWithoutActiveHandlerError(DiagnosticsError):
sqlstate = '0Z002'


class InvalidArgumentForXqueryError(_base.PostgresError):
sqlstate = '10608'


class CaseNotFoundError(_base.PostgresError):
sqlstate = '20000'

Expand Down Expand Up @@ -485,6 +489,10 @@ class IdleInTransactionSessionTimeoutError(InvalidTransactionStateError):
sqlstate = '25P03'


class TransactionTimeoutError(InvalidTransactionStateError):
sqlstate = '25P04'


class InvalidSQLStatementNameError(_base.PostgresError):
sqlstate = '26000'

Expand Down Expand Up @@ -900,6 +908,10 @@ class DuplicateFileError(PostgresSystemError):
sqlstate = '58P02'


class FileNameTooLongError(PostgresSystemError):
sqlstate = '58P03'


class SnapshotTooOldError(_base.PostgresError):
sqlstate = '72000'

Expand Down Expand Up @@ -1095,9 +1107,9 @@ class IndexCorruptedError(InternalServerError):
'FDWTableNotFoundError', 'FDWTooManyHandlesError',
'FDWUnableToCreateExecutionError', 'FDWUnableToCreateReplyError',
'FDWUnableToEstablishConnectionError', 'FeatureNotSupportedError',
'ForeignKeyViolationError', 'FunctionExecutedNoReturnStatementError',
'GeneratedAlwaysError', 'GroupingError',
'HeldCursorRequiresSameIsolationLevelError',
'FileNameTooLongError', 'ForeignKeyViolationError',
'FunctionExecutedNoReturnStatementError', 'GeneratedAlwaysError',
'GroupingError', 'HeldCursorRequiresSameIsolationLevelError',
'IdleInTransactionSessionTimeoutError', 'IdleSessionTimeoutError',
'ImplicitZeroBitPadding', 'InFailedSQLTransactionError',
'InappropriateAccessModeForBranchTransactionError',
Expand All @@ -1112,6 +1124,7 @@ class IndexCorruptedError(InternalServerError):
'InvalidArgumentForPowerFunctionError',
'InvalidArgumentForSQLJsonDatetimeFunctionError',
'InvalidArgumentForWidthBucketFunctionError',
'InvalidArgumentForXqueryError',
'InvalidAuthorizationSpecificationError',
'InvalidBinaryRepresentationError', 'InvalidCachedStatementError',
'InvalidCatalogNameError', 'InvalidCharacterValueForCastError',
Expand Down Expand Up @@ -1184,9 +1197,9 @@ class IndexCorruptedError(InternalServerError):
'TooManyJsonObjectMembersError', 'TooManyRowsError',
'TransactionIntegrityConstraintViolationError',
'TransactionResolutionUnknownError', 'TransactionRollbackError',
'TriggerProtocolViolatedError', 'TriggeredActionError',
'TriggeredDataChangeViolationError', 'TrimError',
'UndefinedColumnError', 'UndefinedFileError',
'TransactionTimeoutError', 'TriggerProtocolViolatedError',
'TriggeredActionError', 'TriggeredDataChangeViolationError',
'TrimError', 'UndefinedColumnError', 'UndefinedFileError',
'UndefinedFunctionError', 'UndefinedObjectError',
'UndefinedParameterError', 'UndefinedTableError',
'UniqueViolationError', 'UnsafeNewEnumValueUsageError',
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 16. Older PostgreSQL versions or other databases implementing
versions 9.5 to 17. Other PostgreSQL versions or other databases implementing
the PostgreSQL protocol *may* work, but are not being actively tested.

Contents
Expand Down
Loading