Commit 9244eb7
refactor: deduplicate pool close() by calling _drain_idle(), fix is True style
pool.close() had a drain loop character-for-character identical to
_drain_idle(). Replace with a call to _drain_idle().
Also change _reset_connection's `conn._in_transaction is True` to
the truthiness check `if conn._in_transaction:` for consistency with
the rest of the codebase. Fix two mock tests that relied on the
`is True` behavior (MagicMock attributes are truthy but not `is True`).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 035c64e commit 9244eb7
2 files changed
Lines changed: 4 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
| 251 | + | |
264 | 252 | | |
265 | 253 | | |
266 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| |||
437 | 438 | | |
438 | 439 | | |
439 | 440 | | |
| 441 | + | |
440 | 442 | | |
441 | 443 | | |
442 | 444 | | |
| |||
0 commit comments