kennethreitz / records

SQL for Humans™
https://pypi.python.org/pypi/records/
ISC License
7.15k stars 570 forks source link

Connections no longer close prematurely. #153

Closed gdtroszak closed 10 months ago

gdtroszak commented 6 years ago

This should fix the issue outlined in https://github.com/kennethreitz/records/issues/128. Essentially, SQLAlchemy connections were being closed prior to their results being consumed by RecordCollections.

Connections spawned by Database query methods are configured to automatically close once their results are consumed. Otherwise, just calling db.get_connection() will return a Connection that must be managed by the user. I also made it a point to check for stray connections prior to closing the DB, but that may be overridden.

Sorry for the delay on this.

techalchemy commented 6 years ago

Thanks for handling this, I was just about to start looking at it!

mostafazh commented 5 years ago

Shouldn't this be merged?

gdtroszak commented 5 years ago

I believe so. I just need someone with the appropriate privileges to review and merge.

kittenswolf commented 5 years ago

@vlcinsky

vlcinsky commented 5 years ago

I plan to check it by Monday. Thanks for reminding.

Projjol-zz commented 5 years ago

hey @vlcinsky, is this good to go?

gdtroszak commented 5 years ago

Bueller... Bueller... Buelller...

chuangbo commented 3 years ago

Any updates? @vlcinsky