summaryrefslogtreecommitdiff
path: root/sleekxmpp/stanza
AgeCommit message (Collapse)Author
2012-02-18Use JID objects when dealing with roster items.Lance Stout
2012-01-12Update Roster stanza to use RosterItem substanzas.Lance Stout
get_roster() now returns the Iq result stanza instead of True (stanzas also evaluate to True).
2011-12-30Merge pull request #130 from rhcarvalho/masterLance Stout
Some small fixes
2011-12-30Fix docstring of a method of Message stanzas.Rodolfo Carvalho
2011-11-20This change stops sleekxmpp from spending huge amounts of time unnecessarily ↵Vijay Pandurangan
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
2011-08-31Added pubsub error stanza.Lance Stout
iq['error']['pubsub']['condition'] iq['error']['pubsub']['unsupported']
2011-08-19Make Iq exceptions more discoverable and simpler to use.Lance Stout
IqError and IqTimeout now extend XMPPError, so if you don't care about the difference, you can use: try: self.do_something_with_iqs() except XMPPError: # Error? Timeout? I don't care! pass If you do need to distinguish between timeouts and error replies, you can still continue to use: try: self.do_somethin_with_iqs() except IqError as err: pass except IqTimeout: pass If you don't catch any Iq errors and you're processing a stanza then an error response will be sent, just like normal if you raise XMPPError or any other exception, except that the error messages will be generic to prevent leaking too much information.
2011-08-12Merge branch 'develop' into rosterLance Stout
Conflicts: setup.py sleekxmpp/clientxmpp.py
2011-08-12Merge branch 'develop' of github.com:fritzy/SleekXMPP into developNathan Fritz
2011-08-12Merge branch 'exceptions' into developNathan Fritz
2011-08-06Fix XEP-0078 using the new stream feature workflow.Lance Stout
Honestly, this is mainly just a demo/proof of concept that we can handle dependencies and ordering issues with stream features. DON'T use XEP-0078 if you are able to use the normal SASL method, which should be the case unless you are dealing with a very old XMPP server implementation.
2011-08-04Merge branch 'develop' into rosterLance Stout
Conflicts: setup.py
2011-07-03Merge branch 'develop' into exceptionsLance Stout
2011-07-02Fix ordering bug when retrieving an error condition.Lance Stout
2011-07-02Simplify SASL mech registration.Lance Stout
Moved SASL registration completely to the feature plugin, instead of keeping a portion of it in ClientXMPP.
2011-07-01Merge branch 'develop' into stream_featuresLance Stout
2011-07-01Merge branch 'develop' into rosterLance 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-07-01Continued reorganization and streamlining.Lance Stout
2011-06-28Reorganized stream level stanzas.Lance Stout
2011-06-20Merge branch 'develop' into stream_featuresLance Stout
2011-06-20Merge branch 'develop' into exceptionsLance Stout
2011-06-20Merge branch 'develop' into rosterLance 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-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-05-31Merge branch 'develop' into stream_featuresLance Stout
Conflicts: sleekxmpp/clientxmpp.py
2011-05-31Merge branch 'develop' into rosterLance Stout
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-20Merge branch 'develop' into stream_featuresLance Stout
Conflicts: sleekxmpp/clientxmpp.py
2011-04-08Merge branch 'develop' into rosterLance Stout
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-18Fix error with session feature.Lance Stout
2011-02-14Merge branch 'develop' into stream_featuresLance Stout
Conflicts: sleekxmpp/xmlstream/stanzabase.py
2011-02-14Merge branch 'develop' into rosterLance Stout
Conflicts: sleekxmpp/clientxmpp.py
2011-02-14Remap old method names in a better way.Lance Stout
This should prevent some reference cycles that will cause garbage collection issues.
2011-02-13Return the name of the registered callback.Lance Stout
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").
2011-02-12Return the registered callback when using iq.send(callback=foo).Lance Stout
Allows for a callback to be canceled by unregistering the returned handler.
2011-02-11XMPPError exceptions can keep a stanza's contents.Lance Stout
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.
2011-02-02Merge branch 'develop' into rosterLance Stout
Conflicts: sleekxmpp/basexmpp.py
2011-01-28First pass at re-worked stream features.Lance Stout
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')
2011-01-27Make StreamError work properly.Lance Stout
Now uses the correct namespaces and condition names.
2011-01-19Fix namespace for Nick stanza.Lance Stout
2011-01-16Add StreamError stanza and a stream_error event.Lance Stout
Note that the stream may automatically attempt to reconnect when a stream error is received.
2011-01-13Merge branch 'develop' into rosterLance Stout
2011-01-12Fix ordering error in Iq._set_stanza_values.Lance Stout
If iq['query'] was set before a plugin that used the query element was set, then the query element was duplicated.
2010-12-21Merge branch 'develop' into rosterLance Stout
2010-12-17Make tests pass for catching exceptions.Lance Stout
May now use sys.excepthook to catch exceptions from threaded handlers.
2010-12-17RootStanza raises unexpected exceptionsFlorent Le Coz
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
2010-12-13Merge branch 'develop' into rosterLance Stout
Conflicts: sleekxmpp/basexmpp.py