Age | Commit message (Collapse) | Author |
|
|
|
Scheduled tasks must have a unique name.
|
|
Allows for setting app specific socket timeouts and other socket options.
|
|
|
|
Or through an equivalent override.
|
|
|
|
|
|
|
|
|
|
reconnect until exhausted
|
|
Added logging to say that we're waiting for the server to end the stream
from its end.
|
|
|
|
|
|
|
|
example to ClientXMPP.
|
|
Packaging for Python3 just got easier.
|
|
|
|
|
|
|
|
If wait=True, then the disconnect call will block until
the send queue has emptied.
WARNING: Using wait=True when more stanzas are being added to the
queue than can be processed such that the queue is never empty
will cause the disconnect call to block indefinitely without actually
disconnecting.
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
Conflicts:
sleekxmpp/clientxmpp.py
|
|
|
|
|
|
Each interface, say foo, may be overridden in three ways:
set_foo
get_foo
del_foo
To declare an override in a plugin, add the class field
overrides as so:
overrides = ['set_foo', 'del_foo']
Each override must have a matching set_foo(), etc method
for implementing the new behaviour.
To enable the overrides for a particular parent stanza,
pass the option overrides=True to register_stanza_plugin.
register_stanza_plugin(Stanza, Plugin, overrides=True)
Example code:
class Test(ElementBase):
name = 'test'
namespace = 'testing'
interfaces = set(('foo', 'bar'))
sub_interfaces = set(('bar',))
class TestOverride(ElementBase):
name = 'test-override'
namespace = 'testing'
plugin_attrib = 'override'
interfaces = set(('foo',))
overrides = ['set_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, value):
print("overrides!")
self.parent()._set_attr('foo', 'override-%s' % value)
register_stanza_plugin(Test, TestOverride, overrides=True)
Example usage:
>>> t = TestStanza()
>>> t['foo'] = 'bar'
>>> t['foo']
'override-bar'
|
|
|
|
Required fixing a few bugs in StanzaBase related to iterable
substanzas.
|
|
Conflicts:
sleekxmpp/xmlstream/stanzabase.py
|
|
ElementBase instances will display the top-most namespace by default.
StanzaBase instances will NOT display the top-most namespace by default.
May pass True or False to __str__ to override.
|
|
|
|
|
|
Now done more responsibly, saving any existing signal handlers
and calling them when an interrupt occurs in addition to the
one Sleek installs.
NOTE: You may need to explicitly use "kill <process id>" in
order to trigger the proper signal handler execution, and
to raise the "killed" event.
|
|
Conflicts:
sleekxmpp/xmlstream/stanzabase.py
|
|
|