From 74b9ec5e1e2bec83ff00e5e99a7583ca618a3a7b Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 30 Dec 2021 15:53:59 -0600 Subject: [PATCH] Avoid deprecated base class, per upstream changes --- rattail_corepos/datasync/corepos.py | 6 +++--- rattail_corepos/datasync/rattail.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rattail_corepos/datasync/corepos.py b/rattail_corepos/datasync/corepos.py index 3bebaf3..94fbdd4 100644 --- a/rattail_corepos/datasync/corepos.py +++ b/rattail_corepos/datasync/corepos.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2020 Lance Edgar +# Copyright © 2010-2021 Lance Edgar # # This file is part of Rattail. # @@ -29,7 +29,7 @@ import sqlalchemy as sa from corepos.db.office_op import Session as CoreSession, model as corepos from rattail.db import model -from rattail.datasync import DataSyncWatcher, NewDataSyncImportConsumer +from rattail.datasync import DataSyncWatcher, DataSyncImportConsumer class CoreOfficeOpWatcher(DataSyncWatcher): @@ -149,7 +149,7 @@ class COREPOSProductWatcher(DataSyncWatcher): return changes -class FromRattailToCore(NewDataSyncImportConsumer): +class FromRattailToCore(DataSyncImportConsumer): """ Rattail -> CORE POS datasync consumer """ diff --git a/rattail_corepos/datasync/rattail.py b/rattail_corepos/datasync/rattail.py index 391c1a9..f929682 100644 --- a/rattail_corepos/datasync/rattail.py +++ b/rattail_corepos/datasync/rattail.py @@ -28,11 +28,11 @@ from sqlalchemy.orm.exc import NoResultFound from corepos.db.office_op import Session as CoreSession, model as corepos -from rattail.datasync import NewDataSyncImportConsumer +from rattail.datasync import DataSyncImportConsumer from rattail_corepos.corepos.api import make_corepos_api -class FromCOREAPIToRattail(NewDataSyncImportConsumer): +class FromCOREAPIToRattail(DataSyncImportConsumer): """ Consumer for CORE POS (API) -> Rattail datasync """ @@ -145,7 +145,7 @@ class FromCOREAPIToRattail(NewDataSyncImportConsumer): return self.api.get_product(vendor_item['upc']) -class FromCOREPOSToRattailBase(NewDataSyncImportConsumer): +class FromCOREPOSToRattailBase(DataSyncImportConsumer): """ Base class for CORE POS -> Rattail data sync consumers. """