Skip to content

v0.4.0

Compare
Choose a tag to compare
@tylertian123 tylertian123 released this 02 Jan 03:32
· 4 commits to master since this release

Release v0.4.0

Version 0.4 introduces auto-reconnect for RyverWS real-time clients! Minor breaking changes were introduced since 0.3.2. Please see the list below for changes.

For an example on how to use the new connection features, see Realtime Quickstart or the Example Usage on the homepage on Read the Docs.

Notable Changes (Since v0.3.2.post1)

Breaking Changes

  • To allow for re-connecting, RyverWS.close() will no longer cause RyverWS.run_forever() to return. Instead, RyverWS.terminate() was introduced to make run_forever() return. (2006da9)
  • Previously deprecated @RyverWS.on_error decorator was removed. (d4e36bd)
  • The orders of arguments for some methods taking attachments and a Creator were switched for consistency so that the attachment parameter always comes first (except in send_message()). (0b5bc03)
  • GroupChatMember's as_user() method has been made async because it needs to fetch additional information. This could be considered a bugfix. (11ca311)

New Features

  • RyverWS realtime sessions can now auto-reconnect (see RyverWS.set_auto_reconnect() and Ryver.get_live_session()'s new auto_reconnect parameter). (823a35b)
  • New decorator @RyverWS.on_reconnect for defining a callback to be called when auto-reconnect succeeds. (d4e36bd)
  • All methods that deal with files (e.g. attaching to a message, a topic or a task) can now take File objects and not just Storage objects. (4739637)
  • Ryver.get_object() now supports getting a list of objects. (e5cdccb)
  • All send_ and connect functions in RyverWS now have an optional timeout parameter that defaults to 5 seconds. (2fdebe6)
  • Most classes (Creator, TaskTag, all classes inheriting from Object, all WS message classes) now use __slots__ for memory savings and faster attribute access. (4e575ab)
  • Classes inheriting from Object are now all hashable (and hash to their IDs). (4e575ab)
  • Most classes now have a __repr__() implementation. Objects with names will have their names shown in their __repr__, and some other classes such as Messages will have even more information. (ab3f9f9, 0e9639c)
  • Ryver.get_groupchat() now take additional arguments to specify whether to search teams or forums. Ryver.get_team() and Ryver.get_forum() were introduced (e1903c7).
  • Add methods GroupChat.join() and GroupChat.leave() for joining and leaving forums and teams. (d14ccca)