core: Replace legacy INI config system with Pydantic-based TOML configuration.

This is a huge configuration refactoring.

The configuration system now uses Pydantic settings, with better validation, better
support for environment variables and other goodies.

The main config files now use TOML instead of INI, this allow for better handling of
complex types, notably dict.

Plugins, components and frontends can declare their config settings in a class which will
be imported dynamically.
This commit is contained in:
Goffi 2025-11-30 12:27:35 +01:00
commit 6a7b7bc36a

View file

@ -23,6 +23,7 @@ from twisted.words.protocols.jabber import jid, error
from twisted.words.xish import domish
from twisted.internet import defer
from wokkel import pubsub, rsm
from libervia.backend import G
from libervia.backend.core.i18n import _
from libervia.backend.core.constants import Const as C
from libervia.backend.core import exceptions
@ -65,7 +66,7 @@ class PubsubCache:
def __init__(self, host):
log.info(_("PubSub Cache initialization"))
strategy = host.memory.config_get(None, "pubsub_cache_strategy")
strategy = G.config.common.pubsub_cache_strategy
if strategy == "no_cache":
log.info(
_(