mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Bump to v1.33
This commit is contained in:
parent
1ef66896bd
commit
985d12e169
|
@ -13,6 +13,27 @@ it can take advantage of new goodies!
|
|||
|
||||
.. contents:: List of All Versions
|
||||
|
||||
New layer (v1.33)
|
||||
=================
|
||||
|
||||
+------------------------+
|
||||
| Scheme layer used: 167 |
|
||||
+------------------------+
|
||||
|
||||
`View new and changed raw API methods <https://diff.telethon.dev/?from=166&to=167>`__.
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* ``webbrowser`` is now imported conditionally, to support niche environments.
|
||||
* Library should now retry on the suddenly-common ``TimedOutError``.
|
||||
|
||||
Bug fixes
|
||||
~~~~~~~~~
|
||||
|
||||
* Sending photos which were automatically resized should work again (included in the v1.32 series).
|
||||
|
||||
|
||||
New layer (v1.32)
|
||||
=================
|
||||
|
||||
|
|
3
setup.py
3
setup.py
|
@ -180,8 +180,9 @@ def main(argv):
|
|||
# Try importing the telethon module to assert it has no errors
|
||||
try:
|
||||
import telethon
|
||||
except:
|
||||
except Exception as e:
|
||||
print('Packaging for PyPi aborted, importing the module failed.')
|
||||
print(e)
|
||||
return
|
||||
|
||||
remove_dirs = ['__pycache__', 'build', 'dist', 'Telethon.egg-info']
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Versions should comply with PEP440.
|
||||
# This line is parsed in setup.py:
|
||||
__version__ = '1.32.1'
|
||||
__version__ = '1.33.0'
|
||||
|
|
|
@ -96,7 +96,12 @@ class TLArg:
|
|||
:param generic_definition: Is the argument a generic definition?
|
||||
(i.e. {X:Type})
|
||||
"""
|
||||
self.name = 'is_self' if name == 'self' else name
|
||||
if name == 'self':
|
||||
self.name = 'is_self'
|
||||
elif name == 'from':
|
||||
self.name = 'from_'
|
||||
else:
|
||||
self.name = name
|
||||
|
||||
# Default values
|
||||
self.is_vector = False
|
||||
|
@ -204,17 +209,21 @@ class TLArg:
|
|||
return real_type
|
||||
|
||||
def __str__(self):
|
||||
name = self.orig_name()
|
||||
if self.generic_definition:
|
||||
return '{{{}:{}}}'.format(self.name, self.real_type())
|
||||
return '{{{}:{}}}'.format(name, self.real_type())
|
||||
else:
|
||||
return '{}:{}'.format(self.name, self.real_type())
|
||||
return '{}:{}'.format(name, self.real_type())
|
||||
|
||||
def __repr__(self):
|
||||
return str(self).replace(':date', ':int').replace('?date', '?int')
|
||||
|
||||
def orig_name(self):
|
||||
return self.name.replace('is_self', 'self').strip('_')
|
||||
|
||||
def to_dict(self):
|
||||
return {
|
||||
'name': self.name.replace('is_self', 'self'),
|
||||
'name': self.orig_name(),
|
||||
'type': re.sub(r'\bdate$', 'int', self.real_type())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user