I've rewritten DBPool.py to properly implement the "State" pattern of
interface/implementation separation. I did this to make it easier to add
additional methods to the implementations, and also tidy up the code.
At the same time, I'm also meshing all the code people have submitted at
various times to implement multiple, configurable DB pools. I've also added
methods to make the use of connections and transactions more convenient.
When I'm done, I'll submit it as a replacement for DBPool (probably to be
called DBCore) if people want it.
All this shuffling and rewriting of code brings up a question of etiquette
and "rightness"--how do I properly attribute the code to the various
authors given that the code has been pushed around quite a bit in spots,
but not too much in other spots? The same question applies to comments
(since I've added, deleted, edited comments to make them clearer?
My original intent was to add an orderly way to close all connection in
each pool when a pool instance is deleted. However, I've found that once a
connection has been assigned out, there's not much that can be done to
close the connection until it is voluntarily returned to the pool. I.e., it
doesn't seem to be possible to hijack a connection that is in use. Could
somebody confirm this? If this is true, then I guess it will never be
possible to do an orderly shutdown of a connection pool.