Bump version to v6.0.0

This commit is contained in:
Jannes Höke 2017-05-19 21:49:01 +02:00
parent 5dd3a660e3
commit 6479e15578
8 changed files with 33 additions and 15 deletions

View file

@ -2,6 +2,27 @@
Changes
=======
**2017-05-19**
*Released 6.0.0*
- Add support for Bot API 2.3.1
- Add support for ``deleteMessage`` API method
- New, simpler API for ``JobQueue`` - https://github.com/python-telegram-bot/python-telegram-bot/pull/484
- Download files into file-like objects - https://github.com/python-telegram-bot/python-telegram-bot/pull/459
- Use vendor ``urllib3`` to address issues with timeouts
- The default timeout for messages is now 5 seconds. For sending media, the default timeout is now 20 seconds.
- String attributes that are not set are now ``None`` by default, instead of empty strings
- Add ``text_markdown`` and ``text_html`` properties to ``Message`` - https://github.com/python-telegram-bot/python-telegram-bot/pull/507
- Add support for Socks5 proxy - https://github.com/python-telegram-bot/python-telegram-bot/pull/518
- Add support for filters in ``CommandHandler`` - https://github.com/python-telegram-bot/python-telegram-bot/pull/536
- Add the ability to invert (not) filters - https://github.com/python-telegram-bot/python-telegram-bot/pull/552
- Add ``Filters.group`` and ``Filters.private``
- Compatibility with GAE via ``urllib3.contrib`` package - https://github.com/python-telegram-bot/python-telegram-bot/pull/583
- Add equality rich comparision operators to telegram objects - https://github.com/python-telegram-bot/python-telegram-bot/pull/604
- Several bugfixes and other improvements
- Remove some deprecated code
**2017-04-17**
*Released 5.3.1*

View file

@ -59,9 +59,9 @@ author = u'Leandro Toledo'
# built documents.
#
# The short X.Y version.
version = '5.3' # telegram.__version__[:3]
version = '6.0' # telegram.__version__[:3]
# The full version, including alpha/beta/rc tags.
release = '5.3.1' # telegram.__version__
release = '6.0.0' # telegram.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View file

@ -56,7 +56,7 @@ def gender(bot, update):
def photo(bot, update):
user = update.message.from_user
photo_file = bot.getFile(update.message.photo[-1].file_id)
photo_file = bot.get_file(update.message.photo[-1].file_id)
photo_file.download('user_photo.jpg')
logger.info("Photo of %s: %s" % (user.first_name, 'user_photo.jpg'))
update.message.reply_text('Gorgeous! Now, send me your location please, '

View file

@ -20,7 +20,7 @@ def main():
# get the first pending update_id, this is so we can skip over it in case
# we get an "Unauthorized" exception.
try:
update_id = bot.getUpdates()[0].update_id
update_id = bot.get_updates()[0].update_id
except IndexError:
update_id = None
@ -39,9 +39,7 @@ def main():
def echo(bot):
global update_id
# Request updates after the last update_id
for update in bot.getUpdates(offset=update_id, timeout=10):
# chat_id is required to reply to any message
chat_id = update.message.chat_id
for update in bot.get_updates(offset=update_id, timeout=10):
update_id = update.update_id + 1
if update.message: # your bot can receive updates without messages

View file

@ -72,7 +72,7 @@ def inlinequery(bot, update):
def error(bot, update, error):
logger.warn('Update "%s" caused error "%s"' % (update, error))
logger.warning('Update "%s" caused error "%s"' % (update, error))
def main():

View file

@ -26,7 +26,7 @@ def start(bot, update):
def button(bot, update):
query = update.callback_query
bot.editMessageText(text="Selected option: %s" % query.data,
bot.edit_message_text(text="Selected option: %s" % query.data,
chat_id=query.message.chat_id,
message_id=query.message.message_id)

View file

@ -35,7 +35,7 @@ def start(bot, update):
def alarm(bot, job):
"""Function to send the alarm message"""
bot.sendMessage(job.context, text='Beep!')
bot.send_message(job.context, text='Beep!')
def set(bot, update, args, job_queue, chat_data):
@ -49,9 +49,8 @@ def set(bot, update, args, job_queue, chat_data):
return
# Add job to queue
job = Job(alarm, due, repeat=False, context=chat_id)
job = job_queue.run_once(alarm, due, context=chat_id)
chat_data['job'] = job
job_queue.put(job)
update.message.reply_text('Timer successfully set!')

View file

@ -17,4 +17,4 @@
# You should have received a copy of the GNU Lesser Public License
# along with this program. If not, see [http://www.gnu.org/licenses/].
__version__ = '5.3.1'
__version__ = '6.0.0'