Commit Graph

18 Commits

Author SHA1 Message Date
餅喵
4d933b80f9
Fix TL schema naming conflicts (#690)
* Avoid variable conflicts with Telegram TL schema

* Fix game button with no data attached to button

* Update combinator.txt

* Update compiler.py

* Update tl_object.py

Co-authored-by: Dan <14043624+delivrance@users.noreply.github.com>
2021-08-28 10:01:12 +02:00
Dan
22d9077e2b Warn users in case they try to use base types as arguments 2020-08-29 15:12:45 +02:00
Dan
d385aae1d2 Types don't need to inherit from TLObject 2020-08-27 14:20:30 +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
Dan
d5517f4d5f Rename Object to TLObject 2019-06-03 14:19:50 +02:00
Dan
6bd9ddc95e Add __slots__ to Telegram TL types 2019-03-16 15:30:55 +01:00
Dan
c7b1d6f70a Take into account that flags:# could be not always the first argument
For instance, in Layer 91, Poll's flags:# is at the second position.
This mess also happened in the past (thanks tg devs) and eventually will
be fixed again with the next Layer update, but from now on Pyrogram
will be able to correctly generate code even in such cases.
2019-01-05 15:40:40 +01:00
Dan
e066d6740c Revert "Move ids at the top"
This reverts commit c65706f
2018-04-28 09:05:44 +02:00
Dan
c65706f41e Move ids at the top 2018-04-25 12:43:36 +02:00
Dan
6e78935857 Accommodate the new types 2018-04-24 16:08:33 +02:00
Dan
124ec40300 Inherit again from Object 2018-04-03 10:54:29 +02:00
Dan
44a3a4d69b Add pyrogram.txt template 2018-04-01 13:08:37 +02:00
Dan
74d1d99697 Update compiler 2018-03-26 13:51:56 +02:00
Dan
ef71dcf56a Remove **kwargs for generated classes (function/types) 2018-03-23 13:46:43 +01:00
Dan
310adbb76f Add docstrings for generated code 2018-01-03 17:40:38 +01:00
Dan
cb509ba4db Accept optional keyword arguments 2017-12-06 21:27:57 +01:00
Dan
fb4ae4b17e Fix method signatures for generated classes 2017-12-06 19:31:30 +01:00
Dan
28704b9326 Add API compiler 2017-12-05 12:16:39 +01:00