diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b9a381..a249452 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,30 @@ All notable changes to rattail-tempmon will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## v0.4.6 (2024-08-19) + +### Fix + +- avoid deprecated base class for config extension + +## v0.4.5 (2024-07-02) + +### Fix + +- fix signature for calls to `get_engines()` + +## v0.4.4 (2024-07-02) + +### Fix + +- avoid deprecated function for engine config + +## v0.4.3 (2024-07-01) + +### Fix + +- remove references, dependency for `six` package + ## v0.4.2 (2024-07-01) ### Fix diff --git a/README.rst b/README.md similarity index 64% rename from README.rst rename to README.md index 39651c1..979c915 100644 --- a/README.rst +++ b/README.md @@ -1,6 +1,5 @@ -rattail-tempmon -=============== +# rattail-tempmon Rattail is a retail software framework, released under the GNU General Public License. @@ -8,6 +7,5 @@ License. This is the ``rattail-tempmon`` package, which provides a database schema, and client/server daemons for recording and processing temperature data. -Please see Rattail's `home page`_ for more information. - -.. _home page: https://rattailproject.org/ +Please see Rattail's [home page](https://rattailproject.org/) for more +information. diff --git a/pyproject.toml b/pyproject.toml index 68af181..0e694fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,9 +6,9 @@ build-backend = "hatchling.build" [project] name = "rattail-tempmon" -version = "0.4.2" +version = "0.4.6" description = "Retail Software Framework - Temperature monitoring add-on" -readme = "README.rst" +readme = "README.md" authors = [{name = "Lance Edgar", email = "lance@edbob.org"}] license = {text = "GNU GPL v3+"} classifiers = [ @@ -24,15 +24,14 @@ classifiers = [ ] dependencies = [ "rattail[db]", - "six", "sqlsoup", ] [project.urls] Homepage = "https://rattailproject.org" -Repository = "https://kallithea.rattailproject.org/rattail-project/rattail-tempmon" -Changelog = "https://kallithea.rattailproject.org/rattail-project/rattail-tempmon/files/master/CHANGES.rst" +Repository = "https://forgejo.wuttaproject.org/rattail/rattail-tempmon" +Changelog = "https://forgejo.wuttaproject.org/rattail/rattail-tempmon/src/branch/master/CHANGELOG.md" [project.entry-points."rattail.config.extensions"] diff --git a/rattail_tempmon/config.py b/rattail_tempmon/config.py index 1c30d30..a5f1333 100644 --- a/rattail_tempmon/config.py +++ b/rattail_tempmon/config.py @@ -1,8 +1,8 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8; -*- ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2024 Lance Edgar # # This file is part of Rattail. # @@ -24,14 +24,13 @@ Tempmon config extension """ -from __future__ import unicode_literals, absolute_import +from wuttjamaican.db import get_engines +from wuttjamaican.conf import WuttaConfigExtension -from rattail.config import ConfigExtension -from rattail.db.config import get_engines from rattail_tempmon.db import Session -class TempmonConfigExtension(ConfigExtension): +class TempmonConfigExtension(WuttaConfigExtension): """ Config extension for tempmon; adds tempmon DB engine/Session etc. Expects something like this in your config: @@ -53,10 +52,10 @@ class TempmonConfigExtension(ConfigExtension): def configure(self, config): # tempmon - config.tempmon_engines = get_engines(config, section='rattail_tempmon.db') + config.tempmon_engines = get_engines(config, 'rattail_tempmon.db') config.tempmon_engine = config.tempmon_engines.get('default') Session.configure(bind=config.tempmon_engine) # hotcooler - config.hotcooler_engines = get_engines(config, section='hotcooler.db') + config.hotcooler_engines = get_engines(config, 'hotcooler.db') config.hotcooler_engine = config.hotcooler_engines.get('default') diff --git a/rattail_tempmon/server.py b/rattail_tempmon/server.py index f5ef640..a54614a 100644 --- a/rattail_tempmon/server.py +++ b/rattail_tempmon/server.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2018 Lance Edgar +# Copyright © 2010-2024 Lance Edgar # # This file is part of Rattail. # @@ -24,13 +24,10 @@ Tempmon server daemon """ -from __future__ import unicode_literals, absolute_import - import time import datetime import logging -import six import humanize from sqlalchemy import orm from sqlalchemy.exc import OperationalError @@ -91,7 +88,7 @@ class TempmonServerDaemon(Daemon): # first time after DB stop. but in the case of DB stop, # subsequent errors will instead match the second test if error.connection_invalidated or ( - 'could not connect to server: Connection refused' in six.text_type(error)): + 'could not connect to server: Connection refused' in str(error)): # only suppress logging for 3 failures, after that we let them go # TODO: should make the max attempts configurable @@ -99,7 +96,7 @@ class TempmonServerDaemon(Daemon): log_error = False log.debug("database connection failure #%s: %s", self.failed_checks, - six.text_type(error)) + str(error)) # send error email unless we're suppressing it for now if log_error: