Re: [sqlalchemy] Re: Alembic and SA 2: upgrade ends with a rollback

2023-01-15 Thread Mike Bayer
take a look at my console session here. this includes those assertions I mentioned.I had to break it out on a fetch of a zip file which I wasn't sure was hanging or not, but it created all the tables, included COMMIT, then I did a little bit of alembic downgrade / upgrade, COMMIT succeeds,

[sqlalchemy] Re: Alembic and SA 2: upgrade ends with a rollback

2023-01-15 Thread Lele Gaifax
"Mike Bayer" writes: > I'm able to add the assertions and run "make upgrade-db" here without the > assertions failing. > > > Can I get an exact version of what code you are running: > > 1. branch in gitlab, and/or local changes present > 2. exact version of alembic > 3. exact version of sqlalche

[sqlalchemy] Re: Alembic and SA 2: upgrade ends with a rollback

2023-01-15 Thread Lele Gaifax
"Mike Bayer" writes: > There's a few things going on here, and I can see the code here in > your "master" branch at least hasn't been updated for 2.0. See https://gitlab.com/metapensiero/SoL/-/commits/sol5 bye, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: E

[sqlalchemy] Re: Alembic and SA 2: upgrade ends with a rollback

2023-01-15 Thread Lele Gaifax
"Mike Bayer" writes: > I'm actually running your app here and am not reproducing the issue. Oh, what an honor! :-) > There's a few things going on here, and I can see the code here in > your "master" branch at least hasn't been updated for 2.0. Sorry, I'm committing current state and pushing i

Re: [sqlalchemy] Re: Alembic and SA 2: upgrade ends with a rollback

2023-01-15 Thread Mike Bayer
I'm able to add the assertions and run "make upgrade-db" here without the assertions failing. Can I get an exact version of what code you are running: 1. branch in gitlab, and/or local changes present 2. exact version of alembic 3. exact version of sqlalchemy 4. running on a clean dev sqlite db

[sqlalchemy] Re: Alembic and SA 2: upgrade ends with a rollback

2023-01-15 Thread Lele Gaifax
"Mike Bayer" writes: > can you add these assertions to env.py? > > with context.begin_transaction(): > assert not context.get_context()._in_external_transaction > assert not connection.in_transaction() > context.run_migrations() > > that's the condition necessary for begin_transaction