Skip to content

Commit 4049167

Browse files
authored
Add PostgreSQL 14 to the support matrix (MagicStack#852)
1 parent d64a44a commit 4049167

File tree

5 files changed

+20
-8
lines changed

5 files changed

+20
-8
lines changed

.github/workflows/tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ jobs:
1717
# job.
1818
strategy:
1919
matrix:
20-
python-version: [3.6, 3.7, 3.8, 3.9, 3.10.0-rc.1]
20+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
2121
os: [ubuntu-latest, macos-latest, windows-latest]
2222
loop: [asyncio, uvloop]
2323
exclude:
2424
# uvloop does not support Python 3.6
2525
- loop: uvloop
26-
python-version: 3.6
26+
python-version: "3.6"
2727
# uvloop does not support windows
2828
- loop: uvloop
2929
os: windows-latest
@@ -79,7 +79,7 @@ jobs:
7979
test-postgres:
8080
strategy:
8181
matrix:
82-
postgres-version: [9.5, 9.6, 10, 11, 12, 13]
82+
postgres-version: ["9.5", "9.6", "10", "11", "12", "13", "14"]
8383

8484
runs-on: ubuntu-latest
8585

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.6 or later and is supported for PostgreSQL
17-
versions 9.5 to 13. Older PostgreSQL versions or other databases implementing
17+
versions 9.5 to 14. 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

+11-2
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,10 @@ class DuplicateJsonObjectKeyValueError(DataError):
337337
sqlstate = '22030'
338338

339339

340+
class InvalidArgumentForSQLJsonDatetimeFunctionError(DataError):
341+
sqlstate = '22031'
342+
343+
340344
class InvalidJsonTextError(DataError):
341345
sqlstate = '22032'
342346

@@ -872,6 +876,10 @@ class DatabaseDroppedError(OperatorInterventionError):
872876
sqlstate = '57P04'
873877

874878

879+
class IdleSessionTimeoutError(OperatorInterventionError):
880+
sqlstate = '57P05'
881+
882+
875883
class PostgresSystemError(_base.PostgresError):
876884
sqlstate = '58000'
877885

@@ -1086,8 +1094,8 @@ class IndexCorruptedError(InternalServerError):
10861094
'ForeignKeyViolationError', 'FunctionExecutedNoReturnStatementError',
10871095
'GeneratedAlwaysError', 'GroupingError',
10881096
'HeldCursorRequiresSameIsolationLevelError',
1089-
'IdleInTransactionSessionTimeoutError', 'ImplicitZeroBitPadding',
1090-
'InFailedSQLTransactionError',
1097+
'IdleInTransactionSessionTimeoutError', 'IdleSessionTimeoutError',
1098+
'ImplicitZeroBitPadding', 'InFailedSQLTransactionError',
10911099
'InappropriateAccessModeForBranchTransactionError',
10921100
'InappropriateIsolationLevelForBranchTransactionError',
10931101
'IndeterminateCollationError', 'IndeterminateDatatypeError',
@@ -1098,6 +1106,7 @@ class IndexCorruptedError(InternalServerError):
10981106
'InvalidArgumentForNthValueFunctionError',
10991107
'InvalidArgumentForNtileFunctionError',
11001108
'InvalidArgumentForPowerFunctionError',
1109+
'InvalidArgumentForSQLJsonDatetimeFunctionError',
11011110
'InvalidArgumentForWidthBucketFunctionError',
11021111
'InvalidAuthorizationSpecificationError',
11031112
'InvalidBinaryRepresentationError', 'InvalidCachedStatementError',

docs/index.rst

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

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

2021
Contents
2122
--------

tools/generate_exceptions.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,11 @@ def _add_class(clsname, base, sqlstate, docstring):
176176
buf += '\n\n\n'.join(classes)
177177

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

182+
buf += '\n\n__all__ += _base.__all__'
183+
182184
print(buf)
183185

184186

0 commit comments

Comments
 (0)