mirror of https://github.com/celery/kombu.git
Add support for SQLAlchemy 1.4. (#1328)
This commit is contained in:
parent
4446438767
commit
7c34684ae8
|
@ -4,10 +4,15 @@ import datetime
|
|||
|
||||
from sqlalchemy import (Column, Integer, String, Text, DateTime,
|
||||
Sequence, Boolean, ForeignKey, SmallInteger, Index)
|
||||
from sqlalchemy.ext.declarative import declarative_base, declared_attr
|
||||
from sqlalchemy.orm import relation
|
||||
from sqlalchemy.schema import MetaData
|
||||
|
||||
try:
|
||||
from sqlalchemy.orm import declarative_base, declared_attr
|
||||
except ImportError:
|
||||
# TODO: Remove this once we drop support for SQLAlchemy < 1.4.
|
||||
from sqlalchemy.ext.declarative import declarative_base, declared_attr
|
||||
|
||||
class_registry = {}
|
||||
metadata = MetaData()
|
||||
ModelBase = declarative_base(metadata=metadata, class_registry=class_registry)
|
||||
|
|
Loading…
Reference in New Issue