summaryrefslogtreecommitdiff
path: root/slixmpp/xmlstream
AgeCommit message (Collapse)Author
2021-05-02xmlstream: do not re-send queued stanzas on each connectmathieui
each sent stanza should be purged, obviously…
2021-04-30xmlstream: fix slow tasks schedulingmathieui
- wrong attribute used - some mistakes in the slow tasks function
2021-04-22xmlstream: fix use of the waiting queuemathieui
2021-04-18stanza: rework the .append() and __eq__ methodsmathieui
This was very much broken on plugin iterables and other reasons.
2021-04-18Allow handshake in stream.send() when not connected yetmathieui
fix #3464
2021-04-12Merge branch 'tentative-fix-for-reconnect-race' into 'master'mathieui
xmlstream: do not allow stanzas outside a session See merge request poezio/slixmpp!154
2021-04-09Fix #3441: Do not assign ID to inbound stanzasmathieui
2021-04-08xmlstream: do not allow stanzas outside a sessionmathieui
except for the bind, obviously
2021-02-26xmlstream: add a wrap() method for ensure_futuremathieui
2021-02-24xmlstream: add event_async() for events that need in-order processingmathieui
Essentially stream feature handlers which can then make sure the feature has been process correctly (e.g. 0077). This is the same approach as slixmpp!4.
2021-02-20xmlstream: remove loop parameter to wait_formathieui
Deprecated in 3.8, removed in 3.10
2021-02-05global: rewrite copyright notice to use commentsmathieui
2021-02-04stanzabase: make _get_plugin part of the public APImathieui
it is the only way I know of checking if an element is present in a stanza without creating it or checking the XML manually.
2021-02-04xmlstream: make dns_answers privatemathieui
2021-02-04xmlstream: make connect_loop_wait privatemathieui
2021-02-04docs: remove python 2 bug workaround explanationsmathieui
2021-02-04docs/xmlstream: remove HTTP proxy referencesmathieui
It has been removed years ago.
2021-01-31xmlstream: add a simple contextmanager for temporary eventsmathieui
2021-01-29xmlstream: keep value of "end_session_on_disconnect"mathieui
That value should be set statically. Worst case is we fail to resume the session.
2021-01-29xmlstream: ensure slow futures are scheduled on this loopmathieui
2021-01-29xmlstream: Make the reconnect handler a coroutinemathieui
2021-01-29xmlstream: do not touch connection state on abort()mathieui
leave it to the connection_lost handler
2021-01-29xmlstream: set disconnected future on eventmathieui
2021-01-29xmlstream: end the parser when the stream has endedmathieui
2021-01-29xmlstream: rename run_filtersmathieui
2021-01-29xmlstream: change the connection logicmathieui
* use asyncio wait_for to wait for a disconnected event * abort the connection if the timeout is not enough
2021-01-29xmlstream: purge send queue and pending tasks on session endmathieui
and keep track of slow tasks
2021-01-28xmlstream: do not cancel the send filter taskmathieui
it does not make sense to cancel it, it does not do anything when the sending queue is empty, and clients should not fill the send queue when not connected anyway.
2021-01-28xmlstream: fix race conditions on handlersmathieui
2021-01-28xmlstream: handle done tasks in wait_untilmathieui
and handle other loops properly
2021-01-22Handle connection errors in start_tls (fix #3449)mathieui
2021-01-17XMLStream: Only fire "disconnected" after removal of related objectsmathieui
Otherwise we could end up reconnecting and getting some useful things like the XML parser or other stuff removed afterwards. Also, move 'session_end' before 'disconnected', it makes more sense that way.
2020-12-10docs: update docstrings for sphinx conformitymathieui
Remove most references to timeout/callback/ifrom/timeout_callbacks args
2020-12-06Merge branch 'no-ordered-stuff' into 'master'mathieui
Remove usage of OrderedDict See merge request poezio/slixmpp!77
2020-12-06Remove OrderedDict usageEmmanuel Gil Peyrot
We now support only Python 3.7+, this means we can rely on dict being ordered by order of insertion, and thus no need to use OrderedDict from collections.
2020-12-04XMLStream: Add a wait_until coroutinemathieui
It will set a disposable handler on an event and wait on it with a specific timeout. Useful for integration tests without callback hell.
2020-12-02ElementBase: serialize JID objects as strings automaticallymathieui
This is a shortcut to avoid defining custom methods each time a substanza containing a JID exists in a plugin. Same thing with attributes, there is no place where we do not want this.
2020-10-01Merge branch 'master' into 'master'Maxime Buquet
Cancel run_filters task upon disconnect See merge request poezio/slixmpp!57
2020-10-01StanzaBase.send: remove inexisting param in docstring -- thanks elghinnMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-06-12Cancel run_filters task upon disconnectehendrix23
2020-05-02Fix a regression introduced in 1.5.0mathieui
Due to the send queue, messages sent immediatly before calling "disconnect" would not be sent.
2020-04-04Fix TypeError: 'NoneType' object is not an iteratorjheling
When deleting sub-elements in a stanza.
2020-04-04Merge branch 'fix-celementtree-import' into 'master'mathieui
cElementTree has been deprecated since Python 3.3 and removed in Python 3.9. See merge request poezio/slixmpp!38
2020-04-04fire 'disconnected' callback from abort()Georg Lukas
2020-04-04expose is_connecting state based on connection attempt futureGeorg Lukas
2020-03-29Reset reconnect delay on manual reconnect, add delay eventGeorg Lukas
This is just a hotfix workaround for an underlying problem. The `_connect_routine` code is "blocking" (in an async way) for `connect_loop_wait` seconds, so that a fresh-started manual reconnect will be silenty delayed. This code does the following changes: 1. It moves the delay to before the DNS resolution (with the exponential back-off it might well be that the DNS records are changed while slixmpp is waiting). 2. It adds a new event `reconnect_delay` that gets passed the number of seconds it will delay before actually reconnecting 3. It resets the `connect_loop_wait` timer on a manual connect/reconnect call to fix the interactive experience. A *proper fix* would replace the sleep in `_connect_routine` with a properly timered re-invocation of it, but I don't understand enough of asyncio for pulling off that magic, and this is actually a proper improvement. Also I tested this and it works!
2020-03-28cElementTree has been deprecated since Python 3.3 and removed in Python 3.9.Karthikeyan Singaravelan
2020-03-23reconnect: fix callback when not currently connectedGeorg Lukas
The 'disconnected' event is normally fired from connection_lost(), which is called by the connection code when the connection is lost after being established. However, if the connection wasn't successfully established, a manual /reconnect no-ops because it waits for the 'disconnected' callback which never fires. This patch does two things: 1. Immediately fire a 'disconnected' event in disconnect() if there is no transport. 2. Register the 'disconnected' event handler in reconnect() *before* it can be fired.
2019-12-27Put the queue exception at toplevelmathieui
2019-12-27Improve the send queue code a bitmathieui