Skip to content

Commit 45f40b9

Browse files
committed
Some grammar fixes, use American spelling
1 parent de277e2 commit 45f40b9

8 files changed

+17
-17
lines changed

dbutils/pooled_db.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
9898
db = pool.dedicated_connection()
9999
100-
If you don't need it any more, you should immediately return it to the
100+
If you don't need it anymore, you should immediately return it to the
101101
pool with db.close(). You can get another connection in the same way.
102102
103103
Warning: In a threaded environment, never do the following:
@@ -386,7 +386,7 @@ def __del__(self):
386386
"""Delete the pool."""
387387
try:
388388
self.close()
389-
except: # builtin Exceptions might not exist any more
389+
except: # builtin Exceptions might not exist anymore
390390
pass
391391

392392
def _wait_lock(self):
@@ -433,7 +433,7 @@ def __del__(self):
433433
"""Delete the pooled connection."""
434434
try:
435435
self.close()
436-
except: # builtin Exceptions might not exist any more
436+
except: # builtin Exceptions might not exist anymore
437437
pass
438438

439439
def __enter__(self):
@@ -525,7 +525,7 @@ def __del__(self):
525525
"""Delete the pooled connection."""
526526
try:
527527
self.close()
528-
except: # builtin Exceptions might not exist any more
528+
except: # builtin Exceptions might not exist anymore
529529
pass
530530

531531
def __enter__(self):

dbutils/pooled_pg.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
proxy class for the hardened SteadyPg version of the connection.
6969
7070
The connection will not be shared with other threads. If you don't need
71-
it any more, you should immediately return it to the pool with db.close().
71+
it anymore, you should immediately return it to the pool with db.close().
7272
You can get another connection in the same way or with db.reopen().
7373
7474
Warning: In a threaded environment, never do the following:
@@ -246,7 +246,7 @@ def __del__(self):
246246
"""Delete the pool."""
247247
try:
248248
self.close()
249-
except: # builtin Exceptions might not exist any more
249+
except: # builtin Exceptions might not exist anymore
250250
pass
251251

252252

@@ -267,7 +267,7 @@ def __init__(self, pool, con):
267267
def close(self):
268268
"""Close the pooled connection."""
269269
# Instead of actually closing the connection,
270-
# return it to the pool so it can be reused.
270+
# return it to the pool so that it can be reused.
271271
if self._con:
272272
self._pool.cache(self._con)
273273
self._con = None
@@ -292,7 +292,7 @@ def __del__(self):
292292
"""Delete the pooled connection."""
293293
try:
294294
self.close()
295-
except: # builtin Exceptions might not exist any more
295+
except: # builtin Exceptions might not exist anymore
296296
pass
297297

298298
def __enter__(self):

dbutils/simple_pooled_db.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def __init__(self, pool, con):
9797
def close(self):
9898
"""Close the pooled connection."""
9999
# Instead of actually closing the connection,
100-
# return it to the pool so it can be reused.
100+
# return it to the pool so that it can be reused.
101101
if self._con is not None:
102102
self._pool.returnConnection(self._con)
103103
self._con = None

dbutils/simple_pooled_pg.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def __init__(self, pool, con):
8686
def close(self):
8787
"""Close the pooled connection."""
8888
# Instead of actually closing the connection,
89-
# return it to the pool so it can be reused.
89+
# return it to the pool so that it can be reused.
9090
if self._con is not None:
9191
self._pool.cache(self._con)
9292
self._con = None

dbutils/steady_db.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ def __del__(self):
517517
"""Delete the steady connection."""
518518
try:
519519
self._close() # make sure the connection is closed
520-
except: # builtin Exceptions might not exist any more
520+
except: # builtin Exceptions might not exist anymore
521521
pass
522522

523523

@@ -708,5 +708,5 @@ def __del__(self):
708708
"""Delete the steady cursor."""
709709
try:
710710
self.close() # make sure the cursor is closed
711-
except: # builtin Exceptions might not exist any more
711+
except: # builtin Exceptions might not exist anymore
712712
pass

dbutils/steady_pg.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,5 +305,5 @@ def __del__(self):
305305
"""Delete the steady connection."""
306306
try:
307307
self._close() # make sure the connection is closed
308-
except: # builtin Exceptions might not exist any more
308+
except: # builtin Exceptions might not exist anymore
309309
pass

docs/main.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ <h3>PooledDB (pooled_db)</h3>
213213
at least <span class="docutils literal">mincached</span> and at the most <span class="docutils literal">maxcached</span> idle connections that
214214
will be used whenever a thread is requesting a dedicated database connection
215215
or the pool of shared connections is not yet full. When a thread closes a
216-
connection that is not shared any more, it is returned back to the pool of
216+
connection that is not shared anymore, it is returned back to the pool of
217217
idle connections so that it can be recycled again.</p>
218218
<p>If the underlying DB-API module is not thread-safe, thread locks will be
219219
used to ensure that the <span class="docutils literal">pooled_db</span> connections are thread-safe. So you
@@ -372,7 +372,7 @@ <h3>PooledDB (pooled_db)</h3>
372372
<pre class="literal-block">db = pool.connection(shareable=False)</pre>
373373
<p>Instead of this, you can also get a dedicated connection as follows:</p>
374374
<pre class="literal-block">db = pool.dedicated_connection()</pre>
375-
<p>If you don't need it any more, you should immediately return it to the
375+
<p>If you don't need it anymore, you should immediately return it to the
376376
pool with <span class="docutils literal">db.close()</span>. You can get another connection in the same way.</p>
377377
<p><em>Warning:</em> In a threaded environment, never do the following:</p>
378378
<pre class="literal-block">pool.connection().cursor().execute(...)</pre>

docs/main.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Besides the pool of shared connections, you can also set up a pool of
189189
at least ``mincached`` and at the most ``maxcached`` idle connections that
190190
will be used whenever a thread is requesting a dedicated database connection
191191
or the pool of shared connections is not yet full. When a thread closes a
192-
connection that is not shared any more, it is returned back to the pool of
192+
connection that is not shared anymore, it is returned back to the pool of
193193
idle connections so that it can be recycled again.
194194

195195
If the underlying DB-API module is not thread-safe, thread locks will be
@@ -389,7 +389,7 @@ Instead of this, you can also get a dedicated connection as follows::
389389

390390
db = pool.dedicated_connection()
391391

392-
If you don't need it any more, you should immediately return it to the
392+
If you don't need it anymore, you should immediately return it to the
393393
pool with ``db.close()``. You can get another connection in the same way.
394394

395395
*Warning:* In a threaded environment, never do the following::

0 commit comments

Comments
 (0)