[sqlalchemy-20] The Engine.execute() method is considered legacy as of the 1.x series

Bug #2008223 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Rodolfo Alonso

Bug Description

Testing patch: https://review.opendev.org/c/openstack/neutron/+/874778

Logs: https://c06c4109be1832423601-1eb2471c773c922210e88856273ba212.ssl.cf5.rackcdn.com/874778/1/check/neutron-functional-with-uwsgi/4c704c1/job-output.txt

Error:
2023-02-22 20:05:21.282046 | controller | engine = engines.create_engine(
2023-02-22 20:05:21.282060 | controller | /home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-functional-gate/lib/python3.10/site-packages/neutron_lib/fixture.py:103: RemovedIn20Warning: The Engine.execute() method is considered legacy as of the 1.x series of SQLAlchemy and will be removed in 2.0. All statement execution in SQLAlchemy 2.0 is performed by the Connection.execute() method of Connection, or in the ORM by the Session.execute() method of Session. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
2023-02-22 20:05:21.282074 | controller | self.engine.execute("PRAGMA foreign_keys=ON")

Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-lib (master)
Changed in neutron:
status: New → In Progress
Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :
Changed in neutron:
importance: Undecided → Medium
importance: Medium → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-lib (master)

Reviewed: https://review.opendev.org/c/openstack/neutron-lib/+/874866
Committed: https://opendev.org/openstack/neutron-lib/commit/444cec2ba04d12980b116086b727c7ff40db63f4
Submitter: "Zuul (22348)"
Branch: master

commit 444cec2ba04d12980b116086b727c7ff40db63f4
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Sat Feb 18 14:50:58 2023 +0100

    [sqlalchemy-20] Use Connection.execute() instead of Engine.execute()

    According to the SLQAlchemy documentation, "the Engine.execute() method
    is considered legacy as of the 1.x series of SQLAlchemy and will be
    removed in 2.0. All statement execution in SQLAlchemy 2.0 is performed
    by the Connection.execute() method of Connection, or in the ORM by the
    Session.execute() method of Session."

    Change-Id: Ic4d7a0740f7136cac2055e57e57f66e76cb150f3
    Closes-Bug: #2008223

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron-lib 3.5.0

This issue was fixed in the openstack/neutron-lib 3.5.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.