zzzeek/sqlalchemy — pull request #76 by jd23 (2014-02-28 23:45:33+00:00)
Title: In SingletonThreadPool, do not cleanup a newly created connection

Since `self._all_conns` is a `set`, insertion order is not preserved, so `self._all_conns.pop()` in `SingletonThreadPool.cleanup()` sometimes closes newly created connections:

```
819 def _cleanup(self):
820 while len(self._all_conns) > self.size:
821 c = self._all_conns.pop()
822 c.close()
```