.. _changelog: Changelog ######### .. _api-changelog-0.13: Version 0.13 ============ New XEP implementations ----------------------- * Support for the :xep:`0359` (Unique and Stable Stanza IDs) schema in :mod:`aioxmpp.misc`. New examples ------------ * `muc_moderate_message.py` to remove a message (using a makeshift implementation of :xep:`0425`) from a MUC. * `get_muc_affiliations.py` to query affiliated JIDs from a given MUC. * `get_external_services.py` to query external services exposed via :xep:`215`. This is useful in the context of testing STUN/TURN configuration. * `ping.py`, to send :xep:`199` to one or more remote JIDs. * `roster_watch.py`: Stay connected and watch for roster changes. * `set_muc_avatar.py`: Set the avatar of a MUC. New major features ------------------ Breaking changes ---------------- * *Potentially breaking change*: :meth:`aioxmpp.muc.Room.on_presence_changed` now emits for *all* normal (non-unavailable, non-roster-management) presence stanzas received from an occupant. Previously, the signal would only emit for cases where the presence show or the status text had changed. This, however, made it impossible for user code to stay up-to-date with the contents of custom extensions transmitted via presence stanzas. This was reported on `GitHub as issue #341 `_ by `@raj2569 `_. * The dependencies and compatibility has been improved, potentially breaking some setups. aioxmpp now supports Python 3.10 and is better prepared for Python 3.11, has bumped some of its dependencies and requires a more modern version of Sphinx to build the docs. This is probably the last release to support Python 3.5. Minor features and bug fixes ---------------------------- * :meth:`aioxmpp.muc.Service.get_affiliated` added to query affiliations of a MUC. * :meth:`aioxmpp.vcard.Service.set_vcard` now supports an optional `jid` argument to set vCards of foreign entities (e.g. to set a MUC avatar). .. _api-changelog-0.12: Version 0.12 ============ * Drop support for Python 3.4. This includes migrating to using ``async def`` instead of ``@asyncio.coroutine`` consistently. Future changes will include using type annotations. * Add ``--e2etest-only`` flag to the e2etest nose plugin. This flag will skip any test case not derived from :class:`aioxmpp.e2etest.TestCase`. The use case for this is to use the aioxmpp test suite to test other servers in their CI. * :class:`aioxmpp.e2etest.provision.StaticPasswordProvisioner` * Fix :func:`aioxmpp.jid_escape` double escaping sequences in some circumstances. * Support for Python 3.9. * Make the stream header customizable for users of :class:`aioxmpp.protocol.XMLStream`. Version 0.12.1 -------------- * Fix leaking :class:`asyncio.Future` instances from internal functions in :mod:`aioxmpp.protocol`, causing annoying (but harmless) error log messages from asyncio. `Issue #358 `_ reported by `@pszafer `_, thanks. * Allow keyword arguments being passed to ``AUTO_FUTURE`` callback listeners. This is to support use cases where callbacks are extended with keyword arguments in subclasses, as extensively used in :mod:`aioxmpp.im`. `Issue #360 `_ reported by `@zak333 `_, thanks. Version 0.12.2 -------------- * Fix incorrect use of :meth:`aioxmpp.muc.service.Room.on_exit` in :meth:`aioxmpp.muc.service.Room.leave` which causes the future to not work correctly. Again reported by `@zak333 `_, thanks. .. _api-changelog-0.11: Version 0.11 ============ New XEP implementations ----------------------- * Support for the :xep:`27` (Current Jabber OpenPGP Usage) schema in :mod:`aioxmpp.misc`. * :xep:`47` (In-Band Bytestreams), see :mod:`aioxmpp.ibb`. * The :xep:`106` (JID Escaping) encoding can now be used via :func:`aioxmpp.jid_escape`, :func:`aioxmpp.jid_unescape`. * `@LukeMarlin `_ contributed support for the :xep:`308` schema in :mod:`aioxmpp.misc`. * The :xep:`335` (JSON Containers) schema is available for use via :class:`aioxmpp.misc.JSONContainer`. * Implement support for :xep:`410` (MUC Self-Ping (Schrödinger’s Chat)). This introduces two new signals to :class:`aioxmpp.muc.Room` objects: - :meth:`~aioxmpp.muc.Room.on_muc_stale`: Emits when a possible connectivity issue with the MUC is detected, but it is unclear whether the user is still joined or not and/or whether messages are being lost. - :meth:`~aioxmpp.muc.Room.on_muc_fresh`: Emits when a possible connectivity issue with the MUC is detected as resolved and the user is still joined. Presence may be out-of-sync and messages may have been lost, however. If a connectivity issue which has caused the user to be removed from the MUC is detected, the appropriate signals (with :attr:`aioxmpp.muc.LeaveMode.DISCONNECTED`) are emitted, *or* the room is automatically re-joined if it is set to :attr:`~aioxmpp.muc.Room.muc_autorejoin` (no history is requested on this rejoin). In addition to that, the :meth:`aioxmpp.MUCClient.cycle` method has been introduced. It allows an application to leave and join a MUC in quick succession using without discarding the :class:`aioxmpp.muc.Room` object (just like a stream disconnect would). This is useful to deal with stale situations by forcing a resync. Security Fixes -------------- * CVE-2019-1000007: Fix incorrect error handling in :mod:`aioxmpp.xso` when a suppressing :meth:`aioxmpp.xso.XSO.xso_error_handler` is in use. Under certain circumstances, it is possible that the handling of suppressed error causes another error later on because the parsing stack mis-counts the depth in which it is inside the XML tree. This makes elements appear in the wrong place, typically leading to further errors. In the worst case, using a suppressing :meth:`~aioxmpp.xso.XSO.xso_error_handler` in specific circumstances can be vulnerable to denial of service and data injection into the XML stream. (The fix was also backported to 0.10.3.) New major features ------------------ * The :mod:`aioxmpp.pubsub` implementation gained support for node configuration and the related publish-options. This is vital for proper operation of private storage in PEP. Relevant additions are: * :meth:`aioxmpp.PubSubClient.get_node_config` * :meth:`aioxmpp.PubSubClient.set_node_config` * :class:`aioxmpp.pubsub.NodeConfigForm` * The new ``publish_options`` argument to :meth:`aioxmpp.PubSubClient.publish` * The new ``access_model`` argument to :meth:`aioxmpp.PEPClient.publish` * The new :meth:`aioxmpp.Client.on_stream_resumed` event allows services and application code to learn when the stream was resumed after it suspended due to loss of connectivity. This is the counterpart to :meth:`aioxmpp.Client.on_stream_suspended`. This allows services and application code to defer actions until the stream is alive again. While this is generally not necessary, it can be good to delay periodic tasks or bulk operations in order to not overload the newly established stream with queued messages. New examples ------------ Breaking changes ---------------- * The undocumented and unused descriptors :attr:`aioxmpp.Message.ext` and :attr:`aioxmpp.Presence.ext` were removed. If your code relies on them you can instead patch a descriptor to the class (with a prefix that uniquely identifies your extension). A good example is how aioxmpp itself makes use of that feature in :mod:`aioxmpp.misc`. * :mod:`aioxmpp.stringprep` now uses the Unicode database in version 3.2.0 as specified in :rfc:`3454`. * The way the topological sort of service dependencies is handled was simplified: We no longer keep a toposort of all service classes. *This implies that :class:`Service` subclasses are no longer ordered objects.* However, we still guarantee a runtime error when a dependency loop is declared—if a class uses only one of `ORDER_BEFORE` respective `ORDER_AFTER` it cannot introduce a dependency loop; only when a class uses both we have to do an exhaustive search of the dependent nodes. This search touches only a few nodes instead of the whole graph and is only triggered for very few service classes. Summon has been creating an independent toposort of only the required classes anyway, so we use this for deriving ordering indices for filter chains from now on—this also allows simpler extension, modification of the filter order (e.g. ``-index`` orders in reverse). Methods for determining transitive dependency (and independency) have been added to the service classes: * :meth:`aioxmpp.Service.orders_after`, * :meth:`aioxmpp.Service.orders_after_any`, * :meth:`aioxmpp.Service.independent_from`. These search the class graph and are therefore not efficient (and the results may change when new classes are defined). Tests should always prefer to test the declared attributes when checking for correct dependencies. * :func:`aioxmpp.make_security_layer` now binds the default for the ssl context factory early to :func:`aioxmpp.security_layer.default_ssl_context`. This means that you can not monkey-patch :func:`aioxmpp.security_layer.default_ssl_context` and have your changes apply to all security layers anymore. Since this behaviour was never documented or intended, there is no transition period for this. * :meth:`aioxmpp.xso.XSO.unparse_to_sax` was renamed to :meth:`~aioxmpp.xso.XSO.xso_serialise_to_sax`. Minor features and bug fixes ---------------------------- * Support for servers which send a :xep:`198` Stream Management counter in resumption errors. This allows us to know precisely which stanzas were (not) received by the server and thus improves accuracy of the stanza token state. Stanzas which are acknowledged in this way by a server enter the :attr:`~aioxmpp.stream.StanzaState.ACKED` state as normal. Stanzas which are not covered by the counter enter :attr:`~aioxmpp.stream.StanzaState.DISCONNECTED` state instead of :attr:`~aioxmpp.stream.StanzaState.SENT_WITHOUT_SM`, since the stream knows for sure that the stanza has not been received by the server. This only works if the server provides a counter value on failure; if the counter value is not provided, sent stanzas which were not acked during the previous connection will enter :attr:`~aioxmpp.stream.StanzaState.SENT_WITHOUT_SM` state as previously. * :mod:`aioxmpp.forms` will not complain anymore if multiple ``