Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 19ce9e4

Browse files
rahieltsnoam
authored andcommitted
Delete deprecated code (python-telegram-bot#693)
* remove Botan import from utils * remove telegram.Emoji * remove ReplyKeyboardHide * remove edit_message argument of bot.set_game_score
1 parent c026135 commit 19ce9e4

File tree

7 files changed

+8
-924
lines changed

7 files changed

+8
-924
lines changed

CHANGES.rst

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Changes
88
- Internal restructure of files.
99
- Improved unitests.
1010
- Fully support Bot API 3.2.
11+
- Remove deprecated ``telegram.Emoji``.
12+
- Remove deprecated ``Botan`` import from ``utils``.
13+
- Remove deprecated ``ReplyKeyboardHide``.
14+
- Remove deprecated ``edit_message`` argument of `bot.set_game_score``.
1115

1216
**2017-06-18**
1317

telegram/__init__.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@
3838
from .keyboardbutton import KeyboardButton
3939
from .replymarkup import ReplyMarkup
4040
from .replykeyboardmarkup import ReplyKeyboardMarkup
41-
from .replykeyboardremove import ReplyKeyboardRemove, ReplyKeyboardHide
41+
from .replykeyboardremove import ReplyKeyboardRemove
4242
from .forcereply import ForceReply
4343
from .error import TelegramError
4444
from .files.inputfile import InputFile
4545
from .files.file import File
46-
from .emoji import Emoji
4746
from .parsemode import ParseMode
4847
from .messageentity import MessageEntity
4948
from .games.animation import Animation
@@ -102,7 +101,7 @@
102101

103102
__all__ = [
104103
'Audio', 'Bot', 'Chat', 'ChatMember', 'ChatAction', 'ChosenInlineResult', 'CallbackQuery',
105-
'Contact', 'Document', 'Emoji', 'File', 'ForceReply', 'InlineKeyboardButton',
104+
'Contact', 'Document', 'File', 'ForceReply', 'InlineKeyboardButton',
106105
'InlineKeyboardMarkup', 'InlineQuery', 'InlineQueryResult', 'InlineQueryResult',
107106
'InlineQueryResultArticle', 'InlineQueryResultAudio', 'InlineQueryResultCachedAudio',
108107
'InlineQueryResultCachedDocument', 'InlineQueryResultCachedGif',

telegram/bot.py

-9
Original file line numberDiff line numberDiff line change
@@ -1689,7 +1689,6 @@ def set_game_score(self,
16891689
chat_id=None,
16901690
message_id=None,
16911691
inline_message_id=None,
1692-
edit_message=None,
16931692
force=None,
16941693
disable_edit_message=None,
16951694
timeout=None,
@@ -1710,8 +1709,6 @@ def set_game_score(self,
17101709
be useful when fixing mistakes or banning cheaters.
17111710
disable_edit_message (Optional[bool]): Pass True, if the game message should not be
17121711
automatically edited to include the current scoreboard.
1713-
edit_message (Optional[bool]): Deprecated. Has the opposite logic for
1714-
`disable_edit_message`.
17151712
timeout (Optional[int|float]): If this value is specified, use it as the read timeout
17161713
from the server (instead of the one specified during creation of the connection
17171714
pool).
@@ -1736,12 +1733,6 @@ def set_game_score(self,
17361733
data['force'] = force
17371734
if disable_edit_message is not None:
17381735
data['disable_edit_message'] = disable_edit_message
1739-
if edit_message is not None:
1740-
warnings.warn('edit_message is deprecated, use disable_edit_message instead')
1741-
if disable_edit_message is None:
1742-
data['edit_message'] = edit_message
1743-
else:
1744-
warnings.warn('edit_message is ignored when disable_edit_message is used')
17451736

17461737
return url, data
17471738

0 commit comments

Comments
 (0)