Re: [sqlalchemy] sqlalchemy session in same transaction as existing psycopg2 connection

2018-08-29 Thread 'Brian DeRocher' via sqlalchemy
Beautiful. Skipping the psycopg2 initialization prevents that rollback and allows SQLAlchemy to use the same transaction. FWIW, I don't think pool_reset_on_return=None is needed, at least for my purposes. Thanks for the help and thanks for the advice about raw_connection(). I'll get that

Re: [sqlalchemy] sqlalchemy session in same transaction as existing psycopg2 connection

2018-08-28 Thread 'Brian DeRocher' via sqlalchemy
On Tuesday, August 28, 2018 at 2:51:47 PM UTC-4, Mike Bayer wrote: > > On Tue, Aug 28, 2018 at 11:32 AM, 'Brian DeRocher' via sqlalchemy > > wrote: > > Hey all, > > > > I'm writing some automated tests for some legacy python code using a > > psycopg2

[sqlalchemy] sqlalchemy session in same transaction as existing psycopg2 connection

2018-08-28 Thread 'Brian DeRocher' via sqlalchemy
Hey all, I'm writing some automated tests for some legacy python code using a psycopg2 connection. I'd like to check data in the database by using SQLAlchemy. I rollback the database transaction after each test in tearDown(). The problem is my SQLAlchemy connection doesn't see the database

feedback request on support for sequences with --autogenerate

2018-01-08 Thread Brian DeRocher
? Is there anyway someone can create the tests, so I know I got this working correctly?  Also, since sqlite doesn't support sequences, how do I get automated testing to use PG. A pull request is coming soon. Thanks, Brian -- Brian DeRocher Noblis | noblis.org | ☎ 703.610.1589 | ✉ brian.deroc