summaryrefslogtreecommitdiff
path: root/sleekxmpp
AgeCommit message (Collapse)Author
2011-07-03Merge branch 'develop' into exceptionsLance Stout
2011-07-03Added XEP-0066: Out-of-Band DataLance Stout
2011-07-01So using sys.excepthook to catch errors only works once.Lance Stout
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.
2011-06-20Merge branch 'develop' into exceptionsLance Stout
2011-06-20Fix stanza clobbering when replying to errors.sleek-1.0.0-beta5sleek-1.0-Beta51.0.0-beta51.0-Beta5Lance Stout
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.
2011-06-15Merge branch 'develop' into exceptionsLance Stout
2011-06-15Fix another roster issue.Lance Stout
Caused by same issue of a JID being in the roster, but with an incomplete entry.
2011-06-14Merge branch 'develop' into exceptionsLance Stout
2011-06-14Fix issue with components and roster.Lance Stout
If the roster contained a JID, but not any resource presence data, then an error would occur when accessing self.roster[jid]['presence'].
2011-06-10Merge branch 'develop' into exceptionsLance Stout
2011-06-10old xep_0050 plugin is now loadableNathan Fritz
2011-06-08Added session_end event and some docs.Lance Stout
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.
2011-06-08Merge branch 'develop' into exceptionsLance Stout
2011-06-08Fix XEP-0050 issue with Unicode string type checking.Lance Stout
2011-06-08Send component handshake immediately.Lance Stout
2011-06-01IqTimeout now references the original sent stanza.Lance Stout
A little extra bit of docs for IqError.
2011-06-01Begin experimental use of exceptions.Lance Stout
Provides IqTimeout and IqError which are raised when an Iq response does not arrive in time, or it arrives with type='error'.
2011-06-01Cache stanza if sending fails.Lance Stout
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.
2011-05-31Apply connection backoff to reconnect attempts.Lance Stout
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.
2011-05-31Cleanup logging and exception handling.Lance Stout
The syntax and attribute errors raised during a disconnect/reconnect attempt are now caught and produce nicer log messages.
2011-05-27Don't use the send queue for stream initialization.Lance Stout
Use the parameter now=True to skip the queue when sending Iq stanzas, or using xmpp.send().
2011-05-27Fix typo for SSL certificate use.Lance Stout
2011-05-27Add exponential backoff to connection attempts.Lance Stout
Delay will approximately double between attempts (random variation). See issue #67.
2011-05-27Added support for testind disconnect errors.Lance Stout
2011-05-20Fix double roster entry issue with Unicode.Lance Stout
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.
2011-05-20Handle callback return value case.Lance Stout
2011-05-20Resolve timeout errors for get_roster.Lance Stout
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. ...
2011-04-26Add support for testing that no stanzas are sent in tests.Lance Stout
Use: self.send(None)
2011-04-14Pubsub/Unsubscribe was not getting registeredNathan Fritz
2011-04-11Mark scheduler thread as a daemon.Lance Stout
2011-04-08Add version info.Lance Stout
May now use sleekxmpp.__version__ and sleekxmpp.__version_info__.
2011-04-08Use underscore method name.Lance Stout
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.
2011-03-24Added new implementation for XEP-0086.Lance Stout
2011-03-24Allow a stanza plugin to override a parent's interfaces.Lance Stout
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'
2011-03-24Added new XEP-0050 implementation.Lance Stout
Backward incompatibility alert! Please see examples/adhoc_provider.py for how to use the new plugin implementation, or the test examples in the files tests/test_stream_xep_0050.py and tests/test_stanza_xep_0050.py. Major changes: - May now have zero-step commands. Useful if a command is intended to be a dynamic status report that doesn't require any user input. - May use payloads other than data forms, such as a completely custom stanza type. - May include multiple payload items, such as multiple data forms, or a form and a custom stanza type. - Includes a command user API for calling adhoc commands on remote agents and managing the workflow. - Added support for note elements. Todo: - Add prev action support. You may use register_plugin('old_0050') to continue using the previous XEP-0050 implementation.
2011-03-23Allow SleekTest to wait longer when checking for sent stanzas.Lance Stout
Now timeouts at 0.5sec instead of 0.1sec, which should prevent test failures from stanzas being delayed longer than usual.
2011-03-23Fix typo.Lance Stout
2011-03-23Cleaned XEP-0249 plugin, added tests.Lance Stout
2011-03-22Updated XEP-0128 plugin to work with the new XEP-0030 plugin.Lance Stout
Required fixing a few bugs in StanzaBase related to iterable substanzas.
2011-03-22Updated doc for connect()Lance Stout
2011-03-22May pass use_tls=False to connect().Lance Stout
Will disable the use of TLS for the session.
2011-03-18Change namespace inclusion in strings.Lance Stout
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.
2011-03-18Fix error in stanza handler registration in XEP-0092.Lance Stout
2011-03-18Merge branch 'develop' of github.com:fritzy/SleekXMPP into developLance Stout
2011-03-18Fix self.disconnect(reconnect=True) not working.Lance Stout
2011-03-16Avoid infinite loop on version resultFlorent Le Coz
We need to check if type="get". otherwise we will send our version when we will receive the version of the remote entity, and thus going in an infinite loop.
2011-02-24Remove the occasional warning about XEP-0059 not loaded.Lance Stout
2011-02-24Add tests for XEP-0085, fix some bugs.Lance Stout
2011-02-24Updated the XEP-0085 plugin.Lance Stout
Can now be used as so: >>> msg['chat_state'] '' >>> msg <message /> >>> msg['chat_state'] = 'paused' >>> msg <message> <paused xmlns="http://jabber.org/protocol/chatstates" /> </message> >>> msg['chat_state'] 'paused' >>> del msg['chat_state'] >>> msg <message />
2011-02-23Bring back the signal handlers (and the "killed" event).Lance Stout
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.