From ad5837405f975b31b292ce9d3d7e8b9519103086 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 15 Feb 2023 12:51:50 -0600 Subject: [PATCH] Require SQLAlchemy 1.4.x --- corepos/db/lane_op/model.py | 7 +++---- corepos/db/office_op/model.py | 5 ++--- corepos/db/office_trans/model.py | 10 +++------- corepos/db/office_trans_archive/model.py | 6 +++--- setup.py | 5 ++--- 5 files changed, 13 insertions(+), 20 deletions(-) diff --git a/corepos/db/lane_op/model.py b/corepos/db/lane_op/model.py index 80051ab..1c687ab 100644 --- a/corepos/db/lane_op/model.py +++ b/corepos/db/lane_op/model.py @@ -2,7 +2,7 @@ ################################################################################ # # pyCOREPOS -- Python Interface to CORE POS -# Copyright © 2018-2021 Lance Edgar +# Copyright © 2018-2023 Lance Edgar # # This file is part of pyCOREPOS. # @@ -25,11 +25,10 @@ Data model for CORE POS "lane_op" DB """ import sqlalchemy as sa -# from sqlalchemy import orm -from sqlalchemy.ext.declarative import declarative_base +from sqlalchemy import orm -Base = declarative_base() +Base = orm.declarative_base() class Department(Base): diff --git a/corepos/db/office_op/model.py b/corepos/db/office_op/model.py index 107da66..132fd33 100644 --- a/corepos/db/office_op/model.py +++ b/corepos/db/office_op/model.py @@ -2,7 +2,7 @@ ################################################################################ # # pyCOREPOS -- Python Interface to CORE POS -# Copyright © 2018-2021 Lance Edgar +# Copyright © 2018-2023 Lance Edgar # # This file is part of pyCOREPOS. # @@ -29,13 +29,12 @@ import logging import sqlalchemy as sa from sqlalchemy import orm -from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.associationproxy import association_proxy log = logging.getLogger(__name__) -Base = declarative_base() +Base = orm.declarative_base() class StringableDateTime(sa.TypeDecorator): diff --git a/corepos/db/office_trans/model.py b/corepos/db/office_trans/model.py index 7b6240c..20c244c 100644 --- a/corepos/db/office_trans/model.py +++ b/corepos/db/office_trans/model.py @@ -2,7 +2,7 @@ ################################################################################ # # pyCOREPOS -- Python Interface to CORE POS -# Copyright © 2018-2020 Lance Edgar +# Copyright © 2018-2023 Lance Edgar # # This file is part of pyCOREPOS. # @@ -24,17 +24,13 @@ CORE POS Transaction Data Model """ -from __future__ import unicode_literals, absolute_import - -import six import sqlalchemy as sa -from sqlalchemy.ext.declarative import declarative_base +from sqlalchemy import orm -Base = declarative_base() +Base = orm.declarative_base() -@six.python_2_unicode_compatible class TransactionDetailBase(object): """ Represents a POS transaction detail record. diff --git a/corepos/db/office_trans_archive/model.py b/corepos/db/office_trans_archive/model.py index ce70603..8f4a079 100644 --- a/corepos/db/office_trans_archive/model.py +++ b/corepos/db/office_trans_archive/model.py @@ -2,7 +2,7 @@ ################################################################################ # # pyCOREPOS -- Python Interface to CORE POS -# Copyright © 2018-2022 Lance Edgar +# Copyright © 2018-2023 Lance Edgar # # This file is part of pyCOREPOS. # @@ -24,12 +24,12 @@ CORE POS Transaction Data Model """ -from sqlalchemy.ext.declarative import declarative_base +from sqlalchemy import orm from corepos.db.office_trans.model import TransactionDetailBase -Base = declarative_base() +Base = orm.declarative_base() class TransactionDetail(TransactionDetailBase, Base): diff --git a/setup.py b/setup.py index 098d0fc..2c5f0f2 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ ################################################################################ # # pyCOREPOS -- Python Interface to CORE POS -# Copyright © 2018-2020 Lance Edgar +# Copyright © 2018-2023 Lance Edgar # # This file is part of pyCOREPOS. # @@ -63,7 +63,7 @@ requires = [ 'mysql-connector-python', # 8.0.6 'requests', # 2.23.0 'six', # 1.12.0 - 'SQLAlchemy', # 0.9.8 + 'SQLAlchemy>=1.4', # 1.4.0 ] @@ -87,7 +87,6 @@ setup( 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', 'Topic :: Office/Business', 'Topic :: Software Development :: Libraries :: Python Modules', ],