getappmap / appmap-python

AppMap client agent for Python
https://appland.org
Other
99 stars 16 forks source link

Support async ORM - sqlalchemy 2.0 #279

Closed virajkanwade closed 6 months ago

virajkanwade commented 9 months ago

@apotterri

Since sqlalchemy still supports events, I am guessing the current code should support sqlalchemy 2.0.

petecheslock commented 8 months ago

Currently it looks like we are not capturing events with the 2.0 release due to a deprecated feature on sqlalchemy

_appmap/test/test_sqlalchemy.py::TestSQLAlchemy::test_sql_capture
  /Users/petecheslock/repos/appmap-python/_appmap/test/test_sqlalchemy.py:26: RemovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings.  Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
    connection.execute("SELECT 1")

Updating appmap-python to run SQLAlchemy = "^2" will cause the tests to fail.

https://gist.github.com/petecheslock/a79c1be270cbe5e65fcc93a4ca498a72

@apotterri