Age | Commit message (Collapse) | Author |
|
This reverts commit 7265682a4d57d88956cb54f98f7a470465bbf417.
|
|
|
|
See issue #278
|
|
Closes issue #278
|
|
|
|
|
|
This will make it easier to enable gevent support.
|
|
|
|
|
|
Remaining items are suitable default actions for language supporting
interfaces.
|
|
|
|
|
|
|
|
This reverts commit 4274f49ada77d709b931f65e34d3a64e75b81638.
The SASL mech was choking on this, so let's send it back for some
more refining.
|
|
Based on profiling, using around 35 stream handlers quarters the number
of basic message stanzas that can be processed in a second, in
comparison to only using the bare minimum of four handlers.
To help, we can drop handlers for stream features once the session
has started. So that we can re-enable these handlers when a stream
must restart, the 'stream_start' event has been added which fires
whenever a stream header is received.
The 'stream_start' event is a more generic replacement for the
existing start_stream_handler() method.
|
|
Instead of using:
ClientXMPP(jid, password, plugin_config={
'feature_mechanisms': {'use_mech': 'SOME-MECH'}})
You can use:
ClientXMPP(jid, password, sasl_mech='SOME-MECH')
If you need to change the mechanism after instantiation, use:
xmpp['feature_mechanisms'].sasl.mech = 'SCRAM-MD5'
|
|
|
|
To use:
sudo pip install tox
tox
|
|
|
|
|
|
Conflicts:
setup.py
sleekxmpp/clientxmpp.py
|
|
|
|
|
|
Provides IqTimeout and IqError which are raised when an Iq response
does not arrive in time, or it arrives with type='error'.
|
|
|
|
Use the parameter now=True to skip the queue when
sending Iq stanzas, or using xmpp.send().
|
|
|
|
|
|
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.
|
|
|
|
Use: self.send(None)
|
|
|
|
Now timeouts at 0.5sec instead of 0.1sec, which should prevent test
failures from stanzas being delayed longer than usual.
|
|
Conflicts:
sleekxmpp/basexmpp.py
|
|
Use stanza.values instead of _get/set_stanza_values where used.
ElementBase stanzas can now use .tag
May use class method tag_name() for stanza classes.
ElementBase now has .clear() method.
|
|
Conflicts:
sleekxmpp/basexmpp.py
|
|
Notably, not sending an expected stanza will not silently pass.
|
|
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.
|
|
JIDs without resources will return '' instead of the bare JID.
Cleaned up JID tests, and added check_JID to SleekTest.
|
|
Makes test coverage nicer.
|