sqlalchemy: Use built-in declarative
sqlalchemy.ext.declarative was deprecated in sqlalchemy 1.4.0, due to the built-in implementations[1]. [1] https://github.com/sqlalchemy/sqlalchemy/commit/450f5c0d6519a439f40 Change-Id: Iccbe77a00fa07f424c4a487a20b6f10c44f6ae83
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
from oslo_db.sqlalchemy import models
|
||||
from oslo_log import log as logging
|
||||
from sqlalchemy import Column
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
from sqlalchemy import Float
|
||||
from sqlalchemy import ForeignKey
|
||||
from sqlalchemy import Index
|
||||
@@ -31,7 +30,7 @@ class _Base(models.ModelBase, models.TimestampMixin):
|
||||
pass
|
||||
|
||||
|
||||
BASE = declarative_base(cls=_Base)
|
||||
BASE = orm.declarative_base(cls=_Base)
|
||||
|
||||
|
||||
class ResourceClass(BASE):
|
||||
|
||||
Reference in New Issue
Block a user