Skip to content

Commit

Permalink
Bump version to v6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jh0ker committed May 19, 2017
1 parent 5dd3a66 commit 6479e15
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 15 deletions.
21 changes: 21 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
# 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.
Expand Down
2 changes: 1 addition & 1 deletion examples/conversationbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, '
Expand Down
6 changes: 2 additions & 4 deletions examples/echobot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/inlinebot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
6 changes: 3 additions & 3 deletions examples/inlinekeyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def start(bot, update):
def button(bot, update):
query = update.callback_query

bot.editMessageText(text="Selected option: %s" % query.data,
chat_id=query.message.chat_id,
message_id=query.message.message_id)
bot.edit_message_text(text="Selected option: %s" % query.data,
chat_id=query.message.chat_id,
message_id=query.message.message_id)


def help(bot, update):
Expand Down
5 changes: 2 additions & 3 deletions examples/timerbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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!')

Expand Down
2 changes: 1 addition & 1 deletion telegram/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit 6479e15

Please sign in to comment.