Re: [sqlalchemy] Session and optimistic disconnect handling

2021-06-08 Thread Mike Bayer
On Tue, Jun 8, 2021, at 12:40 PM, 'Matt Zagrabelny' via sqlalchemy wrote: > > > On Tue, Jun 8, 2021 at 10:28 AM Mike Bayer wrote: >> __ >> >>> however, I would advise using pool_pre_ping instead which is much easier to use and has basically no downsides.this feature didn't

Re: [sqlalchemy] Session and optimistic disconnect handling

2021-06-08 Thread 'Matt Zagrabelny' via sqlalchemy
On Tue, Jun 8, 2021 at 10:28 AM Mike Bayer wrote: > > > > however, I would advise using pool_pre_ping instead which is much easier > to use and has basically no downsides.this feature didn't exist when > the docs for "optimistic disconnect" were written. > > > Sure. I was only looking at

Re: [sqlalchemy] Session and optimistic disconnect handling

2021-06-08 Thread Mike Bayer
On Tue, Jun 8, 2021, at 11:18 AM, 'Matt Zagrabelny' via sqlalchemy wrote: > Hi Mike, > > Thanks for the reply! > > On Mon, Jun 7, 2021 at 6:08 PM Mike Bayer wrote: >> __ >> ORM Sessions ride on top of connections, but since the Session under it's >> default pattern of being bound to an

Re: [sqlalchemy] Session and optimistic disconnect handling

2021-06-08 Thread 'Matt Zagrabelny' via sqlalchemy
Hi Mike, Thanks for the reply! On Mon, Jun 7, 2021 at 6:08 PM Mike Bayer wrote: > ORM Sessions ride on top of connections, but since the Session under it's > default pattern of being bound to an Engine does the "connect" internally, > it's probably inconvenient to adapt the optimistic