The 0.21.0 made a breaking change in how they handle logging, moving off
logbook to the standard logging module, breaking weechat-matrix's config
module.
This patch adresses the API change (without migrating ourselves to
logboox), and bumps the matrix-nio requirements to reflect the
dependency on the new API.
Signed-off-by: Simon Chopin <simon.chopin@canonical.com>
This function is deprecated in favour of set_alpn_protocols(), which is already
called, and is currently broken in Python 3.10, so remove it altogether.
I've encountered a problem when trying to use a passphrase with spaces in `/olm import`.
The arguments were just broken by spaces. shlex has more advanced splitting which allows
taking multi-word arguments in quotes.
Calling ``matrix_upload.py --encrypt`` with a filename outside of the
current directory fails due to a typo in EncryptedUpload which uses the
basename of the file instead of the original/full path.
This indexing (i.e. __getitem__) introduced in Python 3.5 as an alias of
the group method, so using it breaks this plugin on older Python
versions. In particular, messages containing urls cannot be sent and
result in an exception:
File "matrix/colors.py", line 106, in <lambda>
lambda m: "a" * len(m[0]),
TypeError: '_sre.SRE_Match' object has no attribute '__getitem__'
This commit replaces the use of the index operation / __getitem__ with
the group method, which is equivalent but supported on all python
versions.
Add a second (optional) positional argument to specify the destination
file. If a file has been specified, just save without running the
default plumber.
Specifying a custom plumber allows to both save and run the plumber.