Skip to content

Commit 9533de3

Browse files
committed
Support Python 3.13 and minor clean-up
1 parent c68e3c9 commit 9533de3

20 files changed

+90
-52
lines changed

.github/workflows/publish_on_pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Python
1616
uses: actions/setup-python@v5
1717
with:
18-
python-version: "3.11"
18+
python-version: "3.12"
1919

2020
- name: Install build tool
2121
run: python -m pip install build --user

.github/workflows/test_with_tox.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
10+
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
1111

1212
steps:
1313
- uses: actions/checkout@v4
@@ -21,5 +21,5 @@ jobs:
2121

2222
- run: tox -e py
2323

24-
- if: matrix.python == 3.11
24+
- if: matrix.python == 3.12
2525
run: TOXENV=ruff,manifest,docs,spell tox

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2024 Christoph Zwerschke
3+
Copyright (c) 2025 Christoph Zwerschke
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

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.0 of DBUtils supports Python versions 3.7 to 3.12.
10+
The current version 3.1.1 of DBUtils supports Python versions 3.7 to 3.13.
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

dbutils/__init__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
"""The DBUtils main package."""
22

3-
__all__ = [
4-
'__version__',
5-
'simple_pooled_pg', 'steady_pg', 'pooled_pg', 'persistent_pg',
6-
'simple_pooled_db', 'steady_db', 'pooled_db', 'persistent_db']
3+
__all__ = ["__version__"]
74

8-
__version__ = '3.1.0'
5+
__version__ = "3.1.1"

dbutils/persistent_db.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@
123123
# Fall back to the default version of threading.local.
124124
from threading import local
125125

126+
__all__ = ['PersistentDB', 'PersistentDBError', 'NotSupportedError']
127+
126128

127129
class PersistentDBError(Exception):
128130
"""General PersistentDB error."""

dbutils/persistent_pg.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@
113113
# Fall back to the default version of threading.local.
114114
from threading import local
115115

116+
__all__ = ['PersistentPg']
117+
116118

117119
class PersistentPg:
118120
"""Generator for persistent classic PyGreSQL connections.

dbutils/pooled_db.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,13 @@
153153
from . import __version__
154154
from .steady_db import connect
155155

156+
__all__ = [
157+
'PooledDB', 'PooledDedicatedDBConnection',
158+
'SharedDBConnection', 'PooledSharedDBConnection',
159+
'PooledDBError', 'InvalidConnectionError',
160+
'NotSupportedError', 'TooManyConnectionsError',
161+
]
162+
156163

157164
class PooledDBError(Exception):
158165
"""General PooledDB error."""

dbutils/pooled_pg.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@
118118
from . import __version__
119119
from .steady_pg import SteadyPgConnection
120120

121+
__all__ = [
122+
'PooledPg', 'PooledPgConnection',
123+
'PooledPgError', 'InvalidConnectionError', 'TooManyConnectionsError',
124+
'RESET_ALWAYS_ROLLBACK', 'RESET_COMPLETELY',
125+
]
126+
121127
# constants for "reset" parameter
122128
RESET_ALWAYS_ROLLBACK = 1
123129
RESET_COMPLETELY = 2

dbutils/simple_pooled_db.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@
7474

7575
from . import __version__
7676

77+
__all__ = [
78+
'PooledDB', 'PooledDBConnection', 'PooledDBError', 'NotSupportedError',
79+
]
80+
7781

7882
class PooledDBError(Exception):
7983
"""General PooledDB error."""

dbutils/simple_pooled_pg.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@
7171

7272
from . import __version__
7373

74+
__all__ = ['PooledPg', 'PooledPgConnection']
75+
7476

7577
class PooledPgConnection:
7678
"""A proxy class for pooled PostgreSQL connections.

docs/changelog.html

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212
<h1 class="title">Changelog for DBUtils</h1>
1313

1414
<section id="section-1">
15+
<h2>3.1.1</h2>
16+
<p>DBUtils 3.1.1 was released on June 4, 2025.</p>
17+
<p>Changes:</p>
18+
<ul class="simple">
19+
<li><p>Support Python version 3.13.</p></li>
20+
</ul>
21+
</section>
22+
<section id="section-2">
1523
<h2>3.1.0</h2>
1624
<p>DBUtils 3.1.0 was released on March 17, 2024.</p>
1725
<p>Changes:</p>
@@ -20,7 +28,7 @@ <h2>3.1.0</h2>
2028
<li><p>Various small internal improvements and modernizations.</p></li>
2129
</ul>
2230
</section>
23-
<section id="section-2">
31+
<section id="section-3">
2432
<h2>3.0.3</h2>
2533
<p>DBUtils 3.0.3 was released on April 27, 2023.</p>
2634
<p>Changes:</p>
@@ -30,19 +38,19 @@ <h2>3.0.3</h2>
3038
<li><p>Minor fixes and section an advanced usage in docs.</p></li>
3139
</ul>
3240
</section>
33-
<section id="section-3">
41+
<section id="section-4">
3442
<h2>3.0.2</h2>
3543
<p>DBUtils 3.0.2 was released on January 14, 2022.</p>
3644
<p>The optional iterator protocol on cursors is now supported.</p>
3745
</section>
38-
<section id="section-4">
46+
<section id="section-5">
3947
<h2>3.0.1</h2>
4048
<p>DBUtils 3.0.1 was released on December 22, 2021.</p>
4149
<p>It includes <span class="docutils literal">InterfaceError</span> to the default list of exceptions
4250
for which the connection failover mechanism is applied.
4351
You can override this with the <span class="docutils literal">failures</span> parameter.</p>
4452
</section>
45-
<section id="section-5">
53+
<section id="section-6">
4654
<h2>3.0.0</h2>
4755
<p>DBUtils 3.0.0 was released on November 26, 2021.</p>
4856
<p>It is intended to be used with Python versions 3.6 to 3.10.</p>
@@ -51,31 +59,31 @@ <h2>3.0.0</h2>
5159
<li><p>Cease support for Python 2 and 3.5, minor optimizations.</p></li>
5260
</ul>
5361
</section>
54-
<section id="section-6">
62+
<section id="section-7">
5563
<h2>2.0.3</h2>
5664
<p>DBUtils 2.0.3 was released on November 26, 2021.</p>
5765
<p>Changes:</p>
5866
<ul class="simple">
5967
<li><p>Support Python version 3.10.</p></li>
6068
</ul>
6169
</section>
62-
<section id="section-7">
70+
<section id="section-8">
6371
<h2>2.0.2</h2>
6472
<p>DBUtils 2.0.2 was released on June 8, 2021.</p>
6573
<p>Changes:</p>
6674
<ul class="simple">
6775
<li><p>Allow using context managers for pooled connections.</p></li>
6876
</ul>
6977
</section>
70-
<section id="section-8">
78+
<section id="section-9">
7179
<h2>2.0.1</h2>
7280
<p>DBUtils 2.0.1 was released on April 8, 2021.</p>
7381
<p>Changes:</p>
7482
<ul class="simple">
7583
<li><p>Avoid &quot;name Exception is not defined&quot; when exiting.</p></li>
7684
</ul>
7785
</section>
78-
<section id="section-9">
86+
<section id="section-10">
7987
<h2>2.0</h2>
8088
<p>DBUtils 2.0 was released on September 26, 2020.</p>
8189
<p>It is intended to be used with Python versions 2.7 and 3.5 to 3.9.</p>
@@ -91,7 +99,7 @@ <h2>2.0</h2>
9199
<li><p>This changelog has been compiled from the former release notes.</p></li>
92100
</ul>
93101
</section>
94-
<section id="section-10">
102+
<section id="section-11">
95103
<h2>1.4</h2>
96104
<p>DBUtils 1.4 was released on September 26, 2020.</p>
97105
<p>It is intended to be used with Python versions 2.7 and 3.5 to 3.9.</p>
@@ -102,7 +110,7 @@ <h2>1.4</h2>
102110
inside a transaction.</p></li>
103111
</ul>
104112
</section>
105-
<section id="section-11">
113+
<section id="section-12">
106114
<h2>1.3</h2>
107115
<p>DBUtils 1.3 was released on March 3, 2018.</p>
108116
<p>It is intended to be used with Python versions 2.6, 2.7 and 3.4 to 3.7.</p>
@@ -111,12 +119,12 @@ <h2>1.3</h2>
111119
<li><p>This version now supports context handlers for connections and cursors.</p></li>
112120
</ul>
113121
</section>
114-
<section id="section-12">
122+
<section id="section-13">
115123
<h2>1.2</h2>
116124
<p>DBUtils 1.2 was released on February 5, 2017.</p>
117125
<p>It is intended to be used with Python versions 2.6, 2.7 and 3.0 to 3.6.</p>
118126
</section>
119-
<section id="section-13">
127+
<section id="section-14">
120128
<h2>1.1.1</h2>
121129
<p>DBUtils 1.1.1 was released on February 4, 2017.</p>
122130
<p>It is intended to be used with Python versions 2.3 to 2.7.</p>
@@ -130,7 +138,7 @@ <h2>1.1.1</h2>
130138
<li><p>Fixed a problem when running under Jython (reported by Vitaly Kruglikov).</p></li>
131139
</ul>
132140
</section>
133-
<section id="section-14">
141+
<section id="section-15">
134142
<h2>1.1</h2>
135143
<p>DBUtils 1.1 was released on August 14, 2011.</p>
136144
<p>Improvements:</p>
@@ -159,7 +167,7 @@ <h2>1.1</h2>
159167
<li><p>Fixed some minor issues with the <span class="docutils literal">DBUtilsExample</span> for Webware.</p></li>
160168
</ul>
161169
</section>
162-
<section id="section-15">
170+
<section id="section-16">
163171
<h2>1.0</h2>
164172
<p>DBUtils 1.0 was released on November 29, 2008.</p>
165173
<p>It is intended to be used with Python versions 2.2 to 2.6.</p>
@@ -192,7 +200,7 @@ <h2>1.0</h2>
192200
the MySQLdb module (problem reported by Gregory Pinero).</p></li>
193201
</ul>
194202
</section>
195-
<section id="section-16">
203+
<section id="section-17">
196204
<h2>0.9.4</h2>
197205
<p>DBUtils 0.9.4 was released on July 7, 2007.</p>
198206
<p>This release fixes a problem in the destructor code and has been supplemented
@@ -201,7 +209,7 @@ <h2>0.9.4</h2>
201209
in the last release, since you can now pass custom creator functions
202210
for database connections instead of DB-API 2 modules.</p>
203211
</section>
204-
<section id="section-17">
212+
<section id="section-18">
205213
<h2>0.9.3</h2>
206214
<p>DBUtils 0.9.3 was released on May 21, 2007.</p>
207215
<p>Changes:</p>
@@ -216,7 +224,7 @@ <h2>0.9.3</h2>
216224
Added Chinese translation of the User's Guide, kindly contributed by gashero.</p></li>
217225
</ul>
218226
</section>
219-
<section id="section-18">
227+
<section id="section-19">
220228
<h2>0.9.2</h2>
221229
<p>DBUtils 0.9.2 was released on September 22, 2006.</p>
222230
<p>It is intended to be used with Python versions 2.2 to 2.5.</p>
@@ -226,7 +234,7 @@ <h2>0.9.2</h2>
226234
storage engine. Accordingly, renamed <span class="docutils literal">SolidPg</span> to <span class="docutils literal">SteadyPg</span>.</p></li>
227235
</ul>
228236
</section>
229-
<section id="section-19">
237+
<section id="section-20">
230238
<h2>0.9.1</h2>
231239
<p>DBUtils 0.9.1 was released on May 8, 2006.</p>
232240
<p>It is intended to be used with Python versions 2.2 to 2.4.</p>
@@ -240,7 +248,7 @@ <h2>0.9.1</h2>
240248
<li><p>Improved the documentation and added a User's Guide.</p></li>
241249
</ul>
242250
</section>
243-
<section id="section-20">
251+
<section id="section-21">
244252
<h2>0.8.1 - 2005-09-13</h2>
245253
<p>DBUtils 0.8.1 was released on September 13, 2005.</p>
246254
<p>It is intended to be used with Python versions 2.0 to 2.4.</p>

docs/changelog.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
Changelog for DBUtils
22
+++++++++++++++++++++
33

4+
3.1.1
5+
=====
6+
7+
DBUtils 3.1.1 was released on June 4, 2025.
8+
9+
Changes:
10+
11+
* Support Python version 3.13.
12+
413
3.1.0
514
=====
615

@@ -11,7 +20,6 @@ Changes:
1120
* Support Python version 3.12, cease support for Python 3.6.
1221
* Various small internal improvements and modernizations.
1322

14-
1523
3.0.3
1624
=====
1725

docs/main.de.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<h1 class="title">Benutzeranleitung für DBUtils</h1>
1313
<dl class="docinfo simple">
1414
<dt class="version">Version<span class="colon">:</span></dt>
15-
<dd class="version">3.1.0</dd>
15+
<dd class="version">3.1.1</dd>
1616
<dt class="translations">Translations<span class="colon">:</span></dt>
1717
<dd class="translations"><p><a class="reference external" href="main.html">English</a> | German</p>
1818
</dd>
@@ -137,7 +137,7 @@ <h3>Installation</h3>
137137
</section>
138138
<section id="anforderungen">
139139
<h2>Anforderungen</h2>
140-
<p>DBUtils unterstützt die <a class="reference external" href="https://www.python.org">Python</a> Versionen 3.7 bis 3.12.</p>
140+
<p>DBUtils unterstützt die <a class="reference external" href="https://www.python.org">Python</a> Versionen 3.7 bis 3.3.</p>
141141
<p>Die Module in der Variante für klassisches PyGreSQL benötigen <a class="reference external" href="https://www.pygresql.org/">PyGreSQL</a>
142142
Version 4.0 oder höher, während die Module in der allgemeinen Variante
143143
für DB-API 2 mit jedem beliebigen Python-Datenbankadapter-Modul zusammenarbeiten,
@@ -542,7 +542,7 @@ <h2>Autoren</h2>
542542
</section>
543543
<section id="copyright-und-lizenz">
544544
<h2>Copyright und Lizenz</h2>
545-
<p>Copyright © 2005-2024 Christoph Zwerschke.
545+
<p>Copyright © 2005-2025 Christoph Zwerschke.
546546
Alle Rechte vorbehalten.</p>
547547
<p>DBUtils ist freie und quelloffene Software,
548548
lizenziert unter der <a class="reference external" href="https://opensource.org/licenses/MIT">MIT-Lizenz</a>.</p>

docs/main.de.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Benutzeranleitung für DBUtils
22
+++++++++++++++++++++++++++++
33

4-
:Version: 3.1.0
4+
:Version: 3.1.1
55
:Translations: English_ | German
66

77
.. _English: main.html
@@ -98,7 +98,7 @@ herunterzuladen und zu installieren::
9898
Anforderungen
9999
=============
100100

101-
DBUtils unterstützt die Python_ Versionen 3.7 bis 3.12.
101+
DBUtils unterstützt die Python_ Versionen 3.7 bis 3.3.
102102

103103
Die Module in der Variante für klassisches PyGreSQL benötigen PyGreSQL_
104104
Version 4.0 oder höher, während die Module in der allgemeinen Variante
@@ -584,7 +584,7 @@ Autoren
584584
Copyright und Lizenz
585585
====================
586586

587-
Copyright © 2005-2024 Christoph Zwerschke.
587+
Copyright © 2005-2025 Christoph Zwerschke.
588588
Alle Rechte vorbehalten.
589589

590590
DBUtils ist freie und quelloffene Software,

0 commit comments

Comments
 (0)