<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>We started talking about SQLAlchemy 2.0 in Openstack most officially in August 2021:<br></div><div><br></div><div><a href="https://lists.openstack.org/pipermail/openstack-discuss/2021-August/024122.html">https://lists.openstack.org/pipermail/openstack-discuss/2021-August/024122.html</a><br></div><div><br></div><div>Since then, lots of work has been done for SQLAlchemy 2.0 compatibility. oslo.db master IIUC should be fully free of 2.0 deprecation warnings, this is the topic for that: <a href="https://review.opendev.org/q/topic:sqlalchemy-20+repo:openstack/oslo.db">https://review.opendev.org/q/topic:sqlalchemy-20+repo:openstack/oslo.db</a> however, sqlalchemy-migrate would need to be fully retired from it which hasn't happened yet.<br></div><div><br></div><div>For downstream projects, the vast majority of SQLAlchemy-related code, which is lots of session.query() calls, should not have to change except to the degree that string-based notation for object attributes is removed in favor of actual attributes, e.g. joinedload("networks") becomes joinedload(Machine.networks).<br></div><div><br></div><div>The SQLAlchemy 2.0 migration process is designed to be gradual and starts with building a 2.0 forwards-compliant application that runs under SQLAlchemy 1.4. This process is documented at <a href="https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#the-1-4-2-0-migration-path">https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#the-1-4-2-0-migration-path</a> . I think a lot of projects are already through this process and are now trying to run directly on the 2.0 release. <br></div><div><br></div><div><br></div><div>On Wed, Feb 1, 2023, at 8:02 AM, Thomas Goirand wrote:<br></div><blockquote type="cite" id="qt" style=""><div>Hi,<br></div><div><br></div><div>SQLAlchemy 2.0 was released 5 days ago. IMO, we should start drawing a <br></div><div>plan to support it for Bobcat, and possibly backport patches for <br></div><div>Antelope. Note that I have no clue what his implies. Maybe Mike, you <br></div><div>could write about it? Has a lot of things changed?<br></div><div><br></div><div>Cheers,<br></div><div><br></div><div>Thomas Goirand (zigo)<br></div><div><br></div><div><br></div></blockquote><div><br></div></body></html>