Emmanuel Gil Peyrot
df4012e66d
XMLStream: Break a long line to make it more readable.
2016-12-29 18:41:09 +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
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
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
Gasper Zejn
eccd7f1c98
Provide domain name to loop.create_connection if using SSL.
2016-08-12 15:32:42 +02:00
mathieui
1100ff1feb
Reset the DNS answers after a connection is made succesfully
2015-09-25 19:34:04 +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
f9c7fa92ea
Reset the connect future after a disconnect
2015-08-08 17:34:05 +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
a2852eb249
Allow the use of a custom loop instead of asyncio.get_event_loop()
2015-05-12 00:02:32 +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
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
74b4ea20bf
Add back stanza-specific exception handlers
...
(fixes the test suite too)
2015-02-23 17:43:35 +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
ffb2e05f21
Check that ciphers have been initialized
...
(if not, python will use the system default)
2015-02-17 04:27:03 +01:00
Florent Le Coz
957c635fb7
XMLStream must provide the BaseProtocol interface
2015-02-04 17:49:30 +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
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
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
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
mathieui
6da625dbdb
Make the "ciphers" option work again
2014-10-30 19:51:00 +01:00
mathieui
e862c47b8b
Remove the ssl_version option, as the defaults in python3.4 are sane
2014-10-30 19:49:26 +01:00
Emmanuel Gil Peyrot
6175cbcd99
Reintroduce XMLStream.process, making it run the asyncio event loop.
2014-09-01 02:47:08 +02:00
Emmanuel Gil Peyrot
ad70ffba59
Add pygments support to debug output.
2014-09-01 02:42:45 +02:00
Emmanuel Gil Peyrot
0e95015410
Remove sys.version_info checks for python2 and clean some imports.
2014-09-01 02:42:45 +02:00
Florent Le Coz
fa21e262c7
Add the 'connecting' event
2014-08-01 04:01:31 +02:00
Florent Le Coz
73edd42774
Fix the connection (and a few minor things) in xmlstream
2014-07-30 17:57:57 +02:00
Florent Le Coz
6c15d65107
And that
2014-07-23 17:40:08 +02:00
Florent Le Coz
e5af0597a6
Forgot to remove that
2014-07-23 17:17:41 +02:00
Florent Le Coz
74117453b5
Cleanup how events are run, they are always direct by definition now
2014-07-23 17:01:17 +02:00
Emmanuel Gil Peyrot
5611b30022
Use ".remove()" instead of "is in" followed by ".pop()"
2014-07-22 11:16:06 +02:00
Florent Le Coz
ede9dcd18f
An other cleanup of xmlstream.py
...
Remove some useless things (like handling signals, managing the threads,
etc), add some comment to recently added/fixed methods…
2014-07-22 02:58:34 +02:00
Florent Le Coz
d3b56a5d94
Remove unused RestartStream exception
2014-07-22 02:18:48 +02:00
Florent Le Coz
f5d4334963
Remove the now useless state machine
2014-07-21 20:40:45 +02:00
Florent Le Coz
5c769632e8
Make connect(), abort() and reconnect() work
...
All the auto_reconnect, connect_retry logic and that kind of stuf has been
entirely removed.
2014-07-21 20:34:20 +02:00
Florent Le Coz
373505f483
Clean a new bunch of stuf
2014-07-21 20:32:09 +02:00
Florent Le Coz
a2cad40f91
Remove the send_thread() function, and the stop threading.event
2014-07-21 17:50:56 +02:00
Florent Le Coz
c2f6f07776
Make xmlstream use an asyncio loop
...
Scheduled events, connection, TLS handshake (with STARTTLS), read and write
on the socket are all done using only asyncio.
A lot of threads, and thread-related (and thus useless) things still remain.
This is only a first step.
2014-07-20 20:46:03 +02:00
Florent Le Coz
5ab77c7452
Rename to slixmpp
2014-07-17 14:19:04 +02:00