Skip to content

Commit 1513377

Browse files
committed
Use the new lower-case module names everywhere
Also use the bump2version tool instead of setversion.py.
1 parent 5b9fe81 commit 1513377

32 files changed

+350
-511
lines changed

.bumpversion.cfg

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[bumpversion]
2+
current_version = 2.0
3+
4+
[bumpversion:file:setup.py]
5+
search = __version__ = '{current_version}'
6+
replace = __version__ = '{new_version}'
7+
8+
[bumpversion:file:dbutils/__init__.py]
9+
search = __version__ = '{current_version}'
10+
replace = __version__ = '{new_version}'
11+
12+
[bumpversion:file:README.md]
13+
search = The current version {current_version}
14+
replace = The current version {new_version}
15+
16+
[bumpversion:file:docs/main.rst]
17+
search = :Version: {current_version}
18+
search = :Version: {new_version}
19+
20+
[bumpversion:file:docs/main.de.rst]
21+
search = :Version: {current_version}
22+
search = :Version: {new_version}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ to a database that can be used in all kinds of multi-threaded environments
66
like Webware for Python or other web application servers. The suite supports
77
DB-API 2 compliant database interfaces and the classic PyGreSQL interface.
88

9-
The current version of DBUtils supports Python versions 2.7 and 3.5 - 3.8.
9+
The current version 2.0 of DBUtils supports Python versions 2.7 and 3.5 - 3.8.
1010

1111
The DBUtils home page can be found here: https://webwareforpython.github.io/DBUtils/

dbutils/__init__.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
# DBUtils package
1+
# DBUtils main package
22

33
__all__ = [
4-
'SimplePooledPg', 'SteadyPg', 'PooledPg', 'PersistentPg',
5-
'SimplePooledDB', 'SteadyDB', 'PooledDB', 'PersistentDB'
6-
]
4+
'__version__',
5+
'simple_pooled_pg', 'steady_pg', 'pooled_pg', 'persistent_pg',
6+
'simple_pooled_db', 'steady_db', 'pooled_db', 'persistent_db']
77

8-
__version__ = '1.4'
9-
10-
11-
def InstallInWebKit(appServer):
12-
pass
8+
__version__ = '2.0'

dbutils/persistent_db.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
every connection to your local database 'mydb' to be reused 1000 times:
6565
6666
import pgdb # import used DB-API 2 module
67-
from DBUtils.PersistentDB import PersistentDB
67+
from dbutils.persistent_db import PersistentDB
6868
persist = PersistentDB(pgdb, 1000, database='mydb')
6969
7070
Once you have set up the generator with these parameters, you can
@@ -111,9 +111,8 @@
111111
112112
"""
113113

114-
from DBUtils.SteadyDB import connect
115-
116-
__version__ = '1.4'
114+
from . import __version__
115+
from .steady_db import connect
117116

118117
try:
119118
# Prefer the pure Python version of threading.local.

dbutils/persistent_pg.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
For instance, if you want every connection to your local database 'mydb'
5555
to be reused 1000 times:
5656
57-
from DBUtils.PersistentPg import PersistentPg
57+
from dbutils.persistent_pg import PersistentPg
5858
persist = PersistentPg(5, dbname='mydb')
5959
6060
Once you have set up the generator with these parameters, you can
@@ -102,9 +102,8 @@
102102
103103
"""
104104

105-
from DBUtils.SteadyPg import SteadyPgConnection
106-
107-
__version__ = '1.4'
105+
from . import __version__
106+
from .steady_pg import SteadyPgConnection
108107

109108
try:
110109
# Prefer the pure Python version of threading.local.

dbutils/pooled_db.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
want a pool of at least five connections to your local database 'mydb':
7575
7676
import pgdb # import used DB-API 2 module
77-
from DBUtils.PooledDB import PooledDB
77+
from dbutils.pooled_db import PooledDB
7878
pool = PooledDB(pgdb, 5, database='mydb')
7979
8080
Once you have set up the connection pool you can request
@@ -141,9 +141,8 @@
141141

142142
from threading import Condition
143143

144-
from DBUtils.SteadyDB import connect
145-
146-
__version__ = '1.4'
144+
from . import __version__
145+
from .steady_db import connect
147146

148147

149148
class PooledDBError(Exception):

dbutils/pooled_pg.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
For instance, if you want a pool of at least five connections
5656
to your local database 'mydb':
5757
58-
from DBUtils.PooledPg import PooledPg
58+
from dbutils.pooled_pg import PooledPg
5959
pool = PooledPg(5, dbname='mydb')
6060
6161
Once you have set up the connection pool you can request
@@ -113,9 +113,8 @@
113113
except ImportError: # Python 3
114114
from queue import Queue, Empty, Full
115115

116-
from DBUtils.SteadyPg import SteadyPgConnection
117-
118-
__version__ = '1.4'
116+
from . import __version__
117+
from .steady_pg import SteadyPgConnection
119118

120119

121120
class PooledPgError(Exception):

dbutils/simple_pooled_db.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
to be cached in the pool and the connection parameters, e.g.
2727
2828
import pgdb # import used DB-API 2 module
29-
from DBUtils.SimplePooledDB import PooledDB
29+
from dbutils.simple_pooled_db import PooledDB
3030
dbpool = PooledDB(pgdb, 5, host=..., database=..., user=..., ...)
3131
3232
you can demand database connections from that pool,
@@ -73,7 +73,7 @@
7373
7474
"""
7575

76-
__version__ = '1.4'
76+
from . import __version__
7777

7878

7979
class PooledDBError(Exception):

dbutils/simple_pooled_pg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
number of connections to be cached in the pool and the
2727
connection parameters, e.g.
2828
29-
from DBUtils.SimplePooledPg import PooledPg
29+
from dbutils.simple_pooled_pg import PooledPg
3030
dbpool = PooledPg(5, host=..., database=..., user=..., ...)
3131
3232
you can demand database connections from that pool,
@@ -70,7 +70,7 @@
7070

7171
from pg import DB as PgConnection
7272

73-
__version__ = '1.4'
73+
from . import __version__
7474

7575

7676
class PooledPgConnection:

dbutils/steady_db.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
without further notice.
5959
6060
import pgdb # import used DB-API 2 module
61-
from DBUtils.SteadyDB import connect
61+
from dbutils.steady_db import connect
6262
db = connect(pgdb, 10000, ["set datestyle to german"],
6363
host=..., database=..., user=..., ...)
6464
...
@@ -92,7 +92,7 @@
9292

9393
import sys
9494

95-
__version__ = '1.4'
95+
from . import __version__
9696

9797
try:
9898
baseint = (int, long)

0 commit comments

Comments
 (0)