Commit Graph

58 Commits

Author SHA1 Message Date
Dan
a3e46b4957 Cleanup connection info logs 2021-05-03 21:07:36 +02:00
Dan
0c814e9e5e Add support for media DC IPs 2021-04-13 15:53:53 +02:00
Dan
a48d27f501 Always run crypto-related functions in the dedicated thread 2021-01-02 18:45:43 +01:00
Dan
7dda167c09 Update copyright notice
Year 2021
2021-01-01 22:58:48 +01:00
Alisson Lauffer
1dc4df8cb1
Improve typing hints (#537)
* Change type1 or type2 to Union[type1, type2]

* Address @KunoiSayami suggestions

* Change Union[type1, None] to Optional[type1]

* Update PR with latest commit changes

* Address Dan suggestions
2020-12-20 17:05:17 +01:00
Dan
844e53a70e Move crypto calls to threads in case of big enough chunks 2020-12-07 19:16:46 +01:00
Dan
3c8f41b1d2 Add more verbose error in case of network issues 2020-12-07 19:11:26 +01:00
Dan
538f1e3972 Deep rewrite: preparing for v1.0
- Pyrogram core is now fully asynchronous
- Ditched Python 3.5, welcome 3.6 as minimum version.
- Moved all types to pyrogram.types
- Turned the Filters class into a module (filters)
- Moved all filters to pyrogram.filters
- Moved all handlers to pyrogram.handlers
- Moved all emoji to pyrogram.emoji
- Renamed pyrogram.api to pyrogram.raw
- Clock is now synced with server's time
- Telegram schema updated to Layer 117
- Greatly improved the TL compiler (proper type-constructor hierarchy)
- Added "do not edit" warning in generated files
- Crypto parts are executed in a thread pool to avoid blocking the event loop
- idle() is now a separate function (it doesn't deal with Client instances)
- Async storage, async filters and async progress callback (optional, can be sync too)
- Added getpass back, for hidden password inputs
2020-08-22 08:05:05 +02:00
CyanBook
c8c6faa96e
Change logging hierarchy for loading plugins (#451)
Loading plugins shouldn't be considered a warning
2020-08-21 07:28:27 +02:00
Dan
2ba921c84d Workaround the occasional delayed stop of a Client instance 2020-03-30 16:59:22 +02:00
Dan
1996fb1481 Update Copyright 2020-03-21 15:43:32 +01:00
Dan
42c9bafa0c Update copyright notice 2020-02-01 14:04:33 +01:00
Dan
a015f998fa Revert "Stop instantiating logger objects and directly use the logging module"
This reverts commit 792068d7
2019-09-08 19:24:06 +02:00
Dan
792068d7c8 Stop instantiating logger objects and directly use the logging module 2019-09-08 12:59:28 +02:00
Dan
4de203a81c Add information about test/production servers when logging connections 2019-08-13 13:18:51 +02:00
Dan
def3bdaa63 Reformat code 2019-03-16 17:51:37 +01:00
Dan
4d7b1bafac Update copyright year 2019-01-01 12:36:16 +01:00
Dan
03f57cd2af Use TCPAbridgedO as default connection mode 2018-11-05 17:33:12 +01:00
Dan
0c76774283 Reformat code 2018-11-02 10:26:59 +01:00
Dan
8ea556b65f Fix handling proxies with domain names 2018-09-22 14:44:12 +02:00
Dan
28abcaac50 Fix ipv6 with ipv4 proxies 2018-09-22 14:31:28 +02:00
Dan
84492fb942 Add an extra warning in case connection fails 2018-09-18 21:28:44 +02:00
Dan
05b3be1e88 Info log DC number on connection 2018-09-08 19:33:47 +02:00
Dan
43483a1ccd Remove info logs from protocol impls 2018-08-29 22:20:32 +02:00
Dan
ef9fc969d3 Info log connection settings 2018-08-29 22:20:00 +02:00
Dan
d38d23f46d Log in case connection fails (to test ipv6) 2018-06-13 13:39:06 +02:00
Dan
56748ff390 Make the underlying TCP protocol accept ipv6 addresses 2018-06-13 13:36:26 +02:00
Dan
efe26bcb19 Allow Connection to connect to ipv6 addresses 2018-06-13 13:35:41 +02:00
Dan
cc2c3509be Add TCPIntermediateO to Connection modes 2018-05-30 19:29:45 +02:00
Dan
98ebad3428 Add TCP Intermediate obfuscated protocol 2018-05-30 19:29:03 +02:00
Dan
55010e4f1f Add TCPAbridgedO to Connection modes 2018-05-29 12:20:42 +02:00
Dan
0866dfa1dd Make TCPAbridgedO importable 2018-05-28 19:58:36 +02:00
Dan
78aa7aea2a Add TCP Abridged obfuscated protocol 2018-05-28 19:57:57 +02:00
Dan
b04bce9dba Lower connection retries to 3 2018-05-25 14:26:01 +02:00
Dan
81d3d5956c Don't try to indefinitely reconnect at Connection layer 2018-05-25 12:37:03 +02:00
Dan
65c209000c Connection refactoring 2018-05-24 21:19:57 +02:00
Dan
1cd7e28b50 Rename TCP protocol impl files 2018-05-19 15:50:10 +02:00
Dan
c531e6d146 Rename protocol impl files 2018-05-18 13:47:47 +02:00
Dan
5f414626ef Refactor tcp_intermediate 2018-05-16 21:14:05 +02:00
Dan
64fe9163d2 Refactor tcp_abridged 2018-05-15 19:17:22 +02:00
Dan
6dcdeda244 Make proxy loading simpler 2018-04-13 12:30:13 +02:00
Dan
1736a8ea9b Use port 443 for production servers 2018-04-11 23:37:59 +02:00
Dan
42a2878842 Don't use sys.exit(), re-raise ImportError instead 2018-03-26 03:39:30 +02:00
Dan
52c482f1e4 Use a better error message 2018-03-26 02:03:36 +02:00
Dan
440654a63f Log info when disconnecting 2018-03-20 18:54:05 +01:00
Dan
8e538199ea Log info when using a proxy 2018-02-21 13:34:27 +01:00
Dan
5e6361defc Set socket timeout to 10s 2018-02-15 21:06:04 +01:00
Dan
bdfba51410 Revert "Switch back to port 443"
This reverts commit 89daf09
2018-01-30 13:35:23 +01:00
Dan
89daf09500 Switch back to port 443 2018-01-29 14:20:16 +01:00
Dan
4784ba53e1 Remove redundant code 2018-01-18 12:22:16 +01:00