X Tutup
Skip to content

Commit 6479e15

Browse files
committed
Bump version to v6.0.0
1 parent 5dd3a66 commit 6479e15

File tree

8 files changed

+33
-15
lines changed

8 files changed

+33
-15
lines changed

CHANGES.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@
22
Changes
33
=======
44

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

728
*Released 5.3.1*

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@
5959
# built documents.
6060
#
6161
# The short X.Y version.
62-
version = '5.3' # telegram.__version__[:3]
62+
version = '6.0' # telegram.__version__[:3]
6363
# The full version, including alpha/beta/rc tags.
64-
release = '5.3.1' # telegram.__version__
64+
release = '6.0.0' # telegram.__version__
6565

6666
# The language for content autogenerated by Sphinx. Refer to documentation
6767
# for a list of supported languages.

examples/conversationbot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def gender(bot, update):
5656

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

examples/echobot.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def main():
2020
# get the first pending update_id, this is so we can skip over it in case
2121
# we get an "Unauthorized" exception.
2222
try:
23-
update_id = bot.getUpdates()[0].update_id
23+
update_id = bot.get_updates()[0].update_id
2424
except IndexError:
2525
update_id = None
2626

@@ -39,9 +39,7 @@ def main():
3939
def echo(bot):
4040
global update_id
4141
# Request updates after the last update_id
42-
for update in bot.getUpdates(offset=update_id, timeout=10):
43-
# chat_id is required to reply to any message
44-
chat_id = update.message.chat_id
42+
for update in bot.get_updates(offset=update_id, timeout=10):
4543
update_id = update.update_id + 1
4644

4745
if update.message: # your bot can receive updates without messages

examples/inlinebot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def inlinequery(bot, update):
7272

7373

7474
def error(bot, update, error):
75-
logger.warn('Update "%s" caused error "%s"' % (update, error))
75+
logger.warning('Update "%s" caused error "%s"' % (update, error))
7676

7777

7878
def main():

examples/inlinekeyboard.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ def start(bot, update):
2626
def button(bot, update):
2727
query = update.callback_query
2828

29-
bot.editMessageText(text="Selected option: %s" % query.data,
30-
chat_id=query.message.chat_id,
31-
message_id=query.message.message_id)
29+
bot.edit_message_text(text="Selected option: %s" % query.data,
30+
chat_id=query.message.chat_id,
31+
message_id=query.message.message_id)
3232

3333

3434
def help(bot, update):

examples/timerbot.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def start(bot, update):
3535

3636
def alarm(bot, job):
3737
"""Function to send the alarm message"""
38-
bot.sendMessage(job.context, text='Beep!')
38+
bot.send_message(job.context, text='Beep!')
3939

4040

4141
def set(bot, update, args, job_queue, chat_data):
@@ -49,9 +49,8 @@ def set(bot, update, args, job_queue, chat_data):
4949
return
5050

5151
# Add job to queue
52-
job = Job(alarm, due, repeat=False, context=chat_id)
52+
job = job_queue.run_once(alarm, due, context=chat_id)
5353
chat_data['job'] = job
54-
job_queue.put(job)
5554

5655
update.message.reply_text('Timer successfully set!')
5756

telegram/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
# You should have received a copy of the GNU Lesser Public License
1818
# along with this program. If not, see [http://www.gnu.org/licenses/].
1919

20-
__version__ = '5.3.1'
20+
__version__ = '6.0.0'

0 commit comments

Comments
 (0)
X Tutup