File tree Expand file tree Collapse file tree 6 files changed +8
-12
lines changed Expand file tree Collapse file tree 6 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -257,8 +257,7 @@ def __init__(
257257 if maxconnections is None :
258258 maxconnections = 0
259259 if maxcached :
260- if maxcached < mincached :
261- maxcached = mincached
260+ maxcached = max (maxcached , mincached )
262261 self ._maxcached = maxcached
263262 else :
264263 self ._maxcached = 0
@@ -268,10 +267,8 @@ def __init__(
268267 else :
269268 self ._maxshared = 0
270269 if maxconnections :
271- if maxconnections < maxcached :
272- maxconnections = maxcached
273- if maxconnections < maxshared :
274- maxconnections = maxshared
270+ maxconnections = max (maxconnections , maxcached )
271+ maxconnections = max (maxconnections , maxshared )
275272 self ._maxconnections = maxconnections
276273 else :
277274 self ._maxconnections = 0
Original file line number Diff line number Diff line change @@ -190,8 +190,7 @@ def __init__(
190190 if maxcached and maxcached < mincached :
191191 maxcached = mincached
192192 if maxconnections :
193- if maxconnections < maxcached :
194- maxconnections = maxcached
193+ maxconnections = max (maxconnections , maxcached )
195194 # Create semaphore for number of allowed connections generally:
196195 from threading import Semaphore
197196 self ._connections = Semaphore (maxconnections )
Original file line number Diff line number Diff line change 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.20.1 : https://docutils.sourceforge.io/ " />
5+ < meta name ="generator " content ="Docutils 0.21.2 : 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 " />
Original file line number Diff line number Diff line change 22< html xmlns ="http://www.w3.org/1999/xhtml " xml:lang ="de " lang ="de ">
33< head >
44< meta charset ="utf-8 " />
5- < meta name ="generator " content ="Docutils 0.20.1 : https://docutils.sourceforge.io/ " />
5+ < meta name ="generator " content ="Docutils 0.21.2 : https://docutils.sourceforge.io/ " />
66< meta name ="viewport " content ="width=device-width, initial-scale=1 " />
77< title > Benutzeranleitung für DBUtils</ title >
88< link rel ="stylesheet " href ="doc.css " type ="text/css " />
Original file line number Diff line number Diff line change 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.20.1 : https://docutils.sourceforge.io/ " />
5+ < meta name ="generator " content ="Docutils 0.21.2 : https://docutils.sourceforge.io/ " />
66< meta name ="viewport " content ="width=device-width, initial-scale=1 " />
77< title > DBUtils User's Guide</ title >
88< link rel ="stylesheet " href ="doc.css " type ="text/css " />
Original file line number Diff line number Diff line change 1010threadsafety = 2
1111
1212
13- @pytest .fixture ()
13+ @pytest .fixture
1414def dbapi ():
1515 """Get mock DB API 2 module."""
1616 mock_db = sys .modules [__name__ ]
You can’t perform that action at this time.
0 commit comments