Age | Commit message (Collapse) | Author |
|
|
|
Now uses the correct namespaces and condition names.
|
|
This allows you to determine the order in which substanzas
were added in the original XML.
|
|
|
|
|
|
Use stanza.values instead of _get/set_stanza_values where used.
ElementBase stanzas can now use .tag
May use class method tag_name() for stanza classes.
ElementBase now has .clear() method.
|
|
May now use register_stanza_plugin(Foo, Bar, iterable=True)
to add to the set of stanza classes used for iterable
substanzas. It is no longer necessary to manually specify
the contents of subitem if the new method is used.
|
|
|
|
A stanza object may add is_extension = True to its class definition
to provide a single new interface to a parent stanza.
For example:
import sleekxmpp
from sleekxmpp import Iq
from sleekxmpp.xmlstream import ElementBase, register_stanza_plugin, ET
class Foo(ElementBase):
"""
Test adding just an attribute to a parent stanza.
Adding subelements works as expected.
"""
is_extension = True
interfaces = set(('foo',))
plugin_attrib = 'foo'
def setup(self, xml):
# Don't include an XML element in the parent stanza
# since we're adding just an attribute.
# If adding a regular subelement, no need to do this.
self.xml = ET.Element('')
def set_foo(self, val):
self.parent()._set_attr('foo', val)
def get_foo(self):
return self.parent()._get_attr('foo')
def del_foo(self):
self.parent()._del_attr('foo')
register_stanza_plugin(Iq, Foo)
i1 = Iq()
i2 = Iq(xml=ET.fromstring("<iq xmlns='jabber:client' foo='bar' />"))
>>> i1['foo'] = '3'
>>> i1
'3'
>>> i1
'<iq id="0" foo="3" />'
>>> i2
'<iq id="0" foo="bar" />'
>>> i2['foo']
'bar'
>>> del i2['foo']
>>> i2
'<iq id="0" />'
|
|
|
|
|
|
Just log that the resolution timed out, and fall back
to the hostname from the JID in this case
|
|
If no JID is specified for the item, use xmpp.boundjid.full.
|
|
|
|
None values were not being treated properly.
|
|
Note that the stream may automatically attempt to
reconnect when a stream error is received.
|
|
Will be most useful for debugging and responding to failed
connection attempts.
|
|
|
|
|
|
Fixes the intermittent DEBUG ((),) messages that give no
explanation.
Will now show as:
DEBUG Scheduled event: ((), )
|
|
|
|
|
|
|
|
If iq['query'] was set before a plugin that used the query
element was set, then the query element was duplicated.
|
|
|
|
|
|
|
|
Doesn't send these information by default, only if provided in the
config dict (as the 'os' key)
|
|
|
|
Contributed by Erik Reuterborg Larsson (who).
|
|
|
|
Two JIDs match if they have the same full JID value.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
See http://pypi.python.org/pypi/ordereddict and
http://code.activestate.com/recipes/576693/.
|
|
|
|
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
|
|
|
|
Daemonized threads exit once the main program has quit,
and the only threads left running are all daemon threads.
Should fix hanging clients while not trampling over anyone
else's signal handlers.
|
|
|
|
Methods now accept either an ifrom or mfrom parameter
to specify a 'from' value. Client connections should not
need to use these, but component connections must use them.
|
|
Originally provided by Brian Beggs (macdiesel)
and Thom Nichols (tomstrummer).
|
|
Originally contributed by damium/romeira, with some
modifications.
Also, converted tabs to spaces to prepare for future cleanup.
|
|
Originally contributed by skinkie, with a few modifications.
|