summaryrefslogtreecommitdiff
path: root/sleekxmpp/stanza/rootstanza.py
AgeCommit message (Collapse)Author
2011-11-19This 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-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-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-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.
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-11-06Logging no longer uses root logger.Lance Stout
Each module should now log into its own logger.
2010-10-17Underscore names by default.Lance Stout
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.
2010-07-29Fixed some PEP8 errors in RootStanza (trailing whitespace and line length)Lance Stout
2010-07-28Updated RootStanza to use registerStanzaPlugin, and be PEP8 compliant.Lance Stout
2010-07-26Replaced traceback calls to use logging.exception where applicable.Lance Stout
2010-07-20Updated license notices to use the correct MIT format. Also corrected ↵Lance Stout
references to nonexistant license.txt to LICENSE.
2010-04-22bugfixes and continuing to work on pubsub testsNathan Fritz
2010-03-26changed license to MITsleek-0.9RC10.9RC1Nathan Fritz
2010-01-05* major stanza improvementsNathan Fritz
* raise XMPPError in handler to reply with error stanza * started work on pubsub stanzas