Commit Graph

832 Commits

Author SHA1 Message Date
Lonami Exo
423efc4360 Fix optional vector arguments failing 2017-09-29 11:56:43 +02:00
Lonami Exo
3fda7efeb9 More friendly issue template 2017-09-28 12:20:56 +02:00
Lonami Exo
dc5bbc1719 Update to v0.14.1 2017-09-28 12:02:47 +02:00
Lonami Exo
cc337328c6 Rename handmade Message class to TLMessage to avoid confusion 2017-09-28 11:59:24 +02:00
Lonami Exo
71c2a82b3d Completely remove BinaryWriter from the project 2017-09-28 11:49:45 +02:00
Lonami Exo
2fd03e5422 Stop using BinaryWriter on MtProtoPlainSender 2017-09-28 11:43:06 +02:00
Lonami Exo
fe30f63d5d Use autogen code on the authenticator instead hardcoding requests 2017-09-28 11:36:51 +02:00
Lonami Exo
4bedbfe945 Use bytes instead string type on the auth-key methods 2017-09-28 10:32:57 +02:00
Lonami Exo
14791e1df1 Fix wrong type hint for int128 and int256 2017-09-28 10:12:39 +02:00
Lonami Exo
748c2560de Fix auto-generated code didn't actually write int128/int256 2017-09-28 10:12:15 +02:00
Lonami Exo
fb0898b9cb Don't distinguish between str and bytes when serializing
This makes it easier to use some requests like ReqPqRequest which
needs a string of bytes, not a valid utf-8 string per se.
2017-09-28 09:55:29 +02:00
Lonami Exo
1518be0b95 Use .appendleft(x) for deque instead .insert(0, x) (fix #268) 2017-09-28 09:30:47 +02:00
Lonami Exo
c667a00281 Avoid using BinaryWriter where possible 2017-09-27 21:23:59 +02:00
Lonami Exo
8a605f21e6 Remove BinaryWriter dependency on MessageContainer 2017-09-27 21:06:01 +02:00
Lonami Exo
833aeb86eb Fix auth_key is unsigned 2017-09-27 21:04:52 +02:00
Lonami Exo
bd3dd371a2 Create a proper Message class (msg_id, seqno, body; only .to_bytes()) 2017-09-27 21:01:20 +02:00
Lonami Exo
b0839a028e Update to v0.14 2017-09-27 13:51:59 +02:00
Lonami Exo
795cb98909 Move MessageContainer.on_send inside its .to_bytes 2017-09-27 13:49:58 +02:00
Lonami Exo
6df9fc558e Create and use a new GzipPacked class, also when sending 2017-09-27 13:46:53 +02:00
Lonami Exo
7b736aa6ef Fix MessageContainer having the wrong constructor id 2017-09-27 13:46:02 +02:00
Lonami Exo
efca981312 Fix adding a request twice (or container) to ._pending_receive 2017-09-27 13:26:35 +02:00
Lonami Exo
0c11967232 Remove unused .shaes attribute from CdnDecrypter 2017-09-27 12:11:16 +02:00
Lonami Exo
657e8a70c9 Fix CdnDecrypter incorrectly accessing clients' timeout (closes #265) 2017-09-27 12:08:37 +02:00
Lonami Exo
9b7733d6b9 Avoid the use of starred expressions on autogen code (fix #266) 2017-09-27 12:05:35 +02:00
Lonami Exo
98c2e1dd4f Replace 4 .append calls with a single one when serializing bytes 2017-09-26 14:41:11 +02:00
Lonami Exo
b83cd98ba0 Replace TLObject.on_send with the new .to_bytes()
This also replaces some int.to_bytes() calls with a faster
struct.pack (up to x4 faster). This approach is also around
x3 faster than creating a BinaryWriter just to serialize a
TLObject as bytes.
2017-09-26 14:36:02 +02:00
Lonami Exo
2bb26d6389 Modify setup.py to work even if generated code was wrong 2017-09-26 14:29:35 +02:00
Lonami Exo
f233110732 Allow sending several requests at once through new MessageContainer 2017-09-25 20:52:27 +02:00
Lonami Exo
b40708a8c7 Import get_input_* only once on the generated code 2017-09-25 14:05:13 +02:00
Lonami Exo
dc73744fc4 Add get_input_media calls on the generated code 2017-09-25 13:47:25 +02:00
Lonami Exo
1d50bba8bc Add get_input_* methods for Media and such 2017-09-25 13:43:03 +02:00
Lonami Exo
edcd23f94c Making timeout when reporting an error shorter 2017-09-25 12:00:09 +02:00
Lonami Exo
493f5cec1f Fix-up target method typo 2017-09-25 11:57:42 +02:00
Lonami Exo
01c91bb895 Report errors in the background not to interfer with users (#262) 2017-09-25 11:56:44 +02:00
Lonami Exo
c0ee123156 Add a small sleep when trying to reconnect forever 2017-09-25 11:04:09 +02:00
Lonami Exo
9787fb8c46 Add and copy 404.html to the generated docs 2017-09-24 13:40:54 +02:00
Lonami Exo
d5ba259d4e Ensure the working directory is unaltered after generating docs 2017-09-23 21:02:32 +02:00
Lonami Exo
40d80f73ee Enhance docs search to show namespaces if names clash 2017-09-23 21:01:49 +02:00
Lonami Exo
56302552fb Fix formatting URLs on the documentation failing for types 2017-09-23 21:01:06 +02:00
Lonami Exo
d0e66c104a Fix generating documentation failing on root directory 2017-09-23 21:00:01 +02:00
Lonami Exo
1593a4415e Fix None datetime being type hinted as invalid 2017-09-23 20:07:40 +02:00
Lonami Exo
0f10e1419f Update to v0.13.6 2017-09-23 11:44:04 +02:00
Lonami Exo
b04607e7ba Ignore requests invoked from ReadThread instead raising
Any unhandled exception on the ReadThread would cause it to stop,
and handling the exception to the main thread on the next invoke
or poll. Instead causing the thread to stop, simply ignore it.
2017-09-23 11:31:58 +02:00
Lonami Exo
80e9877256 Show the type of children TLObjects on .stringify() 2017-09-23 11:01:25 +02:00
Lonami Exo
5701029fbf Stop treating .to_dict() with no args as a special case 2017-09-23 10:59:08 +02:00
Lonami Exo
0b48b1ec8a Add support for non-recursive TLObject.to_dict() 2017-09-23 10:41:36 +02:00
Andrey Egorov
73fbfde7ef Process messages without pts 2017-09-22 23:14:31 +02:00
Lonami Exo
f39f9c33a0 Fix timeout on confirm_received.wait not being added (fix #257) 2017-09-22 19:20:37 +02:00
Lonami Exo
9ce4307304 Update to v0.13.5 2017-09-22 16:12:43 +02:00
Lonami Exo
b0f6b23e52 Fix creating new connections accessing invalid attributes 2017-09-22 16:11:07 +02:00