Compare commits

..

16 Commits

Author SHA1 Message Date
leandrotoledo 7f790c3cb2 Releasing v2.8.2 2015-09-04 23:23:41 -03:00
leandrotoledo 30749c3b66 Merging testing 2015-09-04 23:21:31 -03:00
leandrotoledo 8f0447156b Merge branch 'testing' 2015-09-04 23:20:31 -03:00
leandrotoledo df000f8086 Fix regression on ReplyMarkup and add certificate to is_inputfile method 2015-09-04 23:20:14 -03:00
Leandro Toledo 3d835527e0 Update README.rst 2015-09-04 23:07:03 -03:00
Leandro Toledo 323052a6c9 Update README.rst 2015-09-04 23:05:14 -03:00
Leandro Toledo ef4871cce1 Update README.rst 2015-09-04 19:14:54 -03:00
leandrotoledo f355af1d2b Restoring new features after rebase 2015-09-04 19:11:31 -03:00
leandrotoledo 121e365348 Oops, restoring file on testing 2015-09-04 19:07:20 -03:00
leandrotoledo 82f1d18f4b Releasing v2.8.1 2015-09-04 19:00:54 -03:00
leandrotoledo 79cdb6cafe Adding test to check if thumbs are PhotoSize instances 2015-09-04 18:58:48 -03:00
leandrotoledo 49ff02dcf4 Fix regression on Telegram objects with thumb properties 2015-09-04 18:50:26 -03:00
leandrotoledo be23ff5d29 Fix codeclimate 2015-09-04 18:35:35 -03:00
leandrotoledo 72a7355c2f Fix codeclimate 2015-09-04 18:33:51 -03:00
leandrotoledo 64cf9ed941 Fix codeclimate 2015-09-04 18:29:37 -03:00
leandrotoledo bb84113272 Releasing 2.8 2015-09-04 18:19:05 -03:00
13 changed files with 52 additions and 16 deletions
+5
View File
@@ -0,0 +1,5 @@
languages:
Python: true
exclude_paths:
- "telegram/emoji.py"
- "tests/*"
+20
View File
@@ -1,3 +1,23 @@
2015-09-05
Released 2.8.2
Fix regression on Telegram ReplyMarkup
Add certificate to is_inputfile method
2015-09-05
Released 2.8.1
Fix regression on Telegram objects with thumb properties
2015-09-04
Released 2.8
TelegramError when chat_id is empty for send* methods
setWebhook now supports sending self-signed certificate
Huge redesign of existing Telegram classes
Added support for PyPy
Added docstring for existing classes
2015-08-19
Released 2.7.1
Fixed JSON serialization for message
+9 -7
View File
@@ -7,15 +7,15 @@ By `Leandro Toledo <leandrotoledodesouza@gmail.com>`_
.. image:: https://img.shields.io/pypi/v/python-telegram-bot.svg
:target: https://pypi.python.org/pypi/python-telegram-bot
:alt: PyPi Package Version
.. image:: https://img.shields.io/pypi/dm/python-telegram-bot.svg
:target: https://pypi.python.org/pypi/python-telegram-bot
:alt: PyPi Package Monthly Download
.. image:: https://readthedocs.org/projects/python-telegram-bot/badge/?version=latest
:target: https://readthedocs.org/projects/python-telegram-bot/?badge=latest
:alt: Documentation Status
.. image:: https://img.shields.io/github/license/leandrotoledo/python-telegram-bot.svg
:target: http://www.gnu.org/licenses/lgpl-3.0.html
:alt: LGPLv3 License
@@ -27,7 +27,7 @@ By `Leandro Toledo <leandrotoledodesouza@gmail.com>`_
.. image:: https://codeclimate.com/github/leandrotoledo/python-telegram-bot/badges/gpa.svg
:target: https://codeclimate.com/github/leandrotoledo/python-telegram-bot
:alt: Code Climate
.. image:: https://coveralls.io/repos/leandrotoledo/python-telegram-bot/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/leandrotoledo/python-telegram-bot?branch=master
:alt: Coveralls
@@ -55,7 +55,7 @@ Table of contents
2. `Logging`_
3. `Examples`_
4. `Documentation`_
- `License`_
@@ -108,6 +108,8 @@ Python Version *Supported?*
2.7 Yes
3.3 Yes
3.4 Yes
PyPy Yes
PyPy3 Yes
============== ============
=============
@@ -262,9 +264,9 @@ You may copy, distribute and modify the software provided that modifications are
_`Contact`
==========
Feel free to join to our `Telegram group <https://telegram.me/joinchat/00b9c0f802509b94d52953d3fa1ec504>`_.
Feel free to join to our `Telegram group <https://telegram.me/joinchat/00b9c0f802509b946b2e8e98b73e19be>`_.
*If you face trouble joining in the group please ping me on Telegram (@leandrotoledo), I'll be glad to add you.*
If you face trouble joining in the group please ping me `via Telegram <https://telegram.me/leandrotoledo>`_, I'll be glad to add you.
=======
_`TODO`
+2 -2
View File
@@ -58,9 +58,9 @@ author = u'Leandro Toledo'
# built documents.
#
# The short X.Y version.
version = '2.5'
version = '2.8'
# The full version, including alpha/beta/rc tags.
release = '2.5.1'
release = '2.8.2'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
+1 -1
View File
@@ -15,7 +15,7 @@ def read(*paths):
setup(
name='python-telegram-bot',
version='2.7.1',
version='2.8.2',
author='Leandro Toledo',
author_email='leandrotoledodesouza@gmail.com',
license='LGPLv3',
+1 -1
View File
@@ -19,7 +19,7 @@
"""A library that provides a Python interface to the Telegram Bot API"""
__author__ = 'leandrotoledodesouza@gmail.com'
__version__ = '2.7.1'
__version__ = '2.8.2'
from .base import TelegramObject
from .user import User
+2
View File
@@ -65,4 +65,6 @@ class Document(TelegramObject):
if not data:
return None
data['thumb'] = PhotoSize.de_json(data.get('thumb'))
return Document(**data)
-1
View File
@@ -57,4 +57,3 @@ class ForceReply(ReplyMarkup):
return None
return ForceReply(**data)
+2 -1
View File
@@ -171,7 +171,8 @@ class InputFile(object):
bool
"""
if data:
file_types = ['audio', 'document', 'photo', 'video', 'voice']
file_types = ['audio', 'document', 'photo', 'video', 'voice',
'certificate']
file_type = [i for i in list(data.keys()) if i in file_types]
if file_type:
-3
View File
@@ -27,6 +27,3 @@ class ReplyMarkup(TelegramObject):
@staticmethod
def de_json(data):
pass
def to_dict(self):
pass
+2
View File
@@ -67,4 +67,6 @@ class Sticker(TelegramObject):
if not data:
return None
data['thumb'] = PhotoSize.de_json(data.get('thumb'))
return Sticker(**data)
+2
View File
@@ -74,4 +74,6 @@ class Video(TelegramObject):
if not data:
return None
data['thumb'] = PhotoSize.de_json(data.get('thumb'))
return Video(**data)
+6
View File
@@ -185,6 +185,7 @@ class BotTest(unittest.TestCase):
self.assertTrue(self.is_json(message.to_json()))
self.assertEqual(message.document.file_size, 12948)
self.assertTrue(isinstance(message.document.thumb, telegram.PhotoSize))
def testSendGIFURLDocument(self):
'''Test the telegram.Bot sendDocument method'''
@@ -203,6 +204,7 @@ class BotTest(unittest.TestCase):
self.assertTrue(self.is_json(message.to_json()))
self.assertEqual(message.document.file_id, 'BQADAQADHAADNTwtBxZxUGKyxYbYAg')
self.assertTrue(isinstance(message.document.thumb, telegram.PhotoSize))
def testSendVideo(self):
'''Test the telegram.Bot sendVideo method'''
@@ -214,6 +216,8 @@ class BotTest(unittest.TestCase):
self.assertTrue(self.is_json(message.to_json()))
self.assertEqual(message.video.file_size, 326534)
self.assertEqual(message.caption, 'testSendVideo')
if message.video.thumb:
self.assertTrue(isinstance(message.video.thumb, telegram.PhotoSize))
def testResendVideo(self):
'''Test the telegram.Bot sendVideo method'''
@@ -223,6 +227,7 @@ class BotTest(unittest.TestCase):
self.assertTrue(self.is_json(message.to_json()))
self.assertEqual(message.video.duration, 4)
self.assertTrue(isinstance(message.video.thumb, telegram.PhotoSize))
def testResendSticker(self):
'''Test the telegram.Bot sendSticker method'''
@@ -232,6 +237,7 @@ class BotTest(unittest.TestCase):
self.assertTrue(self.is_json(message.to_json()))
self.assertEqual(message.sticker.file_size, 39518)
self.assertTrue(isinstance(message.sticker.thumb, telegram.PhotoSize))
def testSendLocation(self):
'''Test the telegram.Bot sendLocation method'''