Age | Commit message (Collapse) | Author |
|
|
|
computing logging data that may never be used. This is a HUGE performance improvement; in some of my test runs, unnecessary string creation was accounting for > 60% of all CPU time.
Note that using % in a string will _always_ perform the sting substitutions, because the strings are constructed before the function is called. So log.debug('%s' % expensiveoperation()) will take about the same CPU time whether or not the logging level is DEBUG or INFO. if you use , no substitutions are performed unless the string is actually logged
|
|
|
|
|
|
Instead of using:
ClientXMPP(jid, password, plugin_config={
'feature_mechanisms': {'use_mech': 'SOME-MECH'}})
You can use:
ClientXMPP(jid, password, sasl_mech='SOME-MECH')
If you need to change the mechanism after instantiation, use:
xmpp['feature_mechanisms'].sasl.mech = 'SCRAM-MD5'
|
|
e.g.
self.session_timeout = 15
It is also managed by XMLStream instead of ClientXMPP now.
|
|
|
|
|
|
|
|
|
|
reconnect until exhausted
|
|
Conflicts:
setup.py
sleekxmpp/clientxmpp.py
|
|
|
|
example to ClientXMPP.
|
|
Conflicts:
setup.py
|
|
|
|
|
|
|
|
|
|
Missed a renaming of 'priority' to 'item'
|
|
instead of a weighted choice based on priorities.
|
|
Added guards to prevent renegotiating STARTTLS or SASL in cases where
servers don't behave properly.
|
|
Moved SASL registration completely to the feature plugin, instead of
keeping a portion of it in ClientXMPP.
|
|
Fixed missing references that weren't caught due to leftover pyc
file allowing tests to keep working when they shouldn't have.
|
|
|
|
|
|
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.
|
|
|
|
Roster updates are now passed through to the roster when using
self.update_roster, etc.
|
|
Provides IqTimeout and IqError which are raised when an Iq response
does not arrive in time, or it arrives with type='error'.
|
|
Conflicts:
sleekxmpp/clientxmpp.py
|
|
|
|
Use the parameter now=True to skip the queue when
sending Iq stanzas, or using xmpp.send().
|
|
|
|
|
|
|
|
Conflicts:
sleekxmpp/clientxmpp.py
|
|
Conflicts:
sleekxmpp/clientxmpp.py
tests/test_stream_roster.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.
...
|
|
Conflicts:
sleekxmpp/clientxmpp.py
|
|
|
|
|
|
Will disable the use of TLS for the session.
|
|
Conflicts:
sleekxmpp/xmlstream/stanzabase.py
|
|
Conflicts:
sleekxmpp/clientxmpp.py
|
|
This should prevent some reference cycles that will cause garbage
collection issues.
|
|
Conflicts:
sleekxmpp/basexmpp.py
|
|
Stream features now use stanza objects!
Features are given a ranking that expresses the dependency
relationships (since only one feature is negotiated at a time, the
dependency graph can be replaced by a line).
>>> xmpp.register_feature('my_feature', _my_handler,
>>> restart=True, # Requires stream restart
>>> order=600) # Ranking (out of ~ 10,000,
>>> # lower #'s executed first)
SASL mechanisms may now be added or disabled as needed. Each mechanism
is given a priority value indicating the order in which the client
wishes for mechanisms to be tried. Higher priority numbers are executed
first.
>>> xmpp.register_sasl_mechanism('SASL-MECH', _mech_handler,
>>> priority=0)
Disabling a SASL mechanism:
>>> xmpp.remove_sasl_mechanism('ANONYMOUS')
|
|
|
|
Just log that the resolution timed out, and fall back
to the hostname from the JID in this case
|