Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
Required fixing a few bugs in StanzaBase related to iterable
substanzas.
|
|
|
|
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 />
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Contributed by Erik Reuterborg Larsson (who).
|
|
|
|
May now use sys.excepthook to catch exceptions
from threaded handlers.
|
|
Now with dynamic node handling goodness.
Some things are not quite working yet, in particular:
set_items
set_info
set_identities
set_features
And still need more unit tests to round things out.
|
|
|
|
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.
|
|
The callback will be a stream level handler, and will not
execute in its own thread. If you must have a thread, have the
callback function raise a custom event, which can be processed
by another event handler, which may run in an individual thread,
like so:
def handle_reply(self, iq):
self.event('custom_event', iq)
def do_long_operation_in_thread(self, iq):
...
self.add_event_handler('custom_event', self.do_long_operation_in_thread)
...take out already prepared iq stanza...
iq.send(callback=self.handle_reply)
|
|
Fixed some errors when responding to disco requests.
|
|
Added test demonstrating using multiple stream clients
in a single test.
|
|
SleekTest can now use matchers when checking stanzas, using
the method parameter for self.check(), self.recv(), and self.send():
method='exact' - Same behavior as before
'xpath' - Use xpath matcher
'id' - Use ID matcher
'mask' - Use XML mask matcher
'stanzapath' - Use StanzaPath matcher
recv_feature and send_feature only accept 'exact' and 'mask' for now.
|
|
* 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.
|
|
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!
|
|
Tests auto_authorize=False, and got_online.
|
|
Subscription requests and responses were not setting the correct 'to'
attribute.
|
|
First batch of tests, currently focuses on the got_offline event.
|
|
|
|
sleekxmpp.xmlstream.jid now has 100% coverage!
|
|
JIDs without resources will return '' instead of the bare JID.
Cleaned up JID tests, and added check_JID to SleekTest.
|
|
|
|
XML of the form <a>foo <b>bar</b> baz</a> was outputted as
<a>foo <b>bar</b> baz baz</a>.
Includes unit test.
|
|
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.
|
|
Run using:
python tests/live_test.py
|
|
There was a bug in the XML compare method.
|
|
Moved SleekTest to sleekxmpp.test.
Organized test suites by their focus.
- Suites focused on testing stanza objects are named test_stanza_X.py
- Suites focused on testing stream behavior are name test_stream_X.py
|
|
|
|
Added test for testing stream headers.
|
|
May now use a component for stream testing.
Methods provided for testing stream headers.
|
|
Have not intregrated the new JID class yet.
|
|
Updated tests to match. (Needed to add a small wait to make sure
the event got through the queue before checking the results.)
|
|
|
|
Required adding option to _fix_ns to not propagate namespaces to child elements.
|
|
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.
|
|
Corrected resulting test failures. All pass again.
|
|
|
|
|
|
Corrected bugs in equality comparisons between stanzas.
|
|
|