Compare commits
4 commits
1daa6ee92e
...
f4d8d69cb2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4d8d69cb2 | ||
|
|
ae23381bac | ||
|
|
9bbd92d683 | ||
|
|
80b50f05da |
8 changed files with 20 additions and 5 deletions
|
|
@ -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/)
|
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).
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## v0.23.2 (2025-09-20)
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- log warning when sending email is requested but disabled
|
||||||
|
- do not use appname for config extension entry points
|
||||||
|
|
||||||
## v0.23.1 (2025-08-31)
|
## v0.23.1 (2025-08-31)
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
|
|
|
||||||
|
|
@ -137,6 +137,8 @@ Glossary
|
||||||
The intention is that all config extensions will have been
|
The intention is that all config extensions will have been
|
||||||
applied before the :term:`app handler` is created.
|
applied before the :term:`app handler` is created.
|
||||||
|
|
||||||
|
See also :ref:`config-extensions`.
|
||||||
|
|
||||||
config file
|
config file
|
||||||
A file which contains :term:`config settings<config setting>`.
|
A file which contains :term:`config settings<config setting>`.
|
||||||
See also :doc:`narr/config/files`.
|
See also :doc:`narr/config/files`.
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,8 @@ confirmed by inspecting either
|
||||||
setups) the log file.
|
setups) the log file.
|
||||||
|
|
||||||
|
|
||||||
|
.. _config-includes:
|
||||||
|
|
||||||
Including More Files
|
Including More Files
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,8 @@ to solve the "chicken-vs-egg" problem::
|
||||||
app = config.get_app()
|
app = config.get_app()
|
||||||
|
|
||||||
|
|
||||||
|
.. _config-extensions:
|
||||||
|
|
||||||
Extending the Config Object
|
Extending the Config Object
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ build-backend = "hatchling.build"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "WuttJamaican"
|
name = "WuttJamaican"
|
||||||
version = "0.23.1"
|
version = "0.23.2"
|
||||||
description = "Base package for Wutta Framework"
|
description = "Base package for Wutta Framework"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = [{name = "Lance Edgar", email = "lance@wuttaproject.org"}]
|
authors = [{name = "Lance Edgar", email = "lance@wuttaproject.org"}]
|
||||||
|
|
|
||||||
|
|
@ -1040,7 +1040,9 @@ def make_config( # pylint: disable=too-many-arguments,too-many-positional-argum
|
||||||
# maybe extend config object
|
# maybe extend config object
|
||||||
if extend:
|
if extend:
|
||||||
if not extension_entry_points:
|
if not extension_entry_points:
|
||||||
extension_entry_points = f"{appname}.config.extensions"
|
# nb. must not use appname here, entry points must be
|
||||||
|
# consistent regardless of appname
|
||||||
|
extension_entry_points = "wutta.config.extensions"
|
||||||
|
|
||||||
# apply all registered extensions
|
# apply all registered extensions
|
||||||
# TODO: maybe let config disable some extensions?
|
# TODO: maybe let config disable some extensions?
|
||||||
|
|
|
||||||
|
|
@ -725,7 +725,7 @@ class EmailHandler(GenericHandler): # pylint: disable=too-many-public-methods
|
||||||
# make sure sending is enabled
|
# make sure sending is enabled
|
||||||
log.debug("sending email from %s; to %s", sender, recips)
|
log.debug("sending email from %s; to %s", sender, recips)
|
||||||
if not self.sending_is_enabled():
|
if not self.sending_is_enabled():
|
||||||
log.debug("nevermind, config says no emails")
|
log.warning("email sending is disabled")
|
||||||
return
|
return
|
||||||
|
|
||||||
# smtp connect
|
# smtp connect
|
||||||
|
|
|
||||||
|
|
@ -931,7 +931,7 @@ class TestMakeConfig(FileTestCase):
|
||||||
WuttaConfig.assert_called_once_with(
|
WuttaConfig.assert_called_once_with(
|
||||||
[], appname="wuttatest", usedb=None, preferdb=None
|
[], appname="wuttatest", usedb=None, preferdb=None
|
||||||
)
|
)
|
||||||
load_entry_points.assert_called_once_with("wuttatest.config.extensions")
|
load_entry_points.assert_called_once_with("wutta.config.extensions")
|
||||||
|
|
||||||
# confirm extensions are invoked
|
# confirm extensions are invoked
|
||||||
load_entry_points.reset_mock()
|
load_entry_points.reset_mock()
|
||||||
|
|
@ -945,7 +945,7 @@ class TestMakeConfig(FileTestCase):
|
||||||
WuttaConfig.assert_called_once_with(
|
WuttaConfig.assert_called_once_with(
|
||||||
[], appname="wuttatest", usedb=None, preferdb=None
|
[], appname="wuttatest", usedb=None, preferdb=None
|
||||||
)
|
)
|
||||||
load_entry_points.assert_called_once_with("wuttatest.config.extensions")
|
load_entry_points.assert_called_once_with("wutta.config.extensions")
|
||||||
foo_cls.assert_called_once_with()
|
foo_cls.assert_called_once_with()
|
||||||
foo_obj.configure.assert_called_once_with(testconfig)
|
foo_obj.configure.assert_called_once_with(testconfig)
|
||||||
foo_obj.startup.assert_called_once_with(testconfig)
|
foo_obj.startup.assert_called_once_with(testconfig)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue