You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ to a database that can be used in all kinds of multi-threaded environments.
7
7
The suite supports DB-API 2 compliant database interfaces
8
8
and the classic PyGreSQL interface.
9
9
10
-
The current version 3.1.2 of DBUtils supports Python versions 3.7 to 3.14.
10
+
The current version 3.2.0 of DBUtils supports Python versions 3.7 to 3.14.
11
11
12
12
**Please have a look at the [changelog](https://webwareforpython.github.io/DBUtils/changelog.html), because there were some breaking changes in version 2.0.**
<p>DBUtils 3.2.0 was released on August 21, 2026.</p>
17
+
<p>Changes:</p>
18
+
<ulclass="simple">
19
+
<li><p>Added an <spanclass="docutils literal">isfatal</span> parameter to <spanclass="docutils literal">PersistentDB</span>, <spanclass="docutils literal">PooledDB</span> and
20
+
<spanclass="docutils literal">steady_db.connect()</span>, an optional callable that decides whether a given
21
+
exception is really fatal for the connection and the failover mechanism
22
+
shall be applied. This allows distinguishing errors that merely report a
23
+
failed statement, such as a deliberate server side statement timeout, from
24
+
errors that report a broken connection, when the database module maps both
25
+
onto the same exception class.</p></li>
26
+
<li><p>The <spanclass="docutils literal">ping</span> parameter of <spanclass="docutils literal">PersistentDB</span>, <spanclass="docutils literal">PooledDB</span> and
27
+
<spanclass="docutils literal">steady_db.connect()</span> now also accepts an SQL statement such as
28
+
<spanclass="docutils literal">"select 1"</span> or a callable that shall be used for checking the
29
+
connections instead of the <spanclass="docutils literal">ping()</span> method, which is not part of the
30
+
DB-API 2 specification and not provided by every database module. Pass a
31
+
tuple with the usual integer value and the SQL statement or the callable
32
+
if the connections shall not only be checked when they are requested.</p></li>
33
+
<li><p>Added a <spanclass="docutils literal">no_failover()</span> context manager to steady cursors that suspends
34
+
the failover mechanism for individual statements.</p></li>
35
+
<li><p>Added <spanclass="docutils literal">dbapi_connection</span> and <spanclass="docutils literal">dbapi_cursor</span> attributes providing
36
+
supported access to the underlying DB-API 2 objects.</p></li>
37
+
</ul>
38
+
<p>Bugfixes:</p>
39
+
<ulclass="simple">
40
+
<li><p>Fixed the transaction flag being reset on the cursor instead of the
41
+
connection when a connection could not be reopened during a transaction,
42
+
which kept the failover mechanism suspended.</p></li>
43
+
<li><p>Fixed an <spanclass="docutils literal">IndexError</span> in <spanclass="docutils literal">PooledDB.connection()</span> when a thread waiting
44
+
for a shared connection that was in a transaction got woken up after that
45
+
connection had become idle and left the shared cache.</p></li>
46
+
<li><p>Fixed <spanclass="docutils literal">PooledPgConnection.reopen()</span> wrapping another pooled connection
47
+
instead of the underlying steady connection when it was called after the
48
+
connection had already been returned to the pool.</p></li>
49
+
<li><p>Fixed <spanclass="docutils literal">pooled_db.SharedDBConnection</span> violating the contract between
50
+
<spanclass="docutils literal">__eq__</span> and <spanclass="docutils literal">__hash__</span>; shared connections now compare by identity.</p></li>
51
+
<li><p>Fixed <spanclass="docutils literal">PooledPg.close()</span> releasing the semaphore for the connections in
52
+
the pool cache, which had already released it when they were returned to
53
+
the pool, so that the pool handed out more connections at the same time
54
+
than allowed by <spanclass="docutils literal">maxconnections</span> after it had been closed.</p></li>
55
+
<li><p>Fixed <spanclass="docutils literal">PooledPg</span> not releasing the semaphore when a connection could not
56
+
be established, so that every failed attempt permanently reduced the number
57
+
of connections the pool was willing to hand out.</p></li>
58
+
</ul>
59
+
</section>
60
+
<sectionid="section-2">
15
61
<h2>3.1.2</h2>
16
62
<p>DBUtils 3.1.2 was released on September 7, 2025.</p>
17
63
<p>Changes:</p>
18
64
<ulclass="simple">
19
65
<li><p>Support Python version 3.14.</p></li>
20
66
</ul>
21
67
</section>
22
-
<sectionid="section-2">
68
+
<sectionid="section-3">
23
69
<h2>3.1.1</h2>
24
70
<p>DBUtils 3.1.1 was released on June 4, 2025.</p>
25
71
<p>Changes:</p>
26
72
<ulclass="simple">
27
73
<li><p>Support Python version 3.13.</p></li>
28
74
</ul>
29
75
</section>
30
-
<sectionid="section-3">
76
+
<sectionid="section-4">
31
77
<h2>3.1.0</h2>
32
78
<p>DBUtils 3.1.0 was released on March 17, 2024.</p>
33
79
<p>Changes:</p>
@@ -36,7 +82,7 @@ <h2>3.1.0</h2>
36
82
<li><p>Various small internal improvements and modernizations.</p></li>
37
83
</ul>
38
84
</section>
39
-
<sectionid="section-4">
85
+
<sectionid="section-5">
40
86
<h2>3.0.3</h2>
41
87
<p>DBUtils 3.0.3 was released on April 27, 2023.</p>
42
88
<p>Changes:</p>
@@ -46,19 +92,19 @@ <h2>3.0.3</h2>
46
92
<li><p>Minor fixes and section an advanced usage in docs.</p></li>
47
93
</ul>
48
94
</section>
49
-
<sectionid="section-5">
95
+
<sectionid="section-6">
50
96
<h2>3.0.2</h2>
51
97
<p>DBUtils 3.0.2 was released on January 14, 2022.</p>
52
98
<p>The optional iterator protocol on cursors is now supported.</p>
53
99
</section>
54
-
<sectionid="section-6">
100
+
<sectionid="section-7">
55
101
<h2>3.0.1</h2>
56
102
<p>DBUtils 3.0.1 was released on December 22, 2021.</p>
57
103
<p>It includes <spanclass="docutils literal">InterfaceError</span> to the default list of exceptions
58
104
for which the connection failover mechanism is applied.
59
105
You can override this with the <spanclass="docutils literal">failures</span> parameter.</p>
60
106
</section>
61
-
<sectionid="section-7">
107
+
<sectionid="section-8">
62
108
<h2>3.0.0</h2>
63
109
<p>DBUtils 3.0.0 was released on November 26, 2021.</p>
64
110
<p>It is intended to be used with Python versions 3.6 to 3.10.</p>
@@ -67,31 +113,31 @@ <h2>3.0.0</h2>
67
113
<li><p>Cease support for Python 2 and 3.5, minor optimizations.</p></li>
68
114
</ul>
69
115
</section>
70
-
<sectionid="section-8">
116
+
<sectionid="section-9">
71
117
<h2>2.0.3</h2>
72
118
<p>DBUtils 2.0.3 was released on November 26, 2021.</p>
73
119
<p>Changes:</p>
74
120
<ulclass="simple">
75
121
<li><p>Support Python version 3.10.</p></li>
76
122
</ul>
77
123
</section>
78
-
<sectionid="section-9">
124
+
<sectionid="section-10">
79
125
<h2>2.0.2</h2>
80
126
<p>DBUtils 2.0.2 was released on June 8, 2021.</p>
81
127
<p>Changes:</p>
82
128
<ulclass="simple">
83
129
<li><p>Allow using context managers for pooled connections.</p></li>
84
130
</ul>
85
131
</section>
86
-
<sectionid="section-10">
132
+
<sectionid="section-11">
87
133
<h2>2.0.1</h2>
88
134
<p>DBUtils 2.0.1 was released on April 8, 2021.</p>
89
135
<p>Changes:</p>
90
136
<ulclass="simple">
91
137
<li><p>Avoid "name Exception is not defined" when exiting.</p></li>
92
138
</ul>
93
139
</section>
94
-
<sectionid="section-11">
140
+
<sectionid="section-12">
95
141
<h2>2.0</h2>
96
142
<p>DBUtils 2.0 was released on September 26, 2020.</p>
97
143
<p>It is intended to be used with Python versions 2.7 and 3.5 to 3.9.</p>
@@ -107,7 +153,7 @@ <h2>2.0</h2>
107
153
<li><p>This changelog has been compiled from the former release notes.</p></li>
108
154
</ul>
109
155
</section>
110
-
<sectionid="section-12">
156
+
<sectionid="section-13">
111
157
<h2>1.4</h2>
112
158
<p>DBUtils 1.4 was released on September 26, 2020.</p>
113
159
<p>It is intended to be used with Python versions 2.7 and 3.5 to 3.9.</p>
@@ -118,7 +164,7 @@ <h2>1.4</h2>
118
164
inside a transaction.</p></li>
119
165
</ul>
120
166
</section>
121
-
<sectionid="section-13">
167
+
<sectionid="section-14">
122
168
<h2>1.3</h2>
123
169
<p>DBUtils 1.3 was released on March 3, 2018.</p>
124
170
<p>It is intended to be used with Python versions 2.6, 2.7 and 3.4 to 3.7.</p>
@@ -127,12 +173,12 @@ <h2>1.3</h2>
127
173
<li><p>This version now supports context handlers for connections and cursors.</p></li>
128
174
</ul>
129
175
</section>
130
-
<sectionid="section-14">
176
+
<sectionid="section-15">
131
177
<h2>1.2</h2>
132
178
<p>DBUtils 1.2 was released on February 5, 2017.</p>
133
179
<p>It is intended to be used with Python versions 2.6, 2.7 and 3.0 to 3.6.</p>
134
180
</section>
135
-
<sectionid="section-15">
181
+
<sectionid="section-16">
136
182
<h2>1.1.1</h2>
137
183
<p>DBUtils 1.1.1 was released on February 4, 2017.</p>
138
184
<p>It is intended to be used with Python versions 2.3 to 2.7.</p>
@@ -146,7 +192,7 @@ <h2>1.1.1</h2>
146
192
<li><p>Fixed a problem when running under Jython (reported by Vitaly Kruglikov).</p></li>
147
193
</ul>
148
194
</section>
149
-
<sectionid="section-16">
195
+
<sectionid="section-17">
150
196
<h2>1.1</h2>
151
197
<p>DBUtils 1.1 was released on August 14, 2011.</p>
152
198
<p>Improvements:</p>
@@ -175,7 +221,7 @@ <h2>1.1</h2>
175
221
<li><p>Fixed some minor issues with the <spanclass="docutils literal">DBUtilsExample</span> for Webware.</p></li>
176
222
</ul>
177
223
</section>
178
-
<sectionid="section-17">
224
+
<sectionid="section-18">
179
225
<h2>1.0</h2>
180
226
<p>DBUtils 1.0 was released on November 29, 2008.</p>
181
227
<p>It is intended to be used with Python versions 2.2 to 2.6.</p>
@@ -208,7 +254,7 @@ <h2>1.0</h2>
208
254
the MySQLdb module (problem reported by Gregory Pinero).</p></li>
209
255
</ul>
210
256
</section>
211
-
<sectionid="section-18">
257
+
<sectionid="section-19">
212
258
<h2>0.9.4</h2>
213
259
<p>DBUtils 0.9.4 was released on July 7, 2007.</p>
214
260
<p>This release fixes a problem in the destructor code and has been supplemented
@@ -217,7 +263,7 @@ <h2>0.9.4</h2>
217
263
in the last release, since you can now pass custom creator functions
218
264
for database connections instead of DB-API 2 modules.</p>
219
265
</section>
220
-
<sectionid="section-19">
266
+
<sectionid="section-20">
221
267
<h2>0.9.3</h2>
222
268
<p>DBUtils 0.9.3 was released on May 21, 2007.</p>
223
269
<p>Changes:</p>
@@ -232,7 +278,7 @@ <h2>0.9.3</h2>
232
278
Added Chinese translation of the User's Guide, kindly contributed by gashero.</p></li>
233
279
</ul>
234
280
</section>
235
-
<sectionid="section-20">
281
+
<sectionid="section-21">
236
282
<h2>0.9.2</h2>
237
283
<p>DBUtils 0.9.2 was released on September 22, 2006.</p>
238
284
<p>It is intended to be used with Python versions 2.2 to 2.5.</p>
@@ -242,7 +288,7 @@ <h2>0.9.2</h2>
242
288
storage engine. Accordingly, renamed <spanclass="docutils literal">SolidPg</span> to <spanclass="docutils literal">SteadyPg</span>.</p></li>
243
289
</ul>
244
290
</section>
245
-
<sectionid="section-21">
291
+
<sectionid="section-22">
246
292
<h2>0.9.1</h2>
247
293
<p>DBUtils 0.9.1 was released on May 8, 2006.</p>
248
294
<p>It is intended to be used with Python versions 2.2 to 2.4.</p>
@@ -256,7 +302,7 @@ <h2>0.9.1</h2>
256
302
<li><p>Improved the documentation and added a User's Guide.</p></li>
257
303
</ul>
258
304
</section>
259
-
<sectionid="section-22">
305
+
<sectionid="section-23">
260
306
<h2>0.8.1 - 2005-09-13</h2>
261
307
<p>DBUtils 0.8.1 was released on September 13, 2005.</p>
262
308
<p>It is intended to be used with Python versions 2.0 to 2.4.</p>
0 commit comments