The method sqlalchemy.engine.Connection.execute still accepts a regular string as query statement in SQLAlchemy 1.4, but it's no longer possible in SQLAlchemy 2:
This is an issue because several of the SQLAlchemy instrumentor tests still pass str instead of sqlalchemy.text, and the tests will fail if run with SQLAlchemy 2.
What problem do you want to solve?
The method
sqlalchemy.engine.Connection.execute
still accepts a regular string as query statement in SQLAlchemy 1.4, but it's no longer possible in SQLAlchemy 2:See also https://docs.sqlalchemy.org/en/14/core/connections.html#sqlalchemy.engine.Connection.execute
This is an issue because several of the SQLAlchemy instrumentor tests still pass
str
instead ofsqlalchemy.text
, and the tests will fail if run with SQLAlchemy 2.Describe the solution you'd like
I will update the tests.
Describe alternatives you've considered
No response
Additional Context
Related to https://github.com/open-telemetry/opentelemetry-python-contrib/issues/2970
Would you like to implement a fix?
Yis