Releases: mautrix/python
Releases · mautrix/python
v0.15.1
v0.15.0
- Breaking change Removed Python 3.7 support.
- Breaking change (api) Removed
r0
from default path builders in order to update tov3
and per-endpoint versioning.- The client API modules have been updated to specify v3 in the paths, other direct usage of
Path
,ClientPath
andMediaPath
will have to be updated manually.UnstableClientPath
no longer exists and should be replaced withPath.unstable
. - There's a temporary hacky backwards-compatibility layer which replaces /v3 with /r0 if the server doesn't advertise support for Matrix v1.1 or higher. It can be activated by calling the
.versions()
method inClientAPI
. The bridge module calls that method automatically.
- The client API modules have been updated to specify v3 in the paths, other direct usage of
- Breaking change (util.formatter) Removed lxml-based HTML parser.
- The parsed data format is still compatible with lxml, so it is possible to use lxml with
MatrixParser
by settinglxml.html.fromstring
as theread_html
method.
- The parsed data format is still compatible with lxml, so it is possible to use lxml with
- Breaking change (crypto) Moved
TrustState
,DeviceIdentity
,OlmEventKeys
andDecryptedOlmEvent
dataclasses fromcrypto.types
intotypes.crypto
. - Breaking change (bridge) Made
User.get_puppet
abstract and added new abstractUser.get_portal_with
andPortal.get_dm_puppet
methods. - Added a redundant
__all__
to various__init__.py
files to appease pyright. - (api) Reduced aiohttp memory usage when uploading large files by making an in-memory async iterable instead of passing the bytes directly.
- (bridge) Removed legacy community utilities.
- (bridge) Added support for creating DM portals with minimal bridge-specific code.
- (util.async_db) Fixed counting number of db upgrades.
- (util.async_db) Added support for schema migrations that jump versions.
- (util.async_db) Added system for preventing using the same database for multiple programs.
- To enable it, provide an unique program name as the
owner_name
parameter inDatabase.create
. - Additionally, if
ignore_foreign_tables
is set toTrue
, it will check for tables of some known software like Synapse and Dendrite. - The
bridge
module enables both options by default.
- To enable it, provide an unique program name as the
- (util.db) Module deprecated. The async_db module is recommended. However, the SQLAlchemy helpers will remain until maubot has switched to asyncpg.
- (util.magic) Allowed
bytearray
as an input type for themimetype
method. - (crypto.attachments) Added method to encrypt a
bytearray
in-place to avoid unnecessarily duplicating data in memory.
v0.14.10
v0.14.9
v0.14.8
- (util.formatter) Deprecated the lxml-based HTML parser and made the htmlparser-based parser the default. The lxml-based parser will be removed in v0.15.
- (client.api) Fixed
filter_json
parameter inget_messages
not being sent to the server correctly. - (bridge) Added utilities for implementing disappearing messages.
v0.14.7
- (client) Fixed error inviting users with custom member event content if the server had disabled fetching profiles.
- (util.utf16_surrogate) Added utilities for adding/removing unicode surrogate pairs in strings.
- (util.magic) Added check to make sure the parameter to
mimetype()
is eitherbytes
orstr
.
v0.14.6
- Breaking change (util.message_send_checkpoint) Changed order of
send
parameters to matchBridgeState.send
(this is not used by most software, which is why the breaking change is in a patch release). - (util.async_db) Changed the default size of the aiosqlite thread pool to 1, as it doesn't reliably work with higher values.
- (util.async_db) Added logging for database queries that take a long time (>1 second).
- (client) Added logging for sync requests that take a long time (>40 seconds, with the timeout being 30 seconds).
- (util.variation_selector) Fixed variation selectors being incorrectly added even if the emoji had a skin tone selector.
- (bridge) Fixed the process getting stuck if a config error caused the bridge to stop itself without stopping the SQLite thread.
- Added pre-commit hooks to run black, isort and some other checks.
v0.14.5
- (util.formatter) Removed the default handler for room pill conversion.
- This means they'll be formatted as normal links unless the bridge or other thing using the formatter overrides
room_pill_to_fstring
.
- This means they'll be formatted as normal links unless the bridge or other thing using the formatter overrides
- (types) Fixed the
event_id
property ofMatrixURI
s throwing an error (instead of returningNone
) when the parsed link didn't contain a second part with an event ID.
v0.14.4
- Bumped minimum yarl version to 1.5. v1.4 and below didn't allow
URL.build()
with a scheme but no host, which is used in thematrix:
URI generator that was added in v0.14.3. - (appservice) Removed support for adding a
group_id
to user namespaces in registration files. - (types) Updated
Serializable.parse_json
type hint to allowbytes
in addition tostr
(becausejson.loads
allows both). - (bridge) Added
retry_num
parameter toUser.send_remote_checkpoint
.
v0.14.3
- (types) Added
MatrixURI
type to parse and buildmatrix:
URIs andhttps://matrix.to
URLs. - (util.formatter)
matrix:
URIs are now supported in incoming messages (using the new parser mentioned above). - (util.variation_selector) Switched to generating list of emoji using data directly from the Unicode spec instead of emojibase.
- (util.formatter) Whitespace in non-
pre
elements is now compressed into a single space. Newlines are also replaced with a space instead of removed completely. Whitespace after a block element is removed completely. - (util.ffmpeg) Added option to override output path, which allows outputting to stdout (by specifying
-
). - (util.config) Changed
ConfigUpdateHelper.copy
to ignore comments if the entity being copied is a commentable yaml object (e.g. map or list).