From e3e3b004aa1425b48e585b0b5b9e0408403a8b4e Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 15 Aug 2024 13:20:52 -0500 Subject: [PATCH 1/3] fix: tweak methods for `FileConfigTestCase` --- src/wuttjamaican/testing.py | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/wuttjamaican/testing.py b/src/wuttjamaican/testing.py index 4f25a43..069d130 100644 --- a/src/wuttjamaican/testing.py +++ b/src/wuttjamaican/testing.py @@ -2,7 +2,7 @@ ################################################################################ # # WuttJamaican -- Base package for Wutta Framework -# Copyright © 2023 Lance Edgar +# Copyright © 2023-2024 Lance Edgar # # This file is part of Wutta Framework. # @@ -27,6 +27,7 @@ WuttJamaican - test utilities import os import shutil import tempfile +import warnings from unittest import TestCase @@ -49,9 +50,9 @@ class FileConfigTestCase(TestCase): def setUp(self): """ """ - self.setup_file_config() + self.setup_files() - def setup_file_config(self): + def setup_files(self): """ Setup logic specific to the ``FileConfigTestCase``. @@ -59,11 +60,18 @@ class FileConfigTestCase(TestCase): """ self.tempdir = tempfile.mkdtemp() + def setup_file_config(self): # pragma: no cover + """ """ + warnings.warn("FileConfigTestCase.setup_file_config() is deprecated; " + "please use setup_files() instead", + DeprecationWarning, stacklevel=2) + self.setup_files() + def tearDown(self): """ """ - self.teardown_file_config() + self.teardown_files() - def teardown_file_config(self): + def teardown_files(self): """ Teardown logic specific to the ``FileConfigTestCase``. @@ -71,6 +79,13 @@ class FileConfigTestCase(TestCase): """ shutil.rmtree(self.tempdir) + def teardown_file_config(self): # pragma: no cover + """ """ + warnings.warn("FileConfigTestCase.teardown_file_config() is deprecated; " + "please use teardown_files() instead", + DeprecationWarning, stacklevel=2) + self.teardown_files() + def write_file(self, filename, content): """ Write a new file (in temporary folder) with the given filename From 82177ea997f10b2bd5cd095aebbac8ef4536c058 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 15 Aug 2024 13:21:11 -0500 Subject: [PATCH 2/3] docs: tweak docstring for `Session` class --- src/wuttjamaican/db/sess.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wuttjamaican/db/sess.py b/src/wuttjamaican/db/sess.py index c1597e2..7fd7a62 100644 --- a/src/wuttjamaican/db/sess.py +++ b/src/wuttjamaican/db/sess.py @@ -25,7 +25,7 @@ WuttJamaican - database sessions .. class:: Session - SQLAlchemy session class used for all (normal) app database + SQLAlchemy session class used for all (normal) :term:`app database` connections. See the upstream :class:`sqlalchemy:sqlalchemy.orm.Session` docs From 58c3f781df64f1804293e29ff9042e77ec98c4a5 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 15 Aug 2024 16:19:34 -0500 Subject: [PATCH 3/3] =?UTF-8?q?bump:=20version=200.11.0=20=E2=86=92=200.11?= =?UTF-8?q?.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 7 +++++++ pyproject.toml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06d4a72..024454f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to WuttJamaican 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.11.1 (2024-08-15) + +### Fix + +- tweak methods for `FileConfigTestCase` +- cascade deletes for User -> UserRole + ## v0.11.0 (2024-08-13) ### Feat diff --git a/pyproject.toml b/pyproject.toml index 59680fb..8b09ae5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" [project] name = "WuttJamaican" -version = "0.11.0" +version = "0.11.1" description = "Base package for Wutta Framework" readme = "README.md" authors = [{name = "Lance Edgar", email = "lance@edbob.org"}]