a2ccdb2378
🔄 Sync local code
2022-01-11 22:35:38 +08:00
Dan
626a1bd938
Update copyright year
2022-01-07 10:23:45 +01:00
Dan
8c8288412f
Various improvements
2022-01-07 10:18:51 +01:00
Dan
a3fab6af4b
Merge branch 'mtproto-checks'
...
# Conflicts:
# pyrogram/errors/__init__.py
# pyrogram/session/session.py
2021-12-24 16:28:29 +01:00
Dan
56e7e11037
Use a specialized exception for handling BadMsgNotification
2021-12-22 14:01:05 +01:00
Dan
8aa358129c
Use specialized exceptions for handling security checks
2021-12-16 21:38:24 +01:00
Dan
ed9c7e4694
Simplify the error handling a bit
2021-12-15 19:26:54 +01:00
Dan
2a1af2b8e9
Close and reestablish the TCP connection in case of mismatch
2021-12-15 16:02:39 +01:00
Dan
cd027b8c1c
Implement missing MTProto checks
2021-12-15 13:18:13 +01:00
Dan
54350dc943
Merge branch 'handle-503-timeout'
2021-04-26 15:32:07 +02:00
Dan
3c81006b40
Merge branch 'media-servers'
2021-04-26 15:31:08 +02:00
Dan
c5624c639b
Cleaner error message
2021-04-15 12:17:25 +02:00
Dan
0c814e9e5e
Add support for media DC IPs
2021-04-13 15:53:53 +02:00
Dan
70ae12eb77
Handle ServiceUnavailable errors
...
#664
2021-04-12 09:21:20 +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
Dan
a8a9a1ac1f
Also print the exception type when logging query issues
...
Use "repr(e)" instead of "e" alone (i.e "str(e)") because sometimes
builtin exceptions have no message (for example: OSError, TimeoutError)
2020-12-27 21:08:01 +01:00
Dan
8b3e1ce9cc
Make generating new salts independent of the system clock
...
Closes #553
2020-12-12 16:46:40 +01:00
Dan
844e53a70e
Move crypto calls to threads in case of big enough chunks
2020-12-07 19:16:46 +01:00
Dan
76985faa11
Evaluate debug raw data only when actually needed
...
#541
2020-11-20 01:53:19 +01:00
Dan
582e29dece
Allow passing sleep_threshold=0 to always raise flood waits
2020-08-27 10:59:28 +02:00
Dan
7c987889f0
Add sleep_threshold parameter to send() method
...
- Decrease the default sleep threshold from 60 to 10 seconds
- Use a higher sleep threshold for generator methods
2020-08-26 09:01:01 +02:00
Dan
fbded4e23b
Fix time going out of sync when starting new sessions
2020-08-22 11:26:11 +02: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
7df85e2039
Show more relevant information when DEBUG logs are enabled
...
Show exactly what is being sent and received
2020-06-02 13:05:26 +02:00
Dan
128ab4b0b9
Move the automatic sleep mechanism down to Session
2020-05-07 13:38:22 +02:00
Dan
1996fb1481
Update Copyright
2020-03-21 15:43:32 +01:00
Dan
2bf6357bad
Show more meaningful errors for wrapped queries
2020-02-01 15:19:05 +01:00
Dan
42c9bafa0c
Update copyright notice
2020-02-01 14:04:33 +01:00
Dan
1a7d0b1b7e
Update Storage API usages in client.py, auth.py and session.py
2019-09-14 19:57:20 +02: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
4b914662ef
Log the reason why a query ought to be re-tried
2019-08-13 13:20:21 +02:00
Dan
aa135ea457
Reformat project
2019-08-01 19:11:43 +02:00
Dan
72b7a53ff5
Log to warning only in the last attempt
2019-07-25 11:15:56 +02:00
Dan
682591ea8f
Update Auth and Session to accommodate Storage Engines
2019-06-19 16:02:29 +02:00
Dan
142d5ab335
Merge branch 'develop' into session_storage
...
# Conflicts:
# pyrogram/client/client.py
# pyrogram/client/ext/base_client.py
# pyrogram/client/ext/syncer.py
# pyrogram/client/methods/contacts/get_contacts.py
2019-06-15 23:52:34 +02:00
Dan
d5517f4d5f
Rename Object to TLObject
2019-06-03 14:19:50 +02:00
Dan
48a5da8958
Let FutureSalt(s) attributes be plain integer instead of datetime values
2019-05-31 16:36:20 +02:00
bakatrouble
952f0627f1
Merge branch 'develop' into session_storage
...
# Conflicts:
# pyrogram/client/client.py
# pyrogram/client/ext/base_client.py
# pyrogram/client/ext/syncer.py
# pyrogram/client/style/html.py
# pyrogram/client/style/markdown.py
2019-04-14 21:49:45 +03:00
Dan
b5c6db6db0
Refactor project and move errors namespace out from pyrogram.api
2019-03-25 11:23:45 +01:00
Dan
34b51b6481
Force keyword arguments for all TL types
2019-03-16 16:53:52 +01:00
Dan
e42599051c
Use a lower timeout when starting a session to speed up re-connections
...
Sometimes the server drops right after a successful connection and
pyrogram keeps waiting up 15 seconds (current WAIT_TIMEOUT) for the
first query to time out and start again a new connection.
2019-03-03 16:50:25 +01:00
bakatrouble
5dc33c6337
add in-memory session storage, refactor session storages, remove mixin
2019-02-22 03:37:19 +03:00
Dan
4d7b1bafac
Update copyright year
2019-01-01 12:36:16 +01:00
Dan
e7a85520f2
Merge remote-tracking branch 'origin/develop' into develop
...
# Conflicts:
# pyrogram/client/client.py
2018-09-17 15:59:49 +02:00
Dan
b619818c40
Clear recv_queue on session stop. Fixes #103
2018-09-03 16:35:22 +02:00
Dan
b845544e63
Info log device and system parameters
2018-08-28 12:39:14 +02:00
Dan
f50638772c
Minor fix: update info log
2018-08-28 12:38:02 +02:00