-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
standardize async dbapi exceptions with access pattern #8047
Copy link
Copy link
Closed
Labels
asynciocode review in progresscode has been provided that's in review as PR and/or gerritcode has been provided that's in review as PR and/or gerritengineengines, connections, transactions, isolation levels, execution optionsengines, connections, transactions, isolation levels, execution optionsfeature
Milestone
Metadata
Metadata
Assignees
Labels
asynciocode review in progresscode has been provided that's in review as PR and/or gerritcode has been provided that's in review as PR and/or gerritengineengines, connections, transactions, isolation levels, execution optionsengines, connections, transactions, isolation levels, execution optionsfeature
Type
Fields
Give feedbackNo fields configured for issues without a type.
Discussed in #8023
I think we should try to hit this in terms of all the async dialects all of which have to do what we are doing here, which would be that we make a common mixin / base for
all(edit: just asyncpg?) the async-adapted DBAPIs. for asyncpg it would be used here:sqlalchemy/lib/sqlalchemy/dialects/postgresql/asyncpg.py
Lines 760 to 761 in 19f0566
that way people can look at
EmulatedDBAPIExceptionto see the fields, which would be like:that looks kind of boring so we can also add an accessor on
sqlalchemy/lib/sqlalchemy/exc.py
Line 525 in 19f0566
that way someone that knows asyncpg can receive the top level SQLAlchemy DBAPIException and just refer to .driver_exception to get all the asyncpg fields.