Missing import messages now only display when verbosity is >= 2, this is to avoid
polluting the output. Dependency may be missing because user has not installed all
optional packages, the display should not show that every time.
- correct the case of `dynamicSettingsRegister` and `dynamicSettings` which are `dict`, not
classes.
- Use new `DynamicSettingsCollection` as base class for classes dynamically built during
parsing, to avoid name conflict.
- Use `DynamicSettingsCollection` instead of `dict` in dynamic field (`plugin` and
`component`). This correct inconsistency, and make linters happy.
- Catch `TOMLDecodeError` when parsing config, to show a more readable error message
instead of full backtrace.
- There is not need to use stream management with component, so we set mode to `client`
only.
- `_disconnecting_trigger` was causing an exception when disconnecting a component, it is
now disabled in this case.
New `jid`, `secret` and `autoconnect` field are used for component settings. When used,
backend will automatically create the profile and set its relevant parameters, or check
that existing profile is in sync (and update it if necessary).
This make component installation easier to Libervia, as it is not
necessary anymore to use the CLI frontend to install a component.
rel 476
After 11 years of "temporary" monkey patches, I've finally made a friendly fork of Wokkel
at https://www.goffi.org/forge/goffi/tx-xmpp with all needed PRs merged and changes from
`sat_tmp`, using the same license as Wokkel (with agreement from contributors). No more
monkey patching, and it will also stop the deprecation warning due to outdated packages
used in Wokkel. Last but not least, it should unblock the move to the latest Twisted and
Python versions.
If the backend was not closed properly, the former socket may still be present. This was
preventing the backend to start again, while now the old socket is removed in this case.
In background mode, the reactor is run later, this may cause troubles during some
initialisation. This has notably be seen for PB bridge which was not correctly listening
to the socket.
- update `miniupnpc` as latest version have proper wheels, making installation easier.
- `netifaces` is not maintained anymore, and only used optionally in one plugin
(plugin_misc_ip). It cause troubles during installation because it needs do be build.
This patch make it optional, and it will probably be removed in the future.
`dbus-python` is no longer used since the D-Bus bridge is now fully based on txdbus.
As a consequence, `pygobject` is no longer necessary for base features, but still
necessary for webRTC-based features (as we are using GStreamer). Making it optional makes
the installation far easier, as the GLib parts often cause trouble during installation
(mainly because they need local libraries).
Now that D-Bus has been fully reimplemented with txdbus, GLib is not needed anymore for
D-Bus bridge.
As `dbus` and `pb` (and future other bridges) both support "AIOBridge", we don't have to
use a Twisted specific version for anything.
The D-Bus bridge was the oldest one and using the legacy `dbus-python` implementation. In
addition to be dependent on GLib, this implementation has numerous issues and it's even
recommanded on its own documentation to use alternative.
On the other hand, txdbus is Twisted native D-Bus implementation and can be used natively
with asyncio reactor.
Regenerated bridges.
The reactor is now set in the launcher, as it is the first script to be
loaded. This should avoid race conditions when some Twisted or libervia
packages are imported and end up importing `twisted.internet.reactor`,
which installs the default reactor before the AsyncIO one. The AsyncIO
reactor is still set in `twisted.plugin.libervia_backend_plugin` (but it
no longer fails if already set), in case the backend is started as a
plugin (although this is not recommended anyway)
The loop was chosen according to the bridge used, but this is not possible anymore before
running it, because there is now an "auto" bridge which falls back from D-Bus to PB. To
work around that, the loop has been refactored to be started before knowing which bridge
is used, then the bridge-dependent hooks are installed later.
- D-Bus bridge check if it can import GLib, to raise early a BridgeInitError if it's not
possible
- PB bridge now do lazy import of `reactor` to avoid race condition in Twisted loop
initialisation.
- regenerated bridges.
`uv` is now used as the main project management tool. `hatchling` is
currently kept as the build system due to the use of its dynamic
versioning feature and to make the transition easier.
Most fields used are standardised and should work with all modern
packaging tools.
Add `uv.lock` to the repository, as versioning this file is recommended.
Repository has been converted to Git using fast-export
(https://github.com/frej/fast-export).
The following command has been used:
```sh
$ ../fast-export/hg-fast-export.sh -r ../hg-libervia-backend --hg-hash -M main
```
That means that previous HG hashes are annotated in the `hg` namespace.
`.hgignore` has been converted to `.gitignore`, and `_trial_temp/` has been removed as we
nowadays use `pytest` instead of `trial`.
While Mercurial is a great tool, more and more tools are only compatible with Git (e.g.,
ripgrep), and in particular `uv`, which becomes the new packaging de-facto standard in
Python. Also, many developers are more at ease with Git (even if Mercurial is actually
simpler to use).
Add commands to retrieve (`contacts get`) and set (`contacts set`) pubsub contacts. As
they are managed with pubsub node, deletion can be done using `pubsub delete`.
rel 475
This patch implements Pubsub Contacts (currently named "End-to-End Encrypted Contacts
Metadata" but it will be most probably renamed soon as following council discussion, e2e
encryption won't be mandatory anymore).
It adds 2 bridge method `ps_contacts_get` and `ps_contact_set`, and handles retrieving
large contacts or groups lists using RSM.
rel 475
The items events need to be decrypted too for plugin to handle correctly items updated or
retracted. When an event is decrypted, and `encrypted` attribute is added to the decrypted
<item> elements.
rel 475