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
59 changed files with 1392 additions and 1011 deletions

View file

@ -40,7 +40,8 @@ dependencies = [
"omemo >= 1.0.0, < 2",
"pillow >= 6.0.0",
"progressbar2 < 3.54",
"pydantic ~= 2.4",
"pydantic ~= 2.12",
"pydantic-settings ~= 2.12",
"pygments < 3",
"pygobject ~= 3.48",
"pyopenssl ~= 24.1",
@ -48,7 +49,6 @@ dependencies = [
# currently disabled due to incompatibility, OTR feature may be removed in
# the close future
# "python-potr < 1.1",
"pyxdg < 0.30",
"pyyaml < 7.0.0",
"python-xlib ~= 0.33",
"prompt_toolkit ~= 3.0",