Address a warning from SQLAlchemy for declarative_base
as of 1.4 that has moved
This commit is contained in:
parent
fea643145a
commit
304cec9dd5
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2020 Lance Edgar
|
||||
# Copyright © 2010-2023 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -24,14 +24,14 @@
|
|||
Data models for tempmon
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
import datetime
|
||||
|
||||
import six
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy import orm
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
try:
|
||||
from sqlalchemy.orm import declarative_base
|
||||
except ImportError:
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
|
||||
from rattail import enum
|
||||
from rattail.db.model import uuid_column
|
||||
|
@ -41,7 +41,6 @@ from rattail.db.model.core import ModelBase
|
|||
Base = declarative_base(cls=ModelBase)
|
||||
|
||||
|
||||
@six.python_2_unicode_compatible
|
||||
class Appliance(Base):
|
||||
"""
|
||||
Represents an appliance which is monitored by tempmon.
|
||||
|
@ -81,7 +80,6 @@ class Appliance(Base):
|
|||
return self.name
|
||||
|
||||
|
||||
@six.python_2_unicode_compatible
|
||||
class Client(Base):
|
||||
"""
|
||||
Represents a tempmon client.
|
||||
|
@ -139,7 +137,6 @@ class Client(Base):
|
|||
return [probe for probe in self.probes if probe.enabled]
|
||||
|
||||
|
||||
@six.python_2_unicode_compatible
|
||||
class Probe(Base):
|
||||
"""
|
||||
Represents a probe connected to a tempmon client.
|
||||
|
@ -399,7 +396,6 @@ class Probe(Base):
|
|||
return self.error_timeout
|
||||
|
||||
|
||||
@six.python_2_unicode_compatible
|
||||
class Reading(Base):
|
||||
"""
|
||||
Represents a single temperature reading from a tempmon probe.
|
||||
|
|
Loading…
Reference in a new issue