Age | Commit message (Collapse) | Author |
|
Fixed missing references that weren't caught due to leftover pyc
file allowing tests to keep working when they shouldn't have.
|
|
|
|
The error bubbles through the event processing loop, breaking it and
hanging the application.
Instead, there is now a .exception(e) method on XMLStream which may
be overridden or reassigned that will receive all unhandled exceptions
(read: not XMPPError) from event and stream handlers.
|
|
|
|
|
|
ANONYMOUS was being treated as PLAIN, mechanism was being chosen
purely from supported mechanisms, not those provided by the server.
Broke nested handler methods into top-level methods.
|
|
|
|
|
|
If a stanza handler raised an exception, the exception was processed
and replied by the modified stanza, not a stanza with the original
content.
A copy is now made before handler processing, and if an exception occurs
it is the copy that processes the exception using the original content.
|
|
|
|
Caused by same issue of a JID being in the roster, but with an
incomplete entry.
|
|
|
|
If the roster contained a JID, but not any resource presence data, then
an error would occur when accessing self.roster[jid]['presence'].
|
|
|
|
|
|
For now, session_end is the same as disconnected, but once support is
added later for stream management, the two events will become distinct.
Plugins should add handlers for session_end for cleaning any session
state.
|
|
|
|
|
|
|
|
|
|
The stanza will be sent first once the send queue is reactivated
after session start.
Stanzas sent by skipping the queue will not be cached.
|
|
Conflicts:
sleekxmpp/clientxmpp.py
|
|
Backoff was only being done for the initial connection attempt
before. Now any reconnection will start with a minimum 1 sec
delay which will approximately double between attempts.
|
|
The syntax and attribute errors raised during a disconnect/reconnect
attempt are now caught and produce nicer log messages.
|
|
Use the parameter now=True to skip the queue when
sending Iq stanzas, or using xmpp.send().
|
|
|
|
Delay will approximately double between attempts (random variation).
See issue #67.
|
|
|
|
|
|
Python2.6 has issues passing a Unicode string as a keyword name.
|
|
|
|
A better method than using time.sleep is needed.
Maybe use queue.task_done to detect when event processing
has ended? Research time!
|
|
|
|
JIDs with Unicode values were being encoded by the JID class
instead of leaving them as just Unicode strings.
It may still be a good idea to use
from __future__ import unicode_literals
pretty much everywhere though.
Fixes issue #88.
|
|
|
|
|
|
stream_features
|
|
Conflicts:
sleekxmpp/clientxmpp.py
|
|
See issue #89
Using get_roster will now return the same types of values as
Iq.send. If a timeout occurs, then the event 'roster_timeout'
will be fired. A successful call to get_roster will also
raise the 'roster_received' event.
To ensure that the get_roster call was successful, here
is a pattern to follow:
def __init__(self, ...):
...
self.add_event_handler('session_start', self.session_start)
self.add_event_handler('roster_timeout', self.roster_timeout)
self.add_event_handler('roster_received', self.roster_received)
def session_start(self, e):
self.send_presence()
self.get_roster()
def roster_timeout(self, e):
# Optionally increase the timeout period
self.get_roster(timeout=self.response_timeout * 2)
def roster_received(self, iq):
# Do stuff, roster has been initialized.
...
|
|
Since the XEP-0086 plugin auto adds error code values,
it must be reliably loaded or unloaded when certain tests
are run so that stanzas may be matched. In this case, we
ensure that the plugin is used.
|
|
|
|
Use: self.send(None)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
May now use sleekxmpp.__version__ and sleekxmpp.__version_info__.
|
|
Since camelcase names are aliased to the underscored name at startup,
if the underscored version is replaced later, the camelCase name does
not reflect the change.
|