Commit Graph

17 Commits

Author SHA1 Message Date
Jonathan
73a1fee28a
Fix stackable plugin decorators with include/exclude directives (#643)
* combination of decorators with plugins has solved

* fixing last pr: allow stackable plugin decorators even in exclude and include as well.

* counting plugins has fixed

* fix indentation

* Update client.py

* Update client.py

Co-authored-by: Dan <14043624+delivrance@users.noreply.github.com>
2021-03-18 11:34:36 +01:00
Jonathan
f0b1cc41f3
Allow decorators in plugins to be stacked (#642)
This allows registering the same callback function more than once by using different handlers.
2021-03-17 20:07:54 +01:00
Dan
d7f2bd9030 Fix some index out of range errors
Closes #601
2021-02-27 19:02:52 +01:00
Dan
7dda167c09 Update copyright notice
Year 2021
2021-01-01 22:58:48 +01:00
Dan
820fe2cbcd Fix thumbnail downloads 2021-01-01 22:21:06 +01:00
Dan
18b3ca1892 Simplify mime types guessing and remove unused code 2020-12-20 17:58:35 +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
521e403f92 Fix peer ids decoding from file ids 2020-12-07 19:15:46 +01:00
Dan
a4566de2ef Add support for the new Bot API fields: file_id, file_unique_id
Remove file_ref from Pyrogram's API
2020-11-27 22:09:17 +01:00
Dan
4632879ee4 Changes for L119 2020-09-30 20:26:57 +02:00
Dan
ae88c851bb Fix sync callback progress not working properly for downloads
- Reduce duplicated code
- Fixes #484
2020-09-05 12:44:48 +02:00
Dan
be62ac365f Use a reasonable sleep threshold when downloading files 2020-08-30 22:19:55 +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
ebf222bbb7 Add the parameter hide_password to Client 2020-08-26 08:12:11 +02:00
Dan
65b5229fe8 Use inspect's iscoroutinefunction, not asyncio's 2020-08-25 09:32:39 +02:00
Dan
303712f599 Update docs 2020-08-22 16:09:38 +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