Age | Commit message (Collapse) | Author |
|
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
|
|
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.
|
|
|
|
Conflicts:
sleekxmpp/xmlstream/stanzabase.py
|
|
This should prevent some reference cycles that will cause garbage
collection issues.
|
|
Instead of the actual callback object, return just the name of
the callback object created when using iq.send(callback=..).
This will help prevent memory leaks by not keeping an additional
reference to the object, but still allows for the callback to be
canceled by using self.remove_handler("handler_name").
|
|
Allows for a callback to be canceled by unregistering the
returned handler.
|
|
This allows exceptions to include the original
content of a stanza in the error response by including
the parameter clear=False when raising the exception.
|
|
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')
|
|
Now uses the correct namespaces and condition names.
|
|
|
|
Note that the stream may automatically attempt to
reconnect when a stream error is received.
|
|
If iq['query'] was set before a plugin that used the query
element was set, then the query element was duplicated.
|
|
May now use sys.excepthook to catch exceptions
from threaded handlers.
|
|
We now raise the unexpected exceptions instead of sending
them on the network.
- avoids flood (sending a traceback on a MUC, for example…) and
maybe some security issues.
- lets you handle the traceback (catch it to handle
it properly, or with except_hook, etc)
- an exception cannot be raised without you knowing
|
|
|
|
The callback will be a stream level handler, and will not
execute in its own thread. If you must have a thread, have the
callback function raise a custom event, which can be processed
by another event handler, which may run in an individual thread,
like so:
def handle_reply(self, iq):
self.event('custom_event', iq)
def do_long_operation_in_thread(self, iq):
...
self.add_event_handler('custom_event', self.do_long_operation_in_thread)
...take out already prepared iq stanza...
iq.send(callback=self.handle_reply)
|
|
|
|
Each module should now log into its own logger.
|
|
events
|
|
Stanza objects now accept the use of underscored names.
The CamelCase versions are still available for backwards compatibility,
but are discouraged.
The property stanza.values now maps to the old getStanzaValues and
setStanzaValues, in addition to _set_stanza_values and
_get_stanza_values.
|
|
|
|
The priority is not a number: we consider it 0 as a default
|
|
There was a bug in the XML compare method.
|
|
Cleaned up the atom entry stanza.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
references to nonexistant license.txt to LICENSE.
|
|
updated accordingly.
|
|
registerStanzaPlugin function.
Updated plugins and tests to use new function.
|
|
The Roster stanza object builds item elements manually, and did not handle the
case where the name attribute is set to None, which would crash SleekXMPP.
|
|
|
|
|
|
|
|
For example:
iq.reply().error().setPayload(something.xml).send()
|
|
|
|
|
|
|