File tree Expand file tree Collapse file tree 6 files changed +17
-9
lines changed Expand file tree Collapse file tree 6 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 1
- Current release
1
+ Future releases
2
2
---------------
3
3
4
4
What's new in psycopg 2.9.10 (unreleased)
5
5
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
6
7
7
- Add support for Python 3.13.
8
8
- Drop support for Python 3.7.
9
+ - `~psycopg2.errorcodes` map and `~psycopg2.errors` classes updated to
10
+ PostgreSQL 17.
11
+
9
12
13
+ Current release
14
+ ---------------
10
15
11
16
What's new in psycopg 2.9.9
12
17
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change 18
18
19
19
.. versionchanged :: 2.9.4 added errors introduced in PostgreSQL 15
20
20
21
+ .. versionchanged :: 2.9.10 added errors introduced in PostgreSQL 17
22
+
21
23
This module exposes the classes psycopg raises upon receiving an error from
22
24
the database with a :sql: `SQLSTATE ` value attached (available in the
23
25
`~psycopg2.Error.pgcode ` attribute). The content of the module is generated
Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ def lookup(code, _cache={}):
256
256
NO_ACTIVE_SQL_TRANSACTION = '25P01'
257
257
IN_FAILED_SQL_TRANSACTION = '25P02'
258
258
IDLE_IN_TRANSACTION_SESSION_TIMEOUT = '25P03'
259
+ TRANSACTION_TIMEOUT = '25P04'
259
260
260
261
# Class 26 - Invalid SQL Statement Name
261
262
INVALID_SQL_STATEMENT_NAME = '26000'
Original file line number Diff line number Diff line change 144
144
{"25P01" , "NoActiveSqlTransaction" },
145
145
{"25P02" , "InFailedSqlTransaction" },
146
146
{"25P03" , "IdleInTransactionSessionTimeout" },
147
+ {"25P04" , "TransactionTimeout" },
147
148
148
149
/* Class 26 - Invalid SQL Statement Name */
149
150
{"26000" , "InvalidSqlStatementName" },
Original file line number Diff line number Diff line change 19
19
20
20
import re
21
21
import sys
22
+ import time
22
23
from urllib .request import urlopen
23
24
from collections import defaultdict
24
25
@@ -32,8 +33,7 @@ def main():
32
33
33
34
file_start = read_base_file (filename )
34
35
# If you add a version to the list fix the docs (in errorcodes.rst)
35
- classes , errors = fetch_errors (
36
- '9.1 9.2 9.3 9.4 9.5 9.6 10 11 12 13 14 15' .split ())
36
+ classes , errors = fetch_errors ("11 12 13 14 15 16 17" .split ())
37
37
38
38
disambiguate (errors )
39
39
@@ -90,8 +90,8 @@ def parse_errors_txt(url):
90
90
91
91
92
92
errors_txt_url = \
93
- "http ://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain; " \
94
- "f= src/backend/utils/errcodes.txt;hb=%s "
93
+ "https ://raw.githubusercontent.com/postgres/postgres/refs/heads/%s " \
94
+ "/ src/backend/utils/errcodes.txt"
95
95
96
96
97
97
def fetch_errors (versions ):
Original file line number Diff line number Diff line change @@ -29,8 +29,7 @@ def main():
29
29
os .path .dirname (__file__ ), "../psycopg/sqlstate_errors.h" )
30
30
31
31
# If you add a version to the list fix the docs (in errors.rst)
32
- classes , errors = fetch_errors (
33
- '9.1 9.2 9.3 9.4 9.5 9.6 10 11 12 13 14 15' .split ())
32
+ classes , errors = fetch_errors ("11 12 13 14 15 16 17" .split ())
34
33
35
34
f = open (filename , "w" )
36
35
print ("/*\n * Autogenerated by 'scripts/make_errors.py'.\n */\n " , file = f )
@@ -74,8 +73,8 @@ def parse_errors_txt(url):
74
73
75
74
76
75
errors_txt_url = \
77
- "http ://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain; " \
78
- "f= src/backend/utils/errcodes.txt;hb=%s "
76
+ "https ://raw.githubusercontent.com/postgres/postgres/refs/heads/%s " \
77
+ "/ src/backend/utils/errcodes.txt"
79
78
80
79
81
80
def fetch_errors (versions ):
You can’t perform that action at this time.
0 commit comments