Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-mautrix for openSUSE:Factory checked in at 2023-12-28 23:01:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-mautrix (Old) and /work/SRC/openSUSE:Factory/.python-mautrix.new.28375 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-mautrix" Thu Dec 28 23:01:29 2023 rev:12 rq:1135265 version:0.20.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-mautrix/python-mautrix.changes 2023-10-22 21:02:13.818098445 +0200 +++ /work/SRC/openSUSE:Factory/.python-mautrix.new.28375/python-mautrix.changes 2023-12-28 23:03:05.810024328 +0100 @@ -1,0 +2,12 @@ +Wed Dec 27 10:38:42 UTC 2023 - Dirk Müller <dmuel...@suse.com> + +- update to update to 0.20.3: + * Deprecated MSC2716 methods and added new Beeper- + specific batch send methods, as upstream MSC2716 support has + been abandoned. + * *(util.async_db)* Added `PRAGMA synchronous = NORMAL;` to + default pragmas. + * *(types)* Fixed `guest_can_join` field name in room directory + response + +------------------------------------------------------------------- Old: ---- mautrix-python-0.20.2-gh.tar.gz New: ---- mautrix-python-0.20.3-gh.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-mautrix.spec ++++++ --- /var/tmp/diff_new_pack.4uByGS/_old 2023-12-28 23:03:06.338043627 +0100 +++ /var/tmp/diff_new_pack.4uByGS/_new 2023-12-28 23:03:06.338043627 +0100 @@ -25,7 +25,7 @@ %endif Name: python-mautrix -Version: 0.20.2 +Version: 0.20.3 Release: 0 Summary: A Python 3 asyncio Matrix framework License: MPL-2.0 ++++++ mautrix-python-0.20.2-gh.tar.gz -> mautrix-python-0.20.3-gh.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-0.20.2/CHANGELOG.md new/python-0.20.3/CHANGELOG.md --- old/python-0.20.2/CHANGELOG.md 2023-09-09 14:41:06.000000000 +0200 +++ new/python-0.20.3/CHANGELOG.md 2023-11-10 21:04:21.000000000 +0100 @@ -1,3 +1,14 @@ +## v0.20.3 (2023-11-10) + +* *(client)* Deprecated MSC2716 methods and added new Beeper-specific batch + send methods, as upstream MSC2716 support has been abandoned. +* *(util.async_db)* Added `PRAGMA synchronous = NORMAL;` to default pragmas. +* *(types)* Fixed `guest_can_join` field name in room directory response + (thanks to [@ashfame] in [#163]). + +[@ashfame]: https://github.com/ashfame +[#163]: https://github.com/mautrix/python/pull/163 + ## v0.20.2 (2023-09-09) * *(crypto)* Changed `OlmMachine.share_keys` to make the OTK count parameter diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-0.20.2/mautrix/__init__.py new/python-0.20.3/mautrix/__init__.py --- old/python-0.20.2/mautrix/__init__.py 2023-09-09 14:41:06.000000000 +0200 +++ new/python-0.20.3/mautrix/__init__.py 2023-11-10 21:04:21.000000000 +0100 @@ -1,4 +1,4 @@ -__version__ = "0.20.2" +__version__ = "0.20.3" __author__ = "Tulir Asokan <tu...@maunium.net>" __all__ = [ "api", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-0.20.2/mautrix/appservice/api/intent.py new/python-0.20.3/mautrix/appservice/api/intent.py --- old/python-0.20.2/mautrix/appservice/api/intent.py 2023-09-09 14:41:06.000000000 +0200 +++ new/python-0.20.3/mautrix/appservice/api/intent.py 2023-11-10 21:04:21.000000000 +0100 @@ -25,6 +25,7 @@ BatchSendEvent, BatchSendResponse, BatchSendStateEvent, + BeeperBatchSendResponse, ContentURI, EventContent, EventID, @@ -40,7 +41,6 @@ RoomNameStateEventContent, RoomPinnedEventsStateEventContent, RoomTopicStateEventContent, - SerializableAttrs, StateEventContent, UserID, ) @@ -161,6 +161,8 @@ user_id: The Matrix ID of the user whose intent API to get. token: The access token to use for the Matrix ID. base_url: An optional URL to use for API requests. + as_token: Whether the provided token is actually another as_token + (meaning the ``user_id`` query parameter needs to be used). Returns: The IntentAPI for the given user. @@ -187,7 +189,7 @@ Args: presence: The online status of the user. status: The status message. - ignore_cache: Whether or not to set presence even if the cache says the presence is + ignore_cache: Whether to set presence even if the cache says the presence is already set to that value. """ await self.ensure_registered() @@ -520,6 +522,9 @@ .. versionadded:: v0.12.5 + .. deprecated:: v0.20.3 + MSC2716 was abandoned by upstream and Beeper has forked the endpoint. + Args: room_id: The room ID to send the events to. prev_event_id: The anchor event. The batch will be inserted immediately after this event. @@ -554,6 +559,52 @@ ) return BatchSendResponse.deserialize(resp) + async def beeper_batch_send( + self, + room_id: RoomID, + events: Iterable[BatchSendEvent], + *, + forward: bool = False, + forward_if_no_messages: bool = False, + send_notification: bool = False, + mark_read_by: UserID | None = None, + ) -> BeeperBatchSendResponse: + """ + Send a batch of events into a room. Only for Beeper/hungryserv. + + .. versionadded:: v0.20.3 + + Args: + room_id: The room ID to send the events to. + events: The events to send. + forward: Send events to the end of the room instead of the beginning + forward_if_no_messages: Send events to the end of the room, but only if there are no + messages in the room. If there are messages, send the new messages to the beginning. + send_notification: Send a push notification for the new messages. + Only applies when sending to the end of the room. + mark_read_by: Send a read receipt from the given user ID atomically. + + Returns: + All the event IDs generated. + """ + body = { + "events": [evt.serialize() for evt in events], + } + if forward: + body["forward"] = forward + elif forward_if_no_messages: + body["forward_if_no_messages"] = forward_if_no_messages + if send_notification: + body["send_notification"] = send_notification + if mark_read_by: + body["mark_read_by"] = mark_read_by + resp = await self.api.request( + Method.POST, + Path.unstable["com.beeper.backfill"].rooms[room_id].batch_send, + content=body, + ) + return BeeperBatchSendResponse.deserialize(resp) + async def beeper_delete_room(self, room_id: RoomID) -> None: versions = await self.versions() if not versions.supports("com.beeper.room_yeeting"): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-0.20.2/mautrix/client/api/modules/misc.py new/python-0.20.3/mautrix/client/api/modules/misc.py --- old/python-0.20.2/mautrix/client/api/modules/misc.py 2023-09-09 14:41:06.000000000 +0200 +++ new/python-0.20.3/mautrix/client/api/modules/misc.py 2023-11-10 21:04:21.000000000 +0100 @@ -50,7 +50,7 @@ Args: room_id: The ID of the room in which the user is typing. - timeout: The length of time in seconds to mark this user as typing. + timeout: The length of time in milliseconds to mark this user as typing. """ if timeout > 0: content = {"typing": True, "timeout": timeout} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-0.20.2/mautrix/types/__init__.py new/python-0.20.3/mautrix/types/__init__.py --- old/python-0.20.2/mautrix/types/__init__.py 2023-09-09 14:41:06.000000000 +0200 +++ new/python-0.20.3/mautrix/types/__init__.py 2023-11-10 21:04:21.000000000 +0100 @@ -149,6 +149,7 @@ ) from .misc import ( BatchSendResponse, + BeeperBatchSendResponse, DeviceLists, DeviceOTKCount, DirectoryPaginationToken, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-0.20.2/mautrix/types/misc.py new/python-0.20.3/mautrix/types/misc.py --- old/python-0.20.2/mautrix/types/misc.py 2023-09-09 14:41:06.000000000 +0200 +++ new/python-0.20.3/mautrix/types/misc.py 2023-11-10 21:04:21.000000000 +0100 @@ -87,7 +87,7 @@ num_joined_members: int world_readable: bool - guests_can_join: bool + guest_can_join: bool name: str = None topic: str = None @@ -129,3 +129,8 @@ batch_event_id: EventID next_batch_id: BatchID base_insertion_event_id: Optional[EventID] = None + + +@dataclass +class BeeperBatchSendResponse(SerializableAttrs): + event_ids: List[EventID] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-0.20.2/mautrix/util/async_db/aiosqlite.py new/python-0.20.3/mautrix/util/async_db/aiosqlite.py --- old/python-0.20.2/mautrix/util/async_db/aiosqlite.py 2023-09-09 14:41:06.000000000 +0200 +++ new/python-0.20.3/mautrix/util/async_db/aiosqlite.py 2023-11-10 21:04:21.000000000 +0100 @@ -117,6 +117,7 @@ def _add_missing_pragmas(init_commands: list[str]) -> list[str]: has_foreign_keys = False has_journal_mode = False + has_synchronous = False has_busy_timeout = False for cmd in init_commands: if "PRAGMA" not in cmd: @@ -125,12 +126,16 @@ has_foreign_keys = True elif "journal_mode" in cmd: has_journal_mode = True + elif "synchronous" in cmd: + has_synchronous = True elif "busy_timeout" in cmd: has_busy_timeout = True if not has_foreign_keys: init_commands.append("PRAGMA foreign_keys = ON") if not has_journal_mode: init_commands.append("PRAGMA journal_mode = WAL") + if not has_synchronous and "PRAGMA journal_mode = WAL" in init_commands: + init_commands.append("PRAGMA synchronous = NORMAL") if not has_busy_timeout: init_commands.append("PRAGMA busy_timeout = 5000") return init_commands