Emmanuel Gil Peyrot
7c3b3827b4
jid: Make property aliases proper aliases.
2018-08-20 00:23:21 +01:00
Emmanuel Gil Peyrot
9f6fa65139
examples, tests: Replace all @asyncio.coroutines with proper async functions.
2018-08-19 17:47:26 +01:00
mathieui
35fa33e3c2
Release slixmpp 1.4.0
2018-08-12 21:11:21 +02:00
mathieui
490f15b8fc
Fix compatibility with python 3.5 and 3.6
...
which do not have loop.start_tls and require the old ssl implementation.
2018-08-08 23:35:33 +02:00
Emmanuel Gil Peyrot
62661ee04f
xep_0092: Return <service-unavailable/> instead. Fixes #3415 .
2018-08-08 16:52:40 +02:00
Emmanuel Gil Peyrot
37d1f2a6b0
xep_0092: Send a <forbidden/> error if we don’t want to send our version. (thanks lovetox!)
2018-08-08 16:49:16 +02:00
mathieui
20107ad516
features/starttls: handle the case where the socket is an sslobject
...
Thanks pep.
2018-08-07 23:30:41 +02:00
mathieui
7738a01311
Fix TLS with python 3.7
...
Use the "new" sslproto API instead of the deprecated TLS API.
Also remove the unused "socket" parameter in XMLStream.__init__.
2018-08-07 23:20:38 +02:00
mathieui
a9abed6151
xep-0054: XMPP clients should not reply to vcard "get" requests
2018-08-07 21:30:13 +02:00
Emmanuel Gil Peyrot
59d4420739
XEP-0323: Display the requested time in addition to the current time on error.
2018-07-29 10:37:28 +02:00
Emmanuel Gil Peyrot
a88f317bbf
XEP-0009: Fix invalid function name under Python 3.7.
2018-07-24 18:21:03 +02:00
Link Mauve
2fc2a88970
Merge branch 'factor_find_identities' into 'master'
...
Factor find identities
See merge request poezio/slixmpp!2
2018-07-22 12:49:37 +02:00
Emmanuel Gil Peyrot
c55e9279ac
Fix missing async def in function.
2018-07-02 14:33:21 +02:00
Emmanuel Gil Peyrot
3502480384
Switch from @asyncio.coroutine to async def everywhere.
2018-07-01 18:46:33 +02:00
Maxime “pep” Buquet
caae713dd6
xep_0030: rename find_identities; return all domain infos and let caller filter itself
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2018-07-01 01:36:26 +01:00
Maxime “pep” Buquet
df0198abfe
xep_0030: Add callback parameter to find_identities
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2018-07-01 01:32:00 +01:00
Maxime “pep” Buquet
c20f4bf5fa
xep_0030: Add cached parameter to find_identities, defaults to True
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2018-07-01 01:29:31 +01:00
Maxime “pep” Buquet
9740e93aeb
xep_0030: Pass kwargs down in find_identities
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2018-07-01 01:29:31 +01:00
Maxime “pep” Buquet
e7872aaa29
xep_0030: Use self directly as we're already in disco
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2018-07-01 01:29:31 +01:00
Maxime “pep” Buquet
037706552c
Factor out fetching of identities in xep_0363 to xep_0030
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2018-07-01 01:29:31 +01:00
Maxime “pep” Buquet
b881c6729b
xep_0363: Remove unused parameters to find_upload_services
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2018-07-01 01:29:31 +01:00
Emmanuel Gil Peyrot
66909aafb3
XEP-0153: Prevent a panic when the BINVAL is invalid.
2018-06-23 14:34:24 +02:00
Emmanuel Gil Peyrot
fe66c022ad
Revert "XEP-0060: Add support for node configuration."
...
This reverts commit dd7f67d10d
.
2018-05-13 21:12:46 +02:00
Emmanuel Gil Peyrot
dd7f67d10d
XEP-0060: Add support for node configuration.
2018-05-13 20:47:21 +02:00
Emmanuel Gil Peyrot
c1562b76b2
slixmpp is Python 3.4.4+, remove check for channel binding.
2018-03-31 02:22:53 +02:00
Emmanuel Gil Peyrot
32839f5252
util.cache: Let the user select the bare JID or not.
2018-03-31 00:44:53 +02:00
Emmanuel Gil Peyrot
80b7cf6ff8
util.cache: Support None for encode and decode.
2018-03-31 00:44:23 +02:00
Emmanuel Gil Peyrot
128cc2eeb4
XEP-0115: Use the new cache system.
2018-03-31 00:25:28 +02:00
Emmanuel Gil Peyrot
037912ee89
util.cache: New module handling both in-memory and on-file system caching.
2018-03-31 00:24:21 +02:00
Emmanuel Gil Peyrot
769bc6d3bf
session: Also fire the session_start event.
2018-03-14 19:39:01 +01:00
Emmanuel Gil Peyrot
084d6cb5d9
session: Don’t bind if it is optional.
...
See https://tools.ietf.org/html/draft-cridland-xmpp-session-01
2018-03-14 18:54:17 +01:00
Emmanuel Gil Peyrot
5184713356
Rearm an iq callback if it was addressed to ourself.
2018-03-14 17:37:55 +01:00
Emmanuel Gil Peyrot
2f1225bad3
Carry the node attribute to the disco#info result.
...
Fixes #3323 .
2018-03-14 16:25:21 +01:00
Emmanuel Gil Peyrot
841f5a5a5b
xep_0363: Only send the basename() of the filename to the server.
2018-03-11 19:40:15 +01:00
Emmanuel Gil Peyrot
0c6de5e972
xep_0363: Simplify Content-Type guessing.
2018-03-11 19:39:51 +01:00
Emmanuel Gil Peyrot
81dc61c55c
xep_0363: Fix max_file_size variable name.
2018-03-11 19:39:30 +01:00
Emmanuel Gil Peyrot
bd63b1ce70
Simplify usage of HTTP File Upload plugin.
...
This makes it usable only on Python 3.5, as documented.
2018-03-08 14:29:07 +01:00
Emmanuel Gil Peyrot
66500ef5fb
Add an HTTP File Upload plugin.
2018-03-08 03:38:59 +01:00
mathieui
979396bb1e
asyncio.async has been scheduled for removal for a long time now
...
move to asyncio.ensure_future
2018-02-11 19:25:38 +01:00
mathieui
e177726387
Fix usage of the 0004 plugin interface
...
form['fields'] is an ordered list of fields while most plugins expect a
dict there. Fixes, among other things, a caps bug.
2018-02-11 16:42:59 +01:00
Emmanuel Gil Peyrot
20e88fda50
Fix typos, thanks codespell
!
2018-01-10 02:18:07 +01:00
Emmanuel Gil Peyrot
f252be9b6d
XEP-0115: Fix typo.
2018-01-05 18:03:42 +01:00
Emmanuel Gil Peyrot
c6443af29a
stringprep: Make pure-Python punycode() return bytes.
...
Fixes #3366 .
2017-12-27 15:48:42 +01:00
mathieui
d73f56a7af
Release slixmpp 1.3.0
2017-11-28 20:16:08 +01:00
Emmanuel Gil Peyrot
7c7f4308c5
Add a Markup plugin.
2017-11-23 12:18:01 +00:00
mathieui
eab8c265f4
Record the current connection attempt in a future and allow cancellation
...
It does not make sense to have competing connection attempts, as the
XMLStream class is not designed for this. On slow and unpredictable
networks, it means we could have two c2s connections opened, leading to
mayhem.
2017-11-23 00:00:37 +01:00
Emmanuel Gil Peyrot
e3fd0af9c8
xep_0054: Fix parsing BINVAL element.
2017-10-08 15:42:48 +01:00
mathieui
27e23672c1
Update the MAM plugin for asyncio & new namespace
...
And add an example
2017-09-24 17:43:06 +02:00
mathieui
b38e229359
Update RSM for asyncio
...
- Use an async iterator
- Add a "recv_interface" parameter in order to differenciate the stanza
we send from the stanza we receive (required for MAM)
- Add a pre_cb to run before sending the query stanza
- Add a post_cb to run after receiving the result stanza
2017-07-21 15:01:13 +02:00
Emmanuel Gil Peyrot
9a563f1425
XEP-0030: Optimise add_node usage a bit.
2017-07-17 22:46:48 +01:00
Emmanuel Gil Peyrot
8b6f5953a7
XEP-0319: Use the correct timezone.
...
This fixes a specification violation, XEP-0082 says that a date MUST
have a timezone, but we were sending the *local* time without any
timezone information.
2017-07-17 22:20:30 +01:00
Emmanuel Gil Peyrot
2d2a80c73d
xmlstream: Remove pygments dumping.
...
It’s slow and makes the debug logs difficult to parse.
2017-07-17 21:17:02 +01:00
Mathias Ertl
4dfdd5d8e3
always define ssl_context
2017-05-24 13:18:22 +02:00
Mathias Ertl
1994ed3025
pass SSL context to TLS connections
2017-05-24 11:31:13 +02:00
Mathias Ertl
aaa45846d3
add function to explicitly get the ssl context
2017-05-24 11:31:13 +02:00
louiz’
d7ffcb54eb
Merge remote-tracking branch 'samwhited/sslsocket_workaround'
2017-05-16 17:24:46 +02:00
Tom Wambold
c33749e57a
Fixes port being set to 0 when connecting via hostname.
...
This seems to be the same issue as:
https://dev.louiz.org/issues/3164
Using their suggested fix, if the DNS lookup doesn't return a port, use
the one passed in instead.
2017-05-08 15:58:28 -04:00
Emmanuel Gil Peyrot
e4107d8b4d
sasl: Merge two bytes instead of concatenating them at runtime.
2017-04-28 21:26:03 +01:00
Emmanuel Gil Peyrot
c372bd5168
xmlstream: Warn when the parser is None when data is received.
2017-02-16 11:27:36 +00:00
mathieui
5bf69dca76
Return a Future on clientxmpp.get_roster()
2017-02-14 00:46:36 +01:00
Emmanuel Gil Peyrot
59dad12820
XEP-0300: Workaround for Python 3.5 or below.
2017-02-11 23:30:43 +00:00
Emmanuel Gil Peyrot
3721bf9f6b
Implement XEP-0300 (Use of Cryptographic Hash Functions in XMPP)
...
This is used to provide hash agility support and let other XEPs select
which hash function they support.
2017-02-11 04:02:20 +00:00
mathieui
24f35e433f
slixmpp 1.2.4 release
2017-01-30 23:02:45 +01:00
mathieui
22664ee7b8
Fix carbons
2017-01-28 00:02:27 +01:00
Clint Olson
6476cfcde5
Remove unused import caught by Codacy.
2017-01-23 23:58:53 -08:00
Clint Olson
5bb347e884
Fix partially-merged Google plugin from acc52fd935
.
2017-01-23 23:51:59 -08:00
Emmanuel Gil Peyrot
820144c40c
Add missing asyncio.coroutine decorators.
2016-12-30 13:41:15 +01:00
Emmanuel Gil Peyrot
6034df0a78
Check for XML parsing errors and disconnect in that case.
2016-12-29 18:59:09 +01:00
Emmanuel Gil Peyrot
df4012e66d
XMLStream: Break a long line to make it more readable.
2016-12-29 18:41:09 +01:00
mathieui
fb3ac78bf9
slixmpp 1.2.3
2016-12-07 21:47:54 +01:00
mathieui
ffd9436e5c
Fix roster push origin detection and tests
2016-12-07 19:06:25 +01:00
Emmanuel Gil Peyrot
457785b286
XEP-0380: Add a helper to test for the presence of an EME tag.
2016-11-26 16:41:48 +00:00
Emmanuel Gil Peyrot
4847f834bd
Add a plugin for XEP-0380: Explicit Message Encryption.
2016-11-26 16:29:19 +00:00
mathieui
53191ff1cf
slixmpp 1.2.2
...
Fix CVE-2015-8688, and a few bugfixes.
2016-11-21 21:46:02 +01:00
mathieui
ffdb6ffd69
Check origin of roster pushes
...
slixmpp is vulnerable to roster push attacks as described by Daniel
Gultsch at https://gultsch.de/gajim_roster_push_and_message_interception.html .
(CVE-2015-8688)
2016-11-21 21:42:51 +01:00
Emmanuel Gil Peyrot
7560db856b
stringprep_profiles: Emit a correct StringPrepError on query + unassigned.
2016-10-27 06:44:38 +01:00
Emmanuel Gil Peyrot
63d245ac48
SASL: Fix traceback on non-hashing mechanism using channel binding.
2016-10-27 06:26:39 +01:00
Emmanuel Gil Peyrot
7ddd37be29
XEP-0323: Fix wrong import.
2016-10-27 06:23:08 +01:00
Emmanuel Gil Peyrot
a4d3a4a25e
XEP-0313: Add missing setter argument.
2016-10-27 06:22:50 +01:00
mathieui
58bd07628b
Add missing parameters in XEP-0222 and XEP-0223
2016-10-27 00:21:01 +02:00
mathieui
3569038493
XEP-0009: fix a traceback on recipient unavailable
...
(probably a past typo)
2016-10-27 00:18:43 +02:00
mathieui
20c4ff823a
Add missing JID import in XEP-0079 and 0258
2016-10-27 00:17:29 +02:00
mathieui
8a7448a5a1
Add missing imports in XEP-0333
2016-10-27 00:15:25 +02:00
mathieui
d23d8f901e
Fix a traceback on XEP-0221 del uri['value']
...
(typo)
2016-10-27 00:11:27 +02:00
Emmanuel Gil Peyrot
391f12eeab
Transform an if into an elif in cert parsing.
2016-10-23 14:15:02 +01:00
Emmanuel Gil Peyrot
d008988843
Manual cleanup of the remaining set([…]) and set((…)).
2016-10-22 13:37:46 +01:00
Emmanuel Gil Peyrot
dcacc7d7d5
sed -i 's/set(\[\(.*\)\])$/{\1}/g' **/*.py
2016-10-22 13:21:44 +01:00
Emmanuel Gil Peyrot
c4285961df
sed -i 's/set((\(.*\)))$/{\1}/g' **/*.py
2016-10-22 13:21:42 +01:00
Emmanuel Gil Peyrot
1038f656eb
sed -i 's/set((\(.*\),))$/{\1}/g' **/*.py
2016-10-22 13:21:41 +01:00
Sam Whited
8b06aa1146
Fix fetching the SSL socket for Python 3.4 and 3.5
2016-10-06 13:00:17 -05:00
mathieui
36824379c3
slixmpp 1.2.1
...
Fix a few bugs along with the testsuite, and remove the asyncio loop
monkeypatch hack.
2016-10-05 20:32:32 +02:00
mathieui
a0a37c19ff
Remove monkeypatching hack on the event loop
...
This allowed us to schedule events in-order later in the event loop, but
was detrimental to using other event loops and debugging.
2016-10-05 20:19:07 +02:00
mathieui
f8cea760b6
Fix the gmail_notify plugin
2016-10-04 21:10:10 +02:00
mathieui
5ef01ecdd1
Fix XEP-0033
...
Re-add relevant stanza methods, broken in 7cd1cf32ae
2016-10-04 19:47:11 +02:00
mathieui
cf3f36ac52
Set unset part of a JID to empty string instead of None
...
it breaks assumptions on the type of the value
2016-10-04 19:42:05 +02:00
mathieui
b88d2ecd77
Add more checks in the XEP-0060 stanza building
...
Try to not append slixmpp stanzas to ElementTree objects.
2016-10-04 19:31:49 +02:00
mathieui
e691850a2b
Fix XEP-0128
...
Broken since 125336aeee
due to unforeseen consequences of a variable
removal.
2016-10-04 19:26:03 +02:00
mathieui
d4bff8dee6
Fix XEP-0009
...
Broken since 3a9b45e4f
because of an overzealous cleanup.
2016-10-04 19:23:21 +02:00
mathieui
187c350805
Update for slixmpp 1.2
2016-10-02 17:36:14 +02:00
mathieui
96d1c26f90
Add a fallback if the lang we want is not available
...
Previously, trying to get a text node with a lang which is different
from the one we specified would return nothing, which means e.g. a
message would be ignored because its body is of lang 'fr' when we setup
slixmpp to prefer 'en'. We want to return something when there is an
available, valid content in a different language.
2016-10-02 17:12:47 +02:00
mathieui
46a90749f8
Fix uses of super() in the codebase
...
Fix #3165 , we don’t need to use the long form to get the superobject in
our supported python versions.
2016-09-30 21:25:36 +02:00
mathieui
0c63a4bbda
Fix #3226 (unicity of scheduled event names)
...
Thanks tchiroux for raising the issue and providing the fix as well.
2016-09-30 20:59:31 +02:00
Sam Whited
8217dc5239
Minor documentation fixes
2016-09-30 13:49:04 -05:00
mathieui
2586abc0d3
Fix xep-0050 stanza
...
broken in 3a9b45e4f2
2016-09-20 20:51:21 +02:00
Emmanuel Gil Peyrot
28f84ab3d9
ElementBase: Remove support for TitleCase methods.
...
This gains about 1/8th of the time spent in __getitem__.
2016-09-21 01:31:53 +09:00
Emmanuel Gil Peyrot
813b45aded
XEP-0045: Remove support for old-style {get,set,del}TitleCase methods.
2016-09-21 01:28:24 +09:00
Emmanuel Gil Peyrot
3a9b45e4f2
ElementBase: Remove deprecated find() and findall() methods.
2016-09-20 16:45:29 +09:00
Emmanuel Gil Peyrot
b8e091233e
XEP-0004: Remove deprecated getXML() and fromXML() methods.
2016-09-20 16:34:48 +09:00
Emmanuel Gil Peyrot
0edeefd977
BaseXMPP: Stop automatically enabling UserNick, and remove deprecated alias module.
2016-09-20 16:23:02 +09:00
Emmanuel Gil Peyrot
6ba53cf1ff
ElementBase: Remove attrib interface.
2016-09-20 16:23:02 +09:00
Emmanuel Gil Peyrot
d7758eb7f4
ElementBase: Remove subitem interface.
2016-09-20 16:23:02 +09:00
Emmanuel Gil Peyrot
125336aeee
Remove locking from static disco.
2016-09-20 16:23:02 +09:00
Emmanuel Gil Peyrot
7cd1cf32ae
Various XEPs: Remove deprecated aliases.
2016-09-20 16:23:02 +09:00
Emmanuel Gil Peyrot
d099e353a4
Implement XEP-0333: Chat Markers.
2016-08-26 22:42:24 +01:00
Emmanuel Gil Peyrot
1e4a301c6e
Replace _format_jid with a JID method updating both bare and full at the same time.
2016-08-26 22:25:58 +01:00
Dan Sully
e2562dcccf
Make session_bind_event awaitable
2016-08-23 23:05:22 +02:00
Emmanuel Gil Peyrot
ab6df235d7
Pre-compute JID bare and full forms, and store that in each JID.
...
This wins about 4s over a 54s real-world benchmark.
2016-08-22 23:43:16 +01:00
mathieui
52cd8f4b22
Don’t trigger presence events on MUC presence
...
Specifically, previously, each MUC would be added as a roster item, and
then each join presence would be counted as a resource of that item,
triggering 1 to 5 events and more backend logic in slixmpp.
As a result, joining big rooms is tremendously slow, (JID() calls,
event() calls, __getitem__ calls for nothing), and takes RAM (a quick
tracemalloc tells me around 1 MiB for 3500 participants, i.e. 2 big IRC
rooms). Those resources may not necessarily be cleaned properly, leading
to memory leaks on long-term usage.
This is a micro-optimization that adds an attribute to roster items so
that MUC room events can be ignored safely while not affecting common
roster usage.
2016-08-22 01:29:07 +02:00
Emmanuel Gil Peyrot
e28318c271
Micro-optimise _format_jid.
2016-08-21 20:26:51 +01:00
mathieui
39ee833c29
Improve XEP-0070 and examples
2016-08-19 23:48:37 +02:00
Emmanuel Gil Peyrot
9019e2bc71
Initial work on XEP_0070, plugin and examples
2016-08-19 23:48:29 +02:00
louiz’
9208bf5bf1
Merge remote-tracking branch 'zejn/master'
2016-08-19 11:18:27 +02:00
Emmanuel Gil Peyrot
f0f1698e46
ElementBase: micro-optimise __getitem__, hands down the most often called function
...
This makes it go down from 8.767s to 7.960s in a random benchmark.
Remove unnecessary assignations, don’t create an OrderedDict from a
dict to then convert it to a dict again, only obtain the get_method2
name if get_method wasn’t present.
get_method2 (the title-case one) takes about 1/8th of the total time
spent in this function, we should eliminate it as soon as possible.
2016-08-17 00:46:56 +01:00
Gasper Zejn
eccd7f1c98
Provide domain name to loop.create_connection if using SSL.
2016-08-12 15:32:42 +02:00
Emmanuel Gil Peyrot
2587d82af8
Make util.XOR about ten times faster by calling bytes only once.
2016-07-30 00:14:54 +01:00
mathieui
7ea121b115
Don’t swallow presence exceptions abritrarily
2016-06-28 20:58:47 +02:00
mathieui
bb81fbbdfc
Implement XEP-0256 (last activity in presence)
...
mostly useless, but allows to use LastActivity stanzas inside Presence
stanzas as well.
2016-06-05 02:04:52 +02:00
mathieui
1a00a08b7d
Make XEP-0186 return futures as well
...
Improving the api if the developer wants to wait on them.
2016-06-05 00:19:24 +02:00
mathieui
90ea2a3411
Implement XEP-0352 (client state indication)
2016-06-04 22:59:23 +02:00
mathieui
8fc6814b6d
Update XEP-0198 for asyncio
2016-06-04 20:51:59 +02:00
mathieui
ffced0ed9a
Add a xep-0334 plugin
2016-06-04 19:34:12 +02:00
mathieui
e7248d9af9
Fix the Waiter handler for asyncio
2016-05-28 20:53:41 +02:00
mathieui
6b1a04f59d
Fix xep-0199
...
The keepalive ping was not working, and and ping() was tracebacking due
to a wrong parameter.
2016-05-28 15:13:33 +02:00
mathieui
4905407092
Fix the ordering of stream features
...
since iq.send is non-blocking, some features handlers could end up
being executed before others were set, leading to issues. Adding yield
from where it’s necessary fixes that.
2016-05-28 14:46:39 +02:00
mathieui
2e2b97c53b
Merge branch 'xep_0012_fix' of https://github.com/misuzu/slixmpp
2016-01-21 23:22:28 +01:00
Tsukasa Hiiragi
a35df7fe1f
Fixed NameError in start_uptime
2016-01-21 14:59:03 +02:00
Krzysztof Kotlenga
fbc8562779
Remove dead code
...
See 5c769632e8
.
2015-12-15 19:44:29 +01:00
mathieui
b549db959a
Update version to 1.1
2015-10-02 19:35:29 +02:00
mathieui
ada9444bf8
Merge branch 'sleek-merge'
2015-10-02 19:07:45 +02:00
mathieui
acc52fd935
Merge branch 'develop' of https://github.com/fritzy/SleekXMPP into sleek-merge
...
Conflicts:
README.rst
examples/IoT_TestDevice.py
examples/disco_browser.py
setup.py
sleekxmpp/jid.py
sleekxmpp/plugins/google/auth/stanza.py
sleekxmpp/plugins/google/gmail/notifications.py
sleekxmpp/plugins/google/nosave/stanza.py
sleekxmpp/plugins/google/settings/settings.py
sleekxmpp/thirdparty/__init__.py
sleekxmpp/thirdparty/socks.py
sleekxmpp/thirdparty/statemachine.py
sleekxmpp/util/__init__.py
sleekxmpp/xmlstream/xmlstream.py
slixmpp/basexmpp.py
slixmpp/plugins/xep_0004/stanza/form.py
slixmpp/plugins/xep_0009/rpc.py
slixmpp/plugins/xep_0050/adhoc.py
slixmpp/plugins/xep_0065/proxy.py
slixmpp/plugins/xep_0084/stanza.py
slixmpp/plugins/xep_0202/time.py
slixmpp/plugins/xep_0323/sensordata.py
slixmpp/plugins/xep_0325/control.py
slixmpp/plugins/xep_0325/stanza/control.py
slixmpp/roster/single.py
slixmpp/stanza/atom.py
slixmpp/stanza/rootstanza.py
slixmpp/test/slixtest.py
slixmpp/util/sasl/mechanisms.py
slixmpp/version.py
slixmpp/xmlstream/stanzabase.py
tests/test_stanza_xep_0323.py
tests/test_stanza_xep_0325.py
tests/test_stream_xep_0323.py
tests/test_stream_xep_0325.py
2015-10-02 19:00:19 +02:00
mathieui
1100ff1feb
Reset the DNS answers after a connection is made succesfully
2015-09-25 19:34:04 +02:00
mathieui
c17fc3a869
Fix IPv6 resolving with aiodns 1.0
2015-09-24 19:38:53 +02:00
mathieui
4dba697075
Fix support for python 3.4 <= 3.4.2
...
asyncio module is provisional, which means it gets updated everytime
2015-09-23 23:23:02 +02:00
mathieui
e42d651d7e
Fix connecting to a custom host/port
2015-09-19 15:27:12 +02:00
mathieui
82e549c0e9
(Temporary) fix for python 3.5
...
This will work until the old ssl implementation is finally deprecated.
Hopefully, new features to painlessy implement starttls will be around
by then.
2015-09-14 23:14:53 +02:00
mathieui
1aa15792b4
Bump the requirements to aiodns 1.0
...
(and use install_requires instead of requires in the setup.py)
2015-09-14 23:14:06 +02:00
Emmanuel Gil Peyrot
27f98bf22c
xep_0231: Fix a traceback on result serialization.
2015-09-05 18:35:59 +01:00
mathieui
3978078710
vcard-temp: add some checks against wrong input
2015-09-04 01:59:40 +02:00
mathieui
00a0698720
Add timeout_callback to a bunch of plugins as a parameter
2015-09-04 01:05:56 +02:00
mathieui
804b23d390
Merge branch 'socks5' of http://git.linkmauve.fr/slixmpp
2015-08-23 17:14:53 +02:00
Emmanuel Gil Peyrot
04eaf52b1d
xep_0065: Remove an unused variable.
2015-08-23 16:06:01 +01:00
Emmanuel Gil Peyrot
dc7fef1064
xep_0065: Remove the last useless threading locks.
2015-08-23 16:06:01 +01:00
Emmanuel Gil Peyrot
9c5dd024b1
Fix the xep_0065 plugin, by rewriting its socks5 implementation.
2015-08-23 16:06:01 +01:00
Florent Le Coz
6e61adf3db
Fix the order in which <identity/> and <feature/> tags are sent on disco#info
...
The identities should all be at the start, and features at the end, so we
just prepend the identity on add_identity, and append features on
add_feature
2015-08-22 18:48:29 +02:00
Emmanuel Gil Peyrot
041bd63864
Add a function to convert a domain name to punycode.
2015-08-20 20:04:58 +01:00
Emmanuel Gil Peyrot
1b4187fa56
Add a format() method to XMPPError which returns a readable string.
2015-08-08 17:34:06 +02:00
Emmanuel Gil Peyrot
cf7a60705e
Fix docstring of unsubscribe method in the PubSub plugin.
2015-08-08 17:34:06 +02:00
Emmanuel Gil Peyrot
9fbacf377a
Strip strings after pygments, so we don’t include an needless newline.
2015-08-08 17:34:06 +02:00
mathieui
9efa909dfc
slixmpp v1.0
2015-08-08 17:34:06 +02:00
mathieui
7f21fdbe26
Fix the test suite
...
(mock transport class missing .close())
2015-08-08 17:34:06 +02:00
mathieui
f9c7fa92ea
Reset the connect future after a disconnect
2015-08-08 17:34:05 +02:00
Emmanuel Gil Peyrot
170bd51387
Properly answer an error instead of tracebacking on unknown command execution.
2015-08-08 17:33:59 +02:00
mathieui
2ce931cb7a
Add a waiting time before reconnecting automatically
...
Punishing a server for being down by sending more traffic is not a nice
thing to do. Taking 100% of the CPU is not nice either.
2015-07-21 00:58:52 +02:00
mathieui
84eddd2ed2
Fix components
...
(use_tls is useless since slixmpp will always try to use starttls
whenever possible)
2015-07-21 00:33:15 +02:00
mathieui
d0ad25745a
Merge branch 'jid' of http://git.linkmauve.fr/slixmpp
2015-06-22 23:56:05 +02:00
Emmanuel Gil Peyrot
75ba283572
Store None instead of '' for unset parts of a JID.
2015-06-22 01:12:56 +01:00
mathieui
f7164d35d2
Add a wrapper to get_info/get_items functions
...
(and fix caps in the process)
2015-06-21 16:23:47 +02:00
Emmanuel Gil Peyrot
4afbb0322b
Rework slixmpp.jid’s JID classes to make them more efficient.
2015-06-20 01:49:48 +01:00
Emmanuel Gil Peyrot
7bce1ecc8a
Add a Cython version of slixmpp.stringprep, using libidn.
...
This makes the validation of a JID a *lot* faster.
2015-06-20 01:14:46 +01:00
Emmanuel Gil Peyrot
bbce16d526
Move stringprep and idna support in a different module than slixmpp.jid.
2015-06-20 01:14:46 +01:00
Emmanuel Gil Peyrot
c29fc39ef1
Remove JID cache, to better test for performance.
2015-06-20 01:12:03 +01:00
Emmanuel Gil Peyrot
04bff00171
XEP-0030: return the iq.send() future when sending a disco#info or disco#items.
2015-06-14 15:11:24 +01:00
Emmanuel Gil Peyrot
f3e31baf04
Properly consider malformed IPv6 domains as invalid.
2015-06-12 11:52:48 +01:00
mathieui
a2852eb249
Allow the use of a custom loop instead of asyncio.get_event_loop()
2015-05-12 00:02:32 +02:00
mathieui
f1e6d6b0a9
Advertize the disco#info feature in our disco#info
...
Actually a MUST in XEP-0030
2015-05-08 13:41:20 +02:00
Emmanuel Gil Peyrot
116a33ba51
Make syntax highlighting for XML lazy, to only call pygments when debug logs are enabled.
...
Makes poezio about 11% faster when sending/receiving messages.
2015-05-06 13:03:47 +02:00
mathieui
0305ce66b7
Merge branch 'ibb' of http://linkmauve.fr/git/slixmpp
2015-04-19 20:53:35 +02:00
Emmanuel Gil Peyrot
4415d3be1a
XEP-0047: use coroutines for send(), sendall() and the new sendfile().
2015-04-19 20:48:02 +02:00
Emmanuel Gil Peyrot
058c530787
XEP-0047: prevent any unneededly large or useless bytes slice.
2015-04-19 20:48:01 +02:00
Emmanuel Gil Peyrot
766d0dfd40
XEP-0047: use asyncio’s Queue implementation, to prevent any possibility of deadlock.
2015-04-19 20:48:01 +02:00
Emmanuel Gil Peyrot
ac31913a65
XEP-0047: make open_stream() return a future that will be set to the stream object.
2015-04-14 19:14:56 +02:00
Emmanuel Gil Peyrot
d34ddf33db
XEP-0047: replace threading events with simple booleans.
2015-04-14 19:14:56 +02:00
Emmanuel Gil Peyrot
eb4e09b0ca
XEP-0047: allow only one window over the stream.
2015-04-14 19:14:56 +02:00
Emmanuel Gil Peyrot
ce085bf4f4
XEP-0047: announce the correct stanza type if message is selected.
2015-04-14 19:14:56 +02:00
Emmanuel Gil Peyrot
990113f8e7
XEP-0047: return the correct error type on not-acceptable (example 5).
2015-04-14 19:14:56 +02:00
Emmanuel Gil Peyrot
aa022204ee
XEP-0047: don’t answer with an unauthorized error when block-size is too big.
2015-04-14 19:14:56 +02:00
Emmanuel Gil Peyrot
c1f23b566b
XEP-0047: remove now-useless threading locks.
2015-04-14 19:14:56 +02:00
Emmanuel Gil Peyrot
45f7cb8bda
XEP-0047: prevent tracebacks in stanza reading.
2015-04-14 19:14:56 +02:00
mathieui
bdb1f66ac9
basexmpp: Add a message_error event
...
The "message" event only receives messages with a body, and error
messages don’t necessarily have it. Removing the body requirement from
the "message" event could lean to unhandled conditions in existing code.
2015-04-13 15:08:04 +02:00
Emmanuel Gil Peyrot
d5b1904ebb
Use a full JID for testing.
2015-04-04 16:56:26 +02:00
Emmanuel Gil Peyrot
b6b0e82dec
Iq.send: set the timeout even when no timeout_callback is set
2015-04-04 16:48:30 +02:00
Emmanuel Gil Peyrot
632b7b4afe
XMLStream: add a forever parameter to process(), defaulting to True, to select whether we want to stop the event loop after a disconnection
2015-04-04 16:48:30 +02:00
Emmanuel Gil Peyrot
0ef3fa2703
XMLStream: factorize the highlight function so it can be used in tests as well
2015-03-02 17:10:27 +01:00
mathieui
8da269de88
Set XMLStream.socket after the SSL connection is made too
...
Fixes SCRAM-SHA-1-PLUS.
2015-02-28 20:32:33 +01:00
mathieui
93ce318259
XEP-0325: Don’t use threading
2015-02-28 19:05:22 +01:00
mathieui
997928de91
Revert or edit most previous XEP plugin changes
...
In a single commit, because it isn’t that interesting to detail each
change.
List of reverts:
Revert "XEP-0030: allow get_info and get_items to return a coroutine"
This reverts commit 506ca69917
.
Revert "XEP-0060: wrap all iq-sending functions with coroutine_wrapper"
This reverts commit e85fa4203e
.
Revert "XEP-0163: wrap publish() with coroutine_wrapper"
This reverts commit 69da1c1d7c
.
Revert "XEP-0084: wrap functions with coroutine_wrapper"
This reverts commit ea5615f236
.
Partially revert 3d243f7
(XEP-0054) - continue wrapping functions but with future_wrapper
Partially revert 115fe95
(xep-0153) - use callbacks rather than coroutine callbacks, and propagate iqtimeouts in set_avatar.
Revert "XEP-0049: wrap functions with coroutine_wrapper"
This reverts commit e68135f59f
.
Revert "XEP-0077: wrap functions with coroutine_wrapper"
This reverts commit 1e4944d47e
.
Partially revert cd7ff685
(XEP-0199) - remove the iq.send wrapping but keep ping() as a coroutine
Revert "XEP-0257: wrap functions with coroutine_wrapper"
This reverts commit 4da870fd19
.
Revert "XEP-0092: wrap get_version() with coroutine_wrapper"
This reverts commit 6e35948276
.
Revert "XEP-0191: wrap functions with coroutine_wrapper"
This reverts commit 6e8235544c
.
Revert "XEP-0280: wrap functions with coroutine_wrapper"
This reverts commit f795ac02e3
.
Revert "XEP-0012: wrap get_last_activity() with coroutine_wrapper"
This reverts commit 2ee05d9616
.
Revert "XEP-0202: wrap get_entity_time() with coroutine_wrapper"
This reverts commit 6fb3ecd414
.
Revert "XEP-0231: wrap get_bob() with coroutine_wrapper"
This reverts commit 17464b10a4
.
Revert "XEP-0258: wrap get_catalog() with coroutine_wrapper"
This reverts commit 18a4978456
.
Revert "XEP-0050: wrap send_command() and get_commands() with coroutine_wrapper"
This reverts commit e034b31d6b
.
Revert "XEP-0279: wrap check_ip() with coroutine_wrapper"
This reverts commit e112e86475
.
2015-02-28 19:02:49 +01:00
mathieui
bf5d7c83af
Change the API to make iq.send() always return a future
...
remove coroutine_wrapper, add a future_wrapper (which is only needed
when the result stanza can be cached).
Update the documentation as well.
2015-02-28 19:02:35 +01:00
mathieui
c66a4d4097
Update the documentation and examples
...
- update most of the examples with slixmpp
- change the help channels pointed out in the doc
- add a page listing differences from slixmpp and how to use asyncio
nicely with slixmpp
- fix some in-code rst documentation
2015-02-24 22:47:15 +01:00
mathieui
e112e86475
XEP-0279: wrap check_ip() with coroutine_wrapper
2015-02-24 22:46:08 +01:00
mathieui
e034b31d6b
XEP-0050: wrap send_command() and get_commands() with coroutine_wrapper
...
(if flow=True in send_command, the result will still be using the
default callbacks and the function will return None)
2015-02-24 22:46:07 +01:00
mathieui
18a4978456
XEP-0258: wrap get_catalog() with coroutine_wrapper
2015-02-24 22:46:07 +01:00
mathieui
17464b10a4
XEP-0231: wrap get_bob() with coroutine_wrapper
2015-02-24 22:46:07 +01:00
mathieui
6fb3ecd414
XEP-0202: wrap get_entity_time() with coroutine_wrapper
2015-02-24 22:46:07 +01:00
mathieui
c214e4f037
XEP-0084: fix setting and getting the Data value
...
get_value: return a bytes object
set_value: accept a bytes or a str object
2015-02-24 22:46:06 +01:00
mathieui
2ee05d9616
XEP-0012: wrap get_last_activity() with coroutine_wrapper
2015-02-24 22:46:06 +01:00
mathieui
f795ac02e3
XEP-0280: wrap functions with coroutine_wrapper
2015-02-24 22:46:06 +01:00
mathieui
6e8235544c
XEP-0191: wrap functions with coroutine_wrapper
2015-02-24 22:46:06 +01:00
mathieui
6e35948276
XEP-0092: wrap get_version() with coroutine_wrapper
2015-02-24 22:46:05 +01:00
mathieui
4da870fd19
XEP-0257: wrap functions with coroutine_wrapper
2015-02-24 22:46:05 +01:00
mathieui
cd7ff685fb
XEP-0199: wrap functions with coroutine_wrapper and make ping() a coroutine
2015-02-24 22:46:05 +01:00
mathieui
1e4944d47e
XEP-0077: wrap functions with coroutine_wrapper
2015-02-24 22:46:05 +01:00
mathieui
e68135f59f
XEP-0049: wrap functions with coroutine_wrapper
2015-02-24 22:46:04 +01:00
mathieui
6408c5a747
XEP-0115: fix a handler which expected an iq to block
2015-02-24 22:46:04 +01:00
mathieui
115fe954ac
XEP-0153: wrap functions with coroutine_wrapper
2015-02-24 22:46:04 +01:00
mathieui
3d243f7da5
XEP-0054: wrap functions with coroutine_wrapper
2015-02-24 22:46:04 +01:00
mathieui
ea5615f236
XEP-0084: wrap functions with coroutine_wrapper
2015-02-24 22:46:04 +01:00
mathieui
69da1c1d7c
XEP-0163: wrap publish() with coroutine_wrapper
2015-02-24 22:46:03 +01:00
mathieui
e85fa4203e
XEP-0060: wrap all iq-sending functions with coroutine_wrapper
2015-02-24 22:46:03 +01:00
mathieui
506ca69917
XEP-0030: allow get_info and get_items to return a coroutine
2015-02-24 22:46:03 +01:00
mathieui
8ac0ecdf40
Fix dns resolution without aiodns
...
(use loop.getaddrinfo instead of the blocking version)
2015-02-24 19:17:45 +01:00
mathieui
dbd8115557
Remove the filesocket shim (2.6 compatibility)
2015-02-24 19:08:12 +01:00
mathieui
74b4ea20bf
Add back stanza-specific exception handlers
...
(fixes the test suite too)
2015-02-23 17:43:35 +01:00
mathieui
11fbaa4241
Import xmlstream.asyncio and coroutine_wrapper at the top level
...
Since they will be used quite a lot in plugins.
2015-02-23 17:32:39 +01:00
mathieui
8fd0d7c993
Add a coroutine_wrapper decorator
...
This decorator checks for the coroutine=True keyword arg and wraps the
result of the function call in a coroutine if it isn’t.
This allows to have constructs like:
@coroutine_wrapper
def toto(xmpp, *, coroutine=False):
if xmpp.cached:
return xmpp.cached
else:
return xmpp.make_iq_get().send(coroutine=coroutine)
@asyncio.coroutine
def main(xmpp):
result = yield from toto(xmpp, coroutine=True)
xmpp.cached = result
result2 = yield from toto(xmpp, coroutine=True)
If the wrapper wasn’t there, the second fetch would fail. This decorator
does not do anything if the coroutine argument is False.
2015-02-23 17:32:31 +01:00
mathieui
1450d36377
Add a coroutine parameter to iq.send() to return a coroutine
...
(instead of exposing a different send_coroutine method)
2015-02-23 17:20:47 +01:00
mathieui
06358d0665
Use CallbackCoroutine with Iq callbacks too
2015-02-22 20:13:48 +01:00
mathieui
2b3b86e281
Allow event handlers to be coroutine functions
...
And do not copy data when running events with XMLStream.event()
2015-02-22 14:17:17 +01:00
mathieui
92e4bc752a
Add a “blocking” send_coroutine method to the Iq class
2015-02-21 23:45:30 +01:00
mathieui
ffb2e05f21
Check that ciphers have been initialized
...
(if not, python will use the system default)
2015-02-17 04:27:03 +01:00
mathieui
1e2665df19
Update the test suite.
...
- monkey-patch our own monkey-patched idle_call to run events immediatly
rather than adding them to the event queue, and add a fake transport
with a fake socket.
- remove the test file related to xep_0059 as it relies on blocking
behavior, and comment out one xep_0030 test uses xep_0059
- remove many instances of threading and sleep()s because they do
nothing except waste time and introduce race conditions.
- keep exactly two sleep() in IoT xeps because they rely on timeouts
2015-02-12 12:23:47 +01:00
mathieui
4d063e287e
Remove more threaded= and block= options from the plugins
...
(also, correct a typo)
2015-02-12 12:21:20 +01:00
mathieui
44f02fb3ab
Do the plugins post_init() upload loading
...
(the top_level boolean used to load them at this point wasn’t ever set
to true)
2015-02-12 12:18:32 +01:00
mathieui
f6b3a0c6cf
Fix the uses of stanza.reply()
...
This is relying on the stanzas being copied for each handler. We no
longer do that for performance reasons, so instead of editing the copy
in-place, stanza.reply() now returns a new stanza.
2015-02-12 12:17:01 +01:00
mathieui
8b36e918e8
Fix the componentxmpp interface
2015-02-12 12:11:50 +01:00
Florent Le Coz
957c635fb7
XMLStream must provide the BaseProtocol interface
2015-02-04 17:49:30 +01:00
mathieui
4027927c6e
Don’t set the msg['from'] and msg['id'] in receipt.ack()
...
setting msg['id'] is wrong, and setting msg['from'] might lead to
echoing back wrong input.
2015-02-04 16:49:39 +01:00
mathieui
62eefdbd6a
Expose MUC support in disco#info
...
http://xmpp.org/extensions/xep-0045.html#disco-client
2015-01-15 22:50:49 +01:00
Florent Le Coz
225e07eb64
Fix the call of iscoroutinefunction()
2015-01-05 11:36:24 +01:00
Florent Le Coz
1207c81ab5
Do not copy the stanza before calling each handler
2015-01-03 18:42:57 +01:00
Florent Le Coz
565da65ccd
Use a deque for the idle list
2015-01-03 16:13:39 +01:00
Florent Le Coz
47fbd4cead
Delay the handling of stanza for when the process is not busy
...
We use some dirty monkey-patching to add a idle_call() function to the
asyncio module. We then use that method to handle each received stanza only
when the event loop is not busy with some other IO (mainly, the standard
input)
2015-01-03 06:08:03 +01:00
mathieui
1b9b4199e8
Make the ca_certs option useful again (CA-based cert validation)
...
It was broken since the fork.
2014-12-17 19:03:49 +01:00
mathieui
b5930ca958
Bring back authentication through SASL EXTERNAL
...
(and only update the ssl context before it gets used)
2014-12-11 19:27:13 +01:00
mathieui
423974f90d
Fix xep-0257 for slixmpp, and fix an element name
2014-12-11 14:46:52 +01:00
Florent Le Coz
5fcf08a415
Lower the timeout for each DNS resolution attempt
2014-11-14 01:13:52 +01:00
mathieui
3c06568ed5
Let loop.create_connection do its getaddrinfo coroutine if there are no dns records left/available
2014-11-12 22:22:20 +01:00
Florent Le Coz
68e35e631a
Also work without SRV records
2014-11-05 01:11:44 +01:00
Florent Le Coz
b5c98ba99e
Fix default value of dns_answers to None (instead of [])
2014-11-02 17:44:41 +01:00
mathieui
711f8dc6af
Use aiodns instead of dnspython to query DNS records
2014-11-02 17:26:29 +01:00
mathieui
5b41fb98de
Add the ssl_cert and ssl_invalid_chain back
...
- hack the stdlib to get the peercert, remove that hack when http://bugs.python.org/issue22768 gets fixed
2014-10-30 19:51:30 +01:00