summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/xmlstream.py
AgeCommit message (Collapse)Author
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-13Simplification when removing a deletable handler.Lance Stout
2011-01-27Recognize stanzas that don't use the default namespace.Lance Stout
2011-01-16Raise the event 'socket_error' when a socket error occurs.Lance Stout
Will be most useful for debugging and responding to failed connection attempts.
2011-01-14Add a note for debug statement when running scheduled events.Lance Stout
Fixes the intermittent DEBUG ((),) messages that give no explanation. Will now show as: DEBUG Scheduled event: ((), )
2010-12-17Make tests pass for catching exceptions.Lance Stout
May now use sys.excepthook to catch exceptions from threaded handlers.
2010-12-16Use daemon threads instead of signals.Lance Stout
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.
2010-12-16Added support for using SSL CA certificates.Lance Stout
Originally provided by Brian Beggs (macdiesel) and Thom Nichols (tomstrummer).
2010-12-07Add support for using xml:lang values.Lance Stout
Support is only for adding literal XML content to stanzas. Full support for things like multiple message bodies with different xml:lang values is still in the works.
2010-11-17Fix RESPONSE_TIMEOUT dependency loops.Lance Stout
2010-11-06Logging no longer uses root logger.Lance Stout
Each module should now log into its own logger.
2010-11-05Simplified SleekTest.Lance Stout
* check_stanza does not require stanza_class parameter. Introspection! * check_message, check_iq, and check_presence removed -- use check instead. * stream_send_stanza, stream_send_message, stream_send_iq, and stream_send_presence removed -- use send instead. * Use recv instead of recv_message, recv_presence, etc. * check_jid instead of check_JID * stream_start may accept multi=True to return a new SleekTest instance for testing multiple streams at once.
2010-11-04Fix bug introduced while fixing another bug.Lance Stout
Threaded event handlers now handle exceptions again.
2010-11-04fixed indent errorsNathan Fritz
2010-11-03Merge branch 'develop' of github.com:fritzy/SleekXMPP into developLance Stout
2010-11-03Catch exceptions for direct events.Lance Stout
Events triggered with direct=True will have exceptions caught. Note that all event handlers in a direct event will currently run in the same thread.
2010-10-31Fix bug in XEP-0030 plugin.Lance Stout
xep_0030 still referenced event_handlers. Added the method event_handled which will return the number of registered handlers for an event to resolve the issue.
2010-10-28Added try/except for setting signal handlers.Lance Stout
Setting signal handlers from inside a thread is not supported in Python, but some applications need to run Sleek from a child thread. SleekXMPP applications that run inside a child thread will NOT be able to detect SIGHUP or SIGTERM events. Those must be caught and managed by the main program.
2010-10-27SSL and signal fixes.Lance Stout
Made setting the SIG* handlers conditional on if the signal defined for the OS. Added the attribute ssl_version to XMLStream to set the version of SSL used during connection. It defaults to ssl.PROTOCOL_TLSv1, but OpenFire tends to require ssl.PROTOCOL_SSLv23.
2010-10-25Made exceptions work.sleek-1.0-Beta21.0-Beta2Lance Stout
Raising an XMPPError exception from an event handler now works, even if from a threaded handler. Added stream tests to verify. We should start using XMPPError, it really makes things simple!
2010-10-20misc small tweakssleek-1.0-Beta11.0-Beta1Nathan Fritz
2010-10-20reconnect if session isn't established within 15 secondsNathan Fritz
2010-10-20capture SIGHUP and SIGTERM (windows) and disconnect; also testall no longer ↵Nathan Fritz
loads string26 with python3
2010-10-20fixed disconnectNathan Fritz
2010-10-18Continue converting to underscored names.Lance Stout
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-10-16Cleanup, restore PEP8.Lance Stout
2010-10-14deprecated jid, fulljid, server, user, resource properties and added ↵Nathan Fritz
boundjid JID
2010-10-14fixed socket name collision in xmlstream.py and fixed python 3.x compatibilityNathan Fritz
2010-10-13disconnect cleanlyNathan Fritz
2010-10-13new state machine in placeNathan Fritz
2010-10-07SleekTest may now run against a live stream.Lance Stout
Moved SleekTest to sleekxmpp.test package. Corrected error in XML compare method. Added TestLiveSocket to run stream tests against live streams. Modified XMLStream to work with TestLiveSocket.
2010-10-07Fixed dealing with deleting handlers.Lance Stout
The call to .index() may raise a ValueError if the item is not in the list. So both the .index() and .pop() calls should be in the try block.
2010-10-06Merge branch 'develop' of github.com:fritzy/SleekXMPP into developLance Stout
2010-10-06Made first pass at cleaning up ClientXMPP.Lance Stout
Added self.stream_ns to BaseXMPP. Moved connected/disconnected events and logging to XMLStream.
2010-10-06deal with deleting handlers that are no longer therefritzy
2010-10-06XMLStream cleanup.Lance Stout
Added RestartStream as a top level item in sleekxmpp.xmlstream. Fixed trailing whitespace.
2010-10-01Modified event handling to use the event queue.Lance Stout
Updated tests to match. (Needed to add a small wait to make sure the event got through the queue before checking the results.)
2010-10-01Moved event functions to XMLStream.Lance Stout
This is just a transplant, modifying event to use the main event queue has not been implemented yet.
2010-10-01Moved add_handler, send, and sendXML to XMLStream.Lance Stout
2010-10-01Moved getNewId and getId to XMLStream.Lance Stout
This prepares the way for moving add_handler to XMLStream. Since stanzas, matchers, and handlers in any XML stream will typically use unique IDs, XMLStream is a good place for these methods.
2010-10-01Cleaned up trailing whitespace.Lance Stout
2010-09-30Fixed line lengths and trailing whitespace.Lance Stout
The pep8 command is now pleased.
2010-09-30Made a first pass at cleaning up XMLStream.Lance Stout
A few extra methods are mentioned in the docs, but those have not been moved to XMLStream from BaseXMPP yet.
2010-08-27Updated the suite of handler classes with documentation.Lance Stout
Updated XMLStream to return True or False from removeHandler to indicate if the handler existed and was removed. Waiter handlers now unregister themselves after timing out.
2010-08-27Updated xmlstream.filesocket.Lance Stout
2010-08-05Updated the use of tostring in xmlstream.pyLance Stout
Now uses the xmlns and stream parameters to reduce the number of extra xmlns attributes used in the logging output. Added self.default_ns to XMLStream just to be safe.
2010-08-05Replaced the ToString class with a tostring function.Lance Stout
The sleekxmpp.xmlstream.tostring and sleekxmpp.xmlstream.tostring26 packages have been merged to sleekxmpp.xmlstream.tostring. The __init__.py file will import the appropriate tostring function depending on the Python version. The setup.py file has been updated with the package changes. ElementBase is now a direct descendent of object and does not subclass ToString. Stanza objects now return their XML contents for __repr__.
2010-07-29Added RESPONSE_TIMEOUT constant to sleekxmpp.xmlstream to serve as a single ↵Lance Stout
place to specify a default timeout value when waiting for a stanza response.
2010-07-26Replaced traceback calls to use logging.exception where applicable.Lance Stout