SQLAlchemy 1.4.x: RootTransaction object cannot serve as stash storage for original method references
See original GitHub issueThe 1.4 major release of sqlalchemy
seems to introduce some interface changes that pytest-flask-sqlalchemy
1.0.2 has trouble handling.
In particular one case is that pytest-flask-sqlalchemy
will attempt to store a transaction’s original rollback
method in a temporary / ephemeral force_rollback
property, but the current sqlalchemy
1.4.0 release seems incompatible with this – I think because the RootTransaction
class defines an explicit list of slots
available on the object.
This issue might be a one-off, or it could be part of a larger category of sqlalchemy
1.4 compatibility concerns.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:17
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Error Messages - SQLAlchemy 1.4 Documentation
Object cannot be converted to 'persistent' state, as this identity map is no longer valid. AsyncIO Exceptions. AwaitRequired; MissingGreenlet; No Inspection ...
Read more >Using the Snowflake SQLAlchemy Toolkit with the Python ...
Snowflake SQLAlchemy runs on the top of the Snowflake Connector for Python as a dialect to bridge a Snowflake database and SQLAlchemy applications....
Read more >How to Use Flask-SQLAlchemy to Interact with Databases in a ...
You'll use it to create a database object that connects to your Flask ... and stored in the basedir variable, and the database.db...
Read more >Declaring Models — Flask-SQLAlchemy Documentation (2.x)
Declaring Models¶ · The baseclass for all your models is called db.Model . It's stored on the SQLAlchemy instance you have to create....
Read more >SQLAlchemy: get Model from table name. This may imply ...
Inspired by Eevee's comment: def get_class_by_tablename(tablename): """Return class reference mapped to table. :param tablename: String with name of table.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jace we quite successfully dropped this package and we wrote our own fixture. this is the code, you might need to adapt it slightly for your needs
where the
db
fixture is the db and the connection fixture isHere’s one I just had to deal with.
Whenever I use the
db_session
fixture this error is thrown:I’ve had to roll-back to SQLAlchemy v.1.3.24