Skip to content

Commit 751eec7

Browse files
committed
Release Version 3.2.0 auf DBUtils
1 parent c8654a2 commit 751eec7

5 files changed

Lines changed: 414 additions & 122 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ to a database that can be used in all kinds of multi-threaded environments.
77
The suite supports DB-API 2 compliant database interfaces
88
and the classic PyGreSQL interface.
99

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.
1111

1212
**Please have a look at the [changelog](https://webwareforpython.github.io/DBUtils/changelog.html), because there were some breaking changes in version 2.0.**
1313

changelog.html

Lines changed: 68 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<meta name="generator" content="Docutils 0.22: https://docutils.sourceforge.io/" />
5+
<meta name="generator" content="Docutils 0.23: https://docutils.sourceforge.io/" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<title>Changelog for DBUtils</title>
88
<link rel="stylesheet" href="doc.css" type="text/css" />
@@ -12,22 +12,68 @@
1212
<h1 class="title">Changelog for DBUtils</h1>
1313

1414
<section id="section-1">
15+
<h2>3.2.0</h2>
16+
<p>DBUtils 3.2.0 was released on August 21, 2026.</p>
17+
<p>Changes:</p>
18+
<ul class="simple">
19+
<li><p>Added an <span class="docutils literal">isfatal</span> parameter to <span class="docutils literal">PersistentDB</span>, <span class="docutils literal">PooledDB</span> and
20+
<span class="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 <span class="docutils literal">ping</span> parameter of <span class="docutils literal">PersistentDB</span>, <span class="docutils literal">PooledDB</span> and
27+
<span class="docutils literal">steady_db.connect()</span> now also accepts an SQL statement such as
28+
<span class="docutils literal">&quot;select 1&quot;</span> or a callable that shall be used for checking the
29+
connections instead of the <span class="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 <span class="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 <span class="docutils literal">dbapi_connection</span> and <span class="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+
<ul class="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 <span class="docutils literal">IndexError</span> in <span class="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 <span class="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 <span class="docutils literal">pooled_db.SharedDBConnection</span> violating the contract between
50+
<span class="docutils literal">__eq__</span> and <span class="docutils literal">__hash__</span>; shared connections now compare by identity.</p></li>
51+
<li><p>Fixed <span class="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 <span class="docutils literal">maxconnections</span> after it had been closed.</p></li>
55+
<li><p>Fixed <span class="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+
<section id="section-2">
1561
<h2>3.1.2</h2>
1662
<p>DBUtils 3.1.2 was released on September 7, 2025.</p>
1763
<p>Changes:</p>
1864
<ul class="simple">
1965
<li><p>Support Python version 3.14.</p></li>
2066
</ul>
2167
</section>
22-
<section id="section-2">
68+
<section id="section-3">
2369
<h2>3.1.1</h2>
2470
<p>DBUtils 3.1.1 was released on June 4, 2025.</p>
2571
<p>Changes:</p>
2672
<ul class="simple">
2773
<li><p>Support Python version 3.13.</p></li>
2874
</ul>
2975
</section>
30-
<section id="section-3">
76+
<section id="section-4">
3177
<h2>3.1.0</h2>
3278
<p>DBUtils 3.1.0 was released on March 17, 2024.</p>
3379
<p>Changes:</p>
@@ -36,7 +82,7 @@ <h2>3.1.0</h2>
3682
<li><p>Various small internal improvements and modernizations.</p></li>
3783
</ul>
3884
</section>
39-
<section id="section-4">
85+
<section id="section-5">
4086
<h2>3.0.3</h2>
4187
<p>DBUtils 3.0.3 was released on April 27, 2023.</p>
4288
<p>Changes:</p>
@@ -46,19 +92,19 @@ <h2>3.0.3</h2>
4692
<li><p>Minor fixes and section an advanced usage in docs.</p></li>
4793
</ul>
4894
</section>
49-
<section id="section-5">
95+
<section id="section-6">
5096
<h2>3.0.2</h2>
5197
<p>DBUtils 3.0.2 was released on January 14, 2022.</p>
5298
<p>The optional iterator protocol on cursors is now supported.</p>
5399
</section>
54-
<section id="section-6">
100+
<section id="section-7">
55101
<h2>3.0.1</h2>
56102
<p>DBUtils 3.0.1 was released on December 22, 2021.</p>
57103
<p>It includes <span class="docutils literal">InterfaceError</span> to the default list of exceptions
58104
for which the connection failover mechanism is applied.
59105
You can override this with the <span class="docutils literal">failures</span> parameter.</p>
60106
</section>
61-
<section id="section-7">
107+
<section id="section-8">
62108
<h2>3.0.0</h2>
63109
<p>DBUtils 3.0.0 was released on November 26, 2021.</p>
64110
<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>
67113
<li><p>Cease support for Python 2 and 3.5, minor optimizations.</p></li>
68114
</ul>
69115
</section>
70-
<section id="section-8">
116+
<section id="section-9">
71117
<h2>2.0.3</h2>
72118
<p>DBUtils 2.0.3 was released on November 26, 2021.</p>
73119
<p>Changes:</p>
74120
<ul class="simple">
75121
<li><p>Support Python version 3.10.</p></li>
76122
</ul>
77123
</section>
78-
<section id="section-9">
124+
<section id="section-10">
79125
<h2>2.0.2</h2>
80126
<p>DBUtils 2.0.2 was released on June 8, 2021.</p>
81127
<p>Changes:</p>
82128
<ul class="simple">
83129
<li><p>Allow using context managers for pooled connections.</p></li>
84130
</ul>
85131
</section>
86-
<section id="section-10">
132+
<section id="section-11">
87133
<h2>2.0.1</h2>
88134
<p>DBUtils 2.0.1 was released on April 8, 2021.</p>
89135
<p>Changes:</p>
90136
<ul class="simple">
91137
<li><p>Avoid &quot;name Exception is not defined&quot; when exiting.</p></li>
92138
</ul>
93139
</section>
94-
<section id="section-11">
140+
<section id="section-12">
95141
<h2>2.0</h2>
96142
<p>DBUtils 2.0 was released on September 26, 2020.</p>
97143
<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>
107153
<li><p>This changelog has been compiled from the former release notes.</p></li>
108154
</ul>
109155
</section>
110-
<section id="section-12">
156+
<section id="section-13">
111157
<h2>1.4</h2>
112158
<p>DBUtils 1.4 was released on September 26, 2020.</p>
113159
<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>
118164
inside a transaction.</p></li>
119165
</ul>
120166
</section>
121-
<section id="section-13">
167+
<section id="section-14">
122168
<h2>1.3</h2>
123169
<p>DBUtils 1.3 was released on March 3, 2018.</p>
124170
<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>
127173
<li><p>This version now supports context handlers for connections and cursors.</p></li>
128174
</ul>
129175
</section>
130-
<section id="section-14">
176+
<section id="section-15">
131177
<h2>1.2</h2>
132178
<p>DBUtils 1.2 was released on February 5, 2017.</p>
133179
<p>It is intended to be used with Python versions 2.6, 2.7 and 3.0 to 3.6.</p>
134180
</section>
135-
<section id="section-15">
181+
<section id="section-16">
136182
<h2>1.1.1</h2>
137183
<p>DBUtils 1.1.1 was released on February 4, 2017.</p>
138184
<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>
146192
<li><p>Fixed a problem when running under Jython (reported by Vitaly Kruglikov).</p></li>
147193
</ul>
148194
</section>
149-
<section id="section-16">
195+
<section id="section-17">
150196
<h2>1.1</h2>
151197
<p>DBUtils 1.1 was released on August 14, 2011.</p>
152198
<p>Improvements:</p>
@@ -175,7 +221,7 @@ <h2>1.1</h2>
175221
<li><p>Fixed some minor issues with the <span class="docutils literal">DBUtilsExample</span> for Webware.</p></li>
176222
</ul>
177223
</section>
178-
<section id="section-17">
224+
<section id="section-18">
179225
<h2>1.0</h2>
180226
<p>DBUtils 1.0 was released on November 29, 2008.</p>
181227
<p>It is intended to be used with Python versions 2.2 to 2.6.</p>
@@ -208,7 +254,7 @@ <h2>1.0</h2>
208254
the MySQLdb module (problem reported by Gregory Pinero).</p></li>
209255
</ul>
210256
</section>
211-
<section id="section-18">
257+
<section id="section-19">
212258
<h2>0.9.4</h2>
213259
<p>DBUtils 0.9.4 was released on July 7, 2007.</p>
214260
<p>This release fixes a problem in the destructor code and has been supplemented
@@ -217,7 +263,7 @@ <h2>0.9.4</h2>
217263
in the last release, since you can now pass custom creator functions
218264
for database connections instead of DB-API 2 modules.</p>
219265
</section>
220-
<section id="section-19">
266+
<section id="section-20">
221267
<h2>0.9.3</h2>
222268
<p>DBUtils 0.9.3 was released on May 21, 2007.</p>
223269
<p>Changes:</p>
@@ -232,7 +278,7 @@ <h2>0.9.3</h2>
232278
Added Chinese translation of the User's Guide, kindly contributed by gashero.</p></li>
233279
</ul>
234280
</section>
235-
<section id="section-20">
281+
<section id="section-21">
236282
<h2>0.9.2</h2>
237283
<p>DBUtils 0.9.2 was released on September 22, 2006.</p>
238284
<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>
242288
storage engine. Accordingly, renamed <span class="docutils literal">SolidPg</span> to <span class="docutils literal">SteadyPg</span>.</p></li>
243289
</ul>
244290
</section>
245-
<section id="section-21">
291+
<section id="section-22">
246292
<h2>0.9.1</h2>
247293
<p>DBUtils 0.9.1 was released on May 8, 2006.</p>
248294
<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>
256302
<li><p>Improved the documentation and added a User's Guide.</p></li>
257303
</ul>
258304
</section>
259-
<section id="section-22">
305+
<section id="section-23">
260306
<h2>0.8.1 - 2005-09-13</h2>
261307
<p>DBUtils 0.8.1 was released on September 13, 2005.</p>
262308
<p>It is intended to be used with Python versions 2.0 to 2.4.</p>

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ <h5><a href="changelog.html">Changelog</a></h5>
4242
<header><h2>Downloads</h2></header>
4343
<div>
4444
<h5>Current/Recommended Version:</h5>
45-
<a class="button" href="https://pypi.org/pypi/DBUtils/3.1.2/#files">Download <small>DBUtils 3.1.2</small></a>
45+
<a class="button" href="https://pypi.org/pypi/DBUtils/3.2.0/#files">Download <small>DBUtils 3.2.0</small></a>
4646
<p><small>(this version supports Python 3.7 to 3.14)</small></p>
4747
</div>
4848
<div>

0 commit comments

Comments
 (0)