Commit graph

948 commits

Author SHA1 Message Date
Lance Stout
ec044affd4 Only auto-broadcast caps changes after a session has started. 2012-03-10 10:19:43 -08:00
Lance Stout
af39945009 Add XEP-0163 plugin.
This is just a very simple wrapper for XEP-0030, XEP-0115, and XEP-0060
for adding interests to caps information, and publishing.
2012-03-10 09:23:47 -08:00
Lance Stout
78a50d0237 Add support for pubsub notification events.
Publishes, retractions, purges, and deletions now raise the events:

- pubsub_publish
- pubsub_retract
- pubsub_purge
- pubsub_delete

In addition, custom events may be raised based on the node that
generated the notification. For example:

xmpp['xep_0060'].map_node_event('http://jabber.org/protocol/tune',
                                'user_tune')

will allow for using the events:

- user_tune_publish
- user_tune_retract
- user_tune_purge
- user_tune_delete
2012-03-10 00:07:56 -08:00
Lance Stout
861d279b08 Correct missing pubsub#event stanzas and interfaces. 2012-03-10 00:07:15 -08:00
Lance Stout
4cb8a8d389 Modify the cert event to provide the PEM encoded cert in all cases. 2012-03-07 15:03:35 -08:00
Lance Stout
a71823dc04 Add support for roster versioning.
This was XEP-0237, but is now part of RFC 6121.

Roster backends should now expose two additional methods:

version(jid):
    Return the version of the given JID's roster.
set_version(jid, version):
    Update the version of the given JID's roster.

A new state field will be passed to the backend if an item
has been marked for removal. This is 'removed' which will
be set to True.
2012-03-07 14:55:27 -08:00
Lance Stout
d41ada6b66 Cleanup logging when loading a custom plugin. 2012-03-05 11:30:36 -08:00
Lance Stout
fdfe2cd64f Propagate save option when setting a roster backend. 2012-03-05 11:28:10 -08:00
Lance Stout
7b51c6f5cc Save existing roster content when setting a new backend. 2012-03-05 11:12:13 -08:00
Lance Stout
be7f07ad12 Prevent excess loading from the roster db.
Fixes issue #148
2012-03-05 11:11:35 -08:00
Lance Stout
830db11b41 Ensure that roster nodes aren't empty strings.
This would happen when receiving presence without a 'to' field, which
happens when receiving presence from other resources for the same account.
2012-03-05 11:08:57 -08:00
Lance Stout
53bcd33e1d Let disconnect() wait for its lock for a few seconds.
This should eliminate most debug statements about not being
able to acquire a lock during disconnect.
2012-02-22 07:57:13 -08:00
Lance Stout
e3d596c9fa Update XEP-0085 plugin to work with both ElementTree and cElementTree
Each state element must have its own stanza class now. A stanza class
with an empty name field causes errors in ElementTree, even though
it works fine with cElementTree.
2012-02-19 20:28:31 -08:00
Lance Stout
ecd6ad6930 Fix incompatibility with clearing an element between ElementTree and cElementTree 2012-02-19 20:27:53 -08:00
Lance Stout
c36073b40e xml.etree.ElementTree raises ExpatError instead of SyntaxError or ParseError. 2012-02-19 20:27:19 -08:00
Lance Stout
afe0d16797 Centralize references to ET to make switching implementations easier. 2012-02-19 20:26:40 -08:00
Lance Stout
977fcc0632 Fix instances of using undefined variables. 2012-02-18 11:56:10 -08:00
Lance Stout
94b57d232d More pyflakes cleanup. 2012-02-18 11:44:05 -08:00
Lance Stout
7cdedb2ec0 More import cleanup based on pyflakes. 2012-02-18 11:40:34 -08:00
Lance Stout
676324805e Use JID objects when dealing with roster items. 2012-02-18 11:39:47 -08:00
Lance Stout
7d74a7b027 More extraneous import cleanup. 2012-02-17 14:59:56 -08:00
Lance Stout
9d5eb864d1 More import cleanups based on pyflakes results. 2012-02-17 14:41:31 -08:00
Lance Stout
86a482e032 Fix pyflakes complaints for XEP-0115 plugin. 2012-02-17 11:40:51 -08:00
Lance Stout
c43c7be86c Make last_xml usage a little more explict. 2012-02-17 11:40:07 -08:00
Lance Stout
c58462f154 Fix undeclared variable usage for reconnect. 2012-02-17 11:12:48 -08:00
Correl Roush
31d3e3b2b6 Updated XEP-0009 to handle unicode strings 2012-02-17 12:24:44 -05:00
Lance Stout
fb2582e53b Fix fixing remove_stanza()
Fixes issue #146
2012-02-16 07:25:44 -08:00
Lance Stout
d807613117 Don't retrieve cert until a connection is made. 2012-02-16 07:02:56 -08:00
Lance Stout
6d922d00c3 Fix remove_stanza().
Fixes issue #146
2012-02-16 07:02:19 -08:00
Lance Stout
61ea84093b Don't shutdown completely after handling SyntaxError.
The ``shutdown = True`` line was preventing the stream from reconnecting
after handling the error.

Fixes issues #101, #145
2012-02-10 19:28:12 -08:00
Lance Stout
e76d6a481f Fix undefined variable references when DNS timeouts. 2012-02-10 19:20:17 -08:00
Lance Stout
c1357717d9 Use '=' as base64 value for empty string SASL results. 2012-02-09 22:01:11 -08:00
Lance Stout
ca5145c210 Fix IPv6 query logging. 2012-02-10 06:46:51 +01:00
Lance Stout
1a272fd276 Add support for querying and connecting to IPv6 addresses.
Tested using servers provided by Florian Jensen (flosoft.biz)
during the 2012 FOSDEM XMPP Summit.

Fixes issue #94.
2012-02-09 21:28:28 -08:00
Lance Stout
952260b423 Add ssl_cert event (direct).
The payload is a dictionary of parsed cert data, as provided by
Python's getpeercert() socket method. It unfortunately does not
provide much detail beyond basic info.
2012-02-04 14:16:37 +01:00
Lance Stout
caa967105c Add more XEP-0047 tests. 2012-02-03 16:29:38 +01:00
Lance Stout
d565e4be20 Fix XEP-0184 imports 2012-02-03 16:08:27 +01:00
Lance Stout
85dd005abc Fix infinite callback loop. 2012-02-03 16:03:46 +01:00
Lance Stout
021c57205f Don't assume data is ASCII in saslprep. 2012-02-03 16:01:54 +01:00
Lance Stout
261a501afc Merge remote-tracking branch 'whooo/master' into develop 2012-02-03 15:23:01 +01:00
Erik Larsson
9a38a101d2 Added fritzy to the copyright for xep_0184 2012-02-03 15:17:01 +01:00
Lance Stout
4665c5cf1a Fix data stanza based on test results. 2012-02-02 19:19:50 +01:00
Lance Stout
bd52a5e6c1 Initial, mostly working XEP-0047 plugin.
This is inspired by the version from macdiesel and tomstrummer, but
their version was heavily linked with XEP-0096 and focused solely
on file transfer. This version is a more generic implementation.
2012-02-02 18:27:23 +01:00
Lance Stout
f98e5a03de Fix typo s/is_set/is_set() 2012-02-02 18:14:48 +01:00
Erik Larsson
2217c69757 Added plugin for XEP-0184 2012-02-02 14:29:27 +01:00
Lance Stout
3ab7c8bcc3 Make socket_error run as a direct event to ensure that it is handled.
Socket errors that occur before stream processing begins could not be
handled as the event loop would not be running yet.

Resolves issue #142
2012-01-28 18:54:46 -08:00
Lance Stout
8f25acd0f3 Bump version number in develop branch to 1.0.1dev. 2012-01-25 20:44:41 -08:00
Lance Stout
999f1932cc Merge pull request #138 from rhcarvalho/patch-2
Set default argument value.
2012-01-25 20:41:45 -08:00
Lance Stout
13158e3cdf Revert the X-GOOGLE-TOKEN mech to not perform HTTP requests.
Added new example for how to retrieve a Google token, following
the best case, non-browser, workflow. Other thirdparty auth
mechs (Facebook, MSN) follow a similar pattern of using an
access token.
2012-01-23 23:58:40 -08:00
Rodolfo Carvalho
2735b680b9 Fix ValueError when line has more than one '='. 2012-01-22 18:32:32 -02:00
Rodolfo Henrique Carvalho
5f1d4ce433 Set default argument value.
Without this features/feature_mechanisms/mechanisms.py throws an error when calling the method `process' without arguments on this mechanism.
2012-01-22 01:53:07 -02:00
Lance Stout
25f87607aa Add support for X-GOOGLE-TOKEN.
This is mainly just useful for authenticating without using TLS.

If an access token is not provided, an attempt will be made to
retrieve one from Google.
2012-01-21 00:44:03 -08:00
Lance Stout
f81fb6af44 Require explicitly setting access_token value.
Silently substituting the password field was nice, but for mechs
that can use either the password or an access token, it makes
things very difficult. This really only affects MSN clients since
Facebook clients should already be setting the api key.
2012-01-21 00:19:59 -08:00
Lance Stout
bb0a5186d6 Handle SASLCancelled and SASLError exceptions. 2012-01-21 00:19:08 -08:00
Lance Stout
baad907422 Add missing SASL <abort /> stanza 2012-01-21 00:17:49 -08:00
Lance Stout
1022fc0060 Make things work with Python3's byte semantics. 2012-01-20 02:27:30 -08:00
Lance Stout
3a22d798f8 Allow attempting multiple SASL mechs during a single stream.
Instead of disconnecting when the first chosen mech fails, we will
try all of them once.
2012-01-20 02:01:08 -08:00
Lance Stout
71ea430c62 Add support for X-FACEBOOK-PLATFORM SASL mechanism.
This requires an extra credential for SASL authentication:

xmpp = ClientXMPP('user@chat.facebook.com', '...access_token...')
xmpp.credentials['api_key'] = '...api_key...'
2012-01-20 01:24:05 -08:00
Lance Stout
0d2125e737 Add an extra config dict to store SASL credentials.
We'll need extra things beyond just a password, such as api_key.
2012-01-20 01:08:25 -08:00
Lance Stout
02f4006153 Add basic start for a client side XEP-0077 plugin. 2012-01-19 02:37:36 -08:00
Lance Stout
b25668b5b7 Fix detecting end of result set paging. 2012-01-18 19:57:49 -08:00
Lance Stout
1e01903072 Revert "Remove stream feature handlers on session_start."
This reverts commit 4274f49ada.

The SASL mech was choking on this, so let's send it back for some
more refining.
2012-01-18 11:51:00 -08:00
Lance Stout
3672856ab4 Fix roster key issue for non-JID keys. 2012-01-17 23:10:14 -08:00
Lance Stout
86d8736dcc Hash JIDs based on full JID string.
This makes JID objects equivalent to strings in dictionaries, etc.

>>> j = JID('foo@example.com')
>>> s = 'foo@example.com'
>>> d = {j: 'yay'}
>>> d[j]
'yay'
>>> d[s]
'yay'
>>> d[s] = 'yay!!'
>>> d[j]
'yay!!'
2012-01-17 23:03:48 -08:00
Lance Stout
2923f56561 Pre-parse StanzaPath paths to speed up matching.
The parsing and namespace cleaning isn't terribly expensive, but it does
add up. It was adding an extra 5sec when processing 100,000 basic
message stanzas.
2012-01-17 22:28:44 -08:00
Lance Stout
4274f49ada Remove stream feature handlers on session_start.
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.
2012-01-17 22:14:24 -08:00
Rodolfo Henrique Carvalho
f49b6fa79f Use jid.bare as a key instead of a JID instance. 2012-01-16 16:59:45 -02:00
Lance Stout
7b854a190e Tidy up and update the plugin __init__ file. 2012-01-15 22:51:59 -08:00
Lance Stout
947d1ffbb3 Fix xep_0030 reference warning. 2012-01-14 17:12:39 -08:00
Lance Stout
de35848500 Don't serialize XML unless we need to. 2012-01-14 10:54:48 -08:00
Lance Stout
1ae219025a Don't dump exception logs for XML stream parsing errors.
The exceptions are handled, so we don't need to clutter the output logs.
2012-01-12 22:26:15 -08:00
Lance Stout
e8b2dd6698 Update Roster stanza to use RosterItem substanzas.
get_roster() now returns the Iq result stanza instead of True (stanzas
also evaluate to True).
2012-01-12 17:21:43 -08:00
Lance Stout
c0074f95b1 update_caps() can now do presence broadcasting.
As part of adding this feature:

    - fixed bug in update_caps() not assigning verstrings
    - fixed xep_0004 typo
    - can now use None as a roster key which will map to boundjid.bare
    - fixed using JID objects in disco node handlers
    - fixed failing test related to get_roster

Several of these bugs I've fixed before, so I either didn't push them
earlier, or I clobbered something when merging. *shrug*
2012-01-11 16:39:55 -08:00
Lance Stout
1eb69f7075 Make the roster easier to inspect.
The __repr__ version now looks like a regular dictionary.
2012-01-10 20:03:22 -08:00
Lance Stout
a86935a42f Make get_roster(block=False) work properly.
Fixes issue #136
2012-01-10 19:57:38 -08:00
Lance Stout
6b9a55e62d Sync with Suelta. 2012-01-07 00:19:08 -05:00
Lance Stout
c578ddeb1a Add support for MSN with X-MESSENGER-OAUTH2 SASL support.
NOTE: This requires already having the access token. It does NOT
perform any OAuth requests.
2012-01-06 23:31:58 -05:00
Lance Stout
8ef7188dae Fix client_roster when the bare JID changes after binding.
Adds session_bind event.
2012-01-06 23:30:14 -05:00
Lance Stout
8fd2efa2fa Merge branch 'develop-1.1' into develop 2012-01-05 11:33:47 -05:00
Lance Stout
79f1aa0e1b Update version and README for 1.0 release. 2012-01-03 17:04:15 -05:00
Lance Stout
fb5a6a7d71 Merge pull request #132 from rhcarvalho/master
Fix a typo in several files.
2012-01-02 13:10:46 -08:00
Rodolfo Carvalho
7d1c5f4a2b Fix a typo in several files.
This fixes several instances of "intial" for "initial".
2012-01-02 18:59:39 -02:00
Lance Stout
27c658922e Fix handing caps in Python3, allow update_caps() call before process() 2011-12-31 21:15:40 -05:00
Lance Stout
35954cdc90 Fix a few holes in caps.
Protip: Don't test using a custom disco handler that always returns the
same feature set :p
2011-12-31 19:18:00 -05:00
Lance Stout
e0545bf0bc Merge branch 'develop' into develop-1.1 2011-12-31 01:29:12 -05:00
Lance Stout
03bc38f7e3 Add docs on using Iq stanzas. 2011-12-31 01:28:41 -05:00
Lance Stout
4e23a4e08e Merge pull request #130 from rhcarvalho/master
Some small fixes
2011-12-30 20:14:54 -08:00
Lance Stout
d817d64c65 Enable caps stream feature. 2011-12-30 22:34:57 -05:00
Lance Stout
8a29ec67ac Add XEP-0115 plugin.
Finally
2011-12-30 21:45:25 -05:00
Lance Stout
6722b0224a Add option to disable condensing and converting form values.
XEP-0115 needs to use the raw XML character data.
2011-12-30 21:43:39 -05:00
Lance Stout
8eb225bdec Add option for disabling identity and feature deduplication.
XEP-0115 requires detecting duplicates, so we can't always silently
ignore them.
2011-12-30 20:53:18 -05:00
Lance Stout
a7df76a275 Add 'supports' and 'has_identity' node handlers. 2011-12-30 20:52:44 -05:00
Lance Stout
efae8f3369 Automatically use local disco based on the JID. 2011-12-30 20:51:41 -05:00
Lance Stout
a11e6c0b77 Be more lenient on required arguments to disco node handlers. 2011-12-30 20:51:02 -05:00
Lance Stout
1bb0b38868 Make the disco logs nicer. 2011-12-30 20:50:15 -05:00
Rodolfo Carvalho
b74ea47650 Fix docstring of a method of Message stanzas. 2011-12-30 17:08:32 -02:00
Lance Stout
4df1641689 Add set_info disco handler. 2011-12-28 11:46:13 -05:00
Lance Stout
5ef0b96d5c Fix caching for clients. 2011-12-28 11:37:05 -05:00
Lance Stout
d979b5f2b9 Add caching support to xep_0030.
New plugin configuration options:

    use_cache    - Enable caching disco info results. Defaults to True
    wrap_results - Always return disco results in an Iq stanza. Defaults
                   to False

Node handler changes:

    Handlers now take four arguments: jid, node, ifrom, data

    Most older style handlers will still work, depending on if they
    raise a TypeError for incorrect number of arguments. Handlers that
    used *args may not work.

New get_info options:

    cached - Passing cached=True to get_info() will attempt to load
             results from the cache. If nothing is found, a query
             will be sent as normal. If set to False, the cache
             will be skipped, even if it contains results.

New method:

    supports() - Given a JID/node pair and a feature, return True
                 if the feature is supported, False if not, and
                 None if there was a timeout. By default, the search
                 will use the cache.
2011-12-28 10:16:31 -05:00
Lance Stout
1a61bdb302 Ensure that stanza plugins work as expected if the XML is appended. 2011-12-28 09:53:22 -05:00
Lance Stout
2f2ebb37e4 Merge branch 'develop' into develop-1.1 2011-12-27 18:05:42 -05:00
Lance Stout
522f0dac16 Merge branch 'develop' of github.com:fritzy/SleekXMPP into develop 2011-12-27 18:03:08 -05:00
Lance Stout
42a86fe0d4 Disconnect when a SyntaxError is found.
This should resolve issue #102
2011-12-27 18:01:26 -05:00
Correl Roush
e928b9c434 XEP-0009: Updated tests to work in python 3 2011-12-20 21:19:51 -05:00
Lance Stout
fb55d9e9d1 Add comma to fix pubsub error conditions.
Fixes issue #127
2011-12-20 12:30:35 -05:00
Correl Roush
6c58b8cc4b XEP-0009: Updated RPC value conversion code
Updated the XML-RPC value conversion to correctly apply namespaces, and
fixed an error uncovered by the tests in the XML -> Python conversion of
dateTime values.
2011-12-20 02:03:06 -05:00
Correl Roush
9950208d06 Fixes Issue #123: Corrected boolean xml to python conversion 2011-12-16 17:41:16 +00:00
Correl Roush
c98a22e065 Fixed Issue 93: ACL.check jid parameter should be a string value 2011-12-15 21:58:33 +00:00
Lance Stout
d496417deb Allow XEP-0082 to return datetime objects without having to format and reparse. 2011-12-15 12:02:08 -08:00
Lance Stout
f6e30edbc4 Log received data AFTER filtering.
This allows applications to filter out sensitive information, such
as passwords, so that it won't appear in the logs.

It does mean that the debug logs will not show the actual received
data, and there will be no indication of tampering, unless the
filter author explicitly logs and notes that a change was made.
2011-12-14 21:14:27 -08:00
Lance Stout
dcb0d8b00e Merge branch 'develop' into develop-1.1 2011-12-13 09:38:27 -08:00
Lance Stout
116bb6e1b9 Use OrderedDicts instead of regular dictionaries when returning values from forms. 2011-12-13 09:00:45 -08:00
Lance Stout
9c6dde5d22 Ensure that item fields have the proper type.
The item fields were not setting their type based on the reported
field's type attribute, so values were not being encoded properly.

Fixes issue #121
2011-12-13 08:59:39 -08:00
Lance Stout
cb635dcd5a Add parameter docs for add_filter. 2011-12-12 22:37:19 -08:00
Lance Stout
eff3330e75 Add support for incoming/outgoing filters.
A filter accepts and returns a stanza, but potentially modified.

To prevent sending/receiving a stanza, a filter may return None.

Incoming:
    self.add_filter('in', in_filter)

Outgoing:
    self.add_filter('out', out_filter)

Filters are applied in the order thay are added. However, you may
add an order parameter, which is the place in the list to insert the
filter:

    self.add_filter('in', in_filter, order=0)
2011-12-12 22:17:07 -08:00
Lance Stout
fc8a13df5a Allow disco info/items handlers to return full Iq stanzas.
Only allowing handlers to return a DiscoInfo/DiscoItem stanza works
for the majority of cases, but does not allow for the addition of
an RSM stanza, or other extensions.

An Iq stanza returned by a handler must already be configured as
a reply.
2011-12-12 19:38:32 -08:00
Lance Stout
85e9042db6 Pass the Iq stanza to disco item handlers. 2011-12-12 16:34:24 -08:00
Lance Stout
62e6d6fb4c Fix iterable substanzas when added as normal plugin.
If an iterable plugin was an enabled, it wasn't added to
the iterables list.
2011-12-11 17:04:58 -08:00
Lance Stout
16c72e8efd Use UTC for xep_0082.date. 2011-12-09 23:59:33 -08:00
Lance Stout
efe1b9f5a9 Allow sending stanzas on session_end.
May set self.disconnect_wait=True so that all disconnect
calls wait for the send queue to empty, unless explicitly
overridden with wait=False.

The session_end now fires before closing the socket so
that final stanzas may be sent, such as unavailable presences
for components.
2011-12-09 23:56:39 -08:00
Lance Stout
65dbddb6b6 Fix logging when loading plugins. 2011-12-09 20:57:08 -08:00
Lance Stout
2a67a31120 Prevent hang when terminating during delayed connection. 2011-12-07 22:16:58 -08:00
Lance Stout
a720c3348b Updated last bit of core files to use new API format. 2011-12-05 20:37:47 -08:00
Lance Stout
e01c2d222a More doc updates 2011-12-05 08:55:05 -08:00
Lance Stout
8922e2050a Update the API docs for XMLStream 2011-12-04 20:35:17 -08:00
Lance Stout
a85891c611 Add API docs for the scheduler 2011-12-04 16:43:05 -08:00
Lance Stout
2586fdffda Update api docs for handlers and matchers 2011-12-04 16:26:14 -08:00
Lance Stout
b9332142c9 Update api docs for JID 2011-12-04 13:42:46 -08:00
Lance Stout
b7b53362e1 Ensure that adhoc command clients have form plugin registered.
The form plugin was being registered on first use for providers,
but not for clients receiving the form.

NOTE: Use of non-form payloads will have this issue - adhoc command
      clients will need to have an expectation beforehand of what
      the command payload will be to properly load stanza plugins.
2011-12-04 01:24:35 -08:00
Lance Stout
68cf66a5fe Ensure that saving a roster item includes the correct subscription value.
Fixes issue #118
2011-11-28 15:00:35 -08:00
Florent Le Coz
4eb7eeb40f Send the encoded data (bytes) and not the str, on the socket. 2011-11-25 01:45:43 +08:00
Lance Stout
a1d64fa215 Experimental support for handling SSL write errors. 2011-11-23 23:59:05 -08:00
Lance Stout
5f44c0e678 Add docs for filesocket 2011-11-22 16:33:38 -08:00
Lance Stout
b87c4d786d Update tostring docs, plus more doc cleanup 2011-11-22 16:25:33 -08:00
Lance Stout
6906c15e8e Update docs for tostring 2011-11-22 15:25:02 -08:00
Lance Stout
4498e992a2 Add more stanzabase docs 2011-11-21 23:17:39 -08:00
Lance Stout
2b0a05ee32 Update stanzabase docs 2011-11-21 21:51:19 -08:00
Lance Stout
862a2a1440 Ensure that reconnection happens properly after connection loss.
Calling reconnect() simultaneously from multiple threads (like when
using XEP-0199 keepalive) could break because the connection state
can transition and break the state expectations in one of the
reconnect() calls.
2011-11-20 12:18:37 -08:00
Lance Stout
fba60ffff1 Convert daemon threads back into normal threads.
This may need to be reverted if CTRL-C handling breaks, but everything
works fine so far in testing.

Resolves issue #95.
2011-11-20 12:17:35 -08:00
Lance Stout
d1a945a305 Tidy up logging some more 2011-11-19 19:18:43 -08:00
Lance Stout
685b9ab102 Fix logging exceptions from formatting issues. 2011-11-19 19:08:27 -08:00
Lance Stout
24f27c0fe3 Pass generic connection errors to XMLStream.exception() 2011-11-19 19:01:07 -08:00
Lance Stout
3019c82d8a Use a list comprehension instead of filter() to work with Python3. 2011-11-19 18:49:18 -08:00
Lance Stout
b54cc97e4c Merge remote-tracking branch 'vijayp/master' into HEAD
Conflicts:
	examples/ping.py
	sleekxmpp/basexmpp.py
	sleekxmpp/clientxmpp.py
	sleekxmpp/features/feature_bind/bind.py
	sleekxmpp/features/feature_mechanisms/mechanisms.py
	sleekxmpp/plugins/gmail_notify.py
	sleekxmpp/plugins/jobs.py
	sleekxmpp/plugins/xep_0009/remote.py
	sleekxmpp/plugins/xep_0009/rpc.py
	sleekxmpp/plugins/xep_0012.py
	sleekxmpp/plugins/xep_0045.py
	sleekxmpp/plugins/xep_0050/adhoc.py
	sleekxmpp/plugins/xep_0078/legacyauth.py
	sleekxmpp/plugins/xep_0085/chat_states.py
	sleekxmpp/plugins/xep_0199/ping.py
	sleekxmpp/plugins/xep_0224/attention.py
	sleekxmpp/xmlstream/handler/waiter.py
	sleekxmpp/xmlstream/matcher/xmlmask.py
	sleekxmpp/xmlstream/xmlstream.py

Conflicts:
	examples/ping.py
	sleekxmpp/basexmpp.py
	sleekxmpp/clientxmpp.py
	sleekxmpp/features/feature_bind/bind.py
	sleekxmpp/features/feature_mechanisms/mechanisms.py
	sleekxmpp/plugins/gmail_notify.py
	sleekxmpp/plugins/jobs.py
	sleekxmpp/plugins/xep_0009/remote.py
	sleekxmpp/plugins/xep_0009/rpc.py
	sleekxmpp/plugins/xep_0012.py
	sleekxmpp/plugins/xep_0045.py
	sleekxmpp/plugins/xep_0050/adhoc.py
	sleekxmpp/plugins/xep_0078/legacyauth.py
	sleekxmpp/plugins/xep_0085/chat_states.py
	sleekxmpp/plugins/xep_0199/ping.py
	sleekxmpp/plugins/xep_0224/attention.py
	sleekxmpp/xmlstream/handler/waiter.py
	sleekxmpp/xmlstream/matcher/xmlmask.py
	sleekxmpp/xmlstream/xmlstream.py
2011-11-19 18:23:26 -08:00
Vijay Pandurangan
e3b9d5abbf double copy 2011-11-19 16:03:17 -08:00
Vijay Pandurangan
2332970cf2 elide unnecessary copy 2011-11-19 16:02:41 -08:00
Vijay Pandurangan
48af3d3322 remove unnecessary copies when only one handler matches. This was taking up ~ 15% of CPU on moderate load. 2011-11-19 15:59:38 -08:00
Lance Stout
429c94d6a9 Tidy up logging calls. 2011-11-19 12:07:57 -08:00
Vijay Pandurangan
deb52ad350 This change stops sleekxmpp from spending huge amounts of time unnecessarily 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-11-20 03:39:05 +08:00
Vijay Pandurangan
6f3cc77bb5 This change stops sleekxmpp from spending huge amounts of time unnecessarily 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-11-19 11:30:44 -08:00