Resolve MovedIn20Warning
Adjust the import according to the following warning. MovedIn20Warning: The ``declarative_base()`` function is now available as sqlalchemy.orm.declarative_base(). (deprecated since: 2.0) (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9) Change-Id: Iecbb574937f48c6e36a57ccab37f7f351cd14419
This commit is contained in:
@@ -26,11 +26,11 @@ from oslo_utils import timeutils
|
||||
import sqlalchemy as sa
|
||||
# imports needed for cinderlib
|
||||
from sqlalchemy import Column, String, Text # noqa: F401
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
from sqlalchemy import func
|
||||
from sqlalchemy import schema
|
||||
from sqlalchemy.sql import expression
|
||||
from sqlalchemy.orm import backref, column_property, relationship, validates
|
||||
from sqlalchemy.orm import backref, column_property, declarative_base, \
|
||||
relationship, validates
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
Reference in New Issue
Block a user