Skip to content

Commit

Permalink
Remove Functionality Deprecated in API 7.0 (#4114)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bibo-Joshi committed Feb 25, 2024
1 parent c513d51 commit 277031c
Show file tree
Hide file tree
Showing 28 changed files with 706 additions and 1,412 deletions.
2 changes: 0 additions & 2 deletions docs/source/telegram.at-tree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ Available Types
telegram.keyboardbutton
telegram.keyboardbuttonpolltype
telegram.keyboardbuttonrequestchat
telegram.keyboardbuttonrequestuser
telegram.keyboardbuttonrequestusers
telegram.linkpreviewoptions
telegram.location
Expand Down Expand Up @@ -115,7 +114,6 @@ Available Types
telegram.user
telegram.userchatboosts
telegram.userprofilephotos
telegram.usershared
telegram.usersshared
telegram.venue
telegram.video
Expand Down
6 changes: 0 additions & 6 deletions docs/source/telegram.keyboardbuttonrequestuser.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/telegram.usershared.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/substitutions/global.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

.. |rtm_aswr_deprecated| replace:: replacing this argument. PTB will automatically convert this argument to that one, but you should update your code to use the new argument.

.. |keyword_only_arg| replace:: In future versions, this argument will become a keyword-only argument.
.. |keyword_only_arg| replace:: This argument is now a keyword-only argument.

.. |text_html| replace:: The return value of this property is a best-effort approach. Unfortunately, it can not be guaranteed that sending a message with the returned string will render in the same way as the original message produces the same :attr:`~telegram.Message.entities`/:attr:`~telegram.Message.caption_entities` as the original message. For example, Telegram recommends that entities of type :attr:`~telegram.MessageEntity.BLOCKQUOTE` and :attr:`~telegram.MessageEntity.PRE` *should* start and end on a new line, but does not enforce this and leaves rendering decisions up to the clients.

Expand Down
10 changes: 2 additions & 8 deletions telegram/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@
"KeyboardButton",
"KeyboardButtonPollType",
"KeyboardButtonRequestChat",
"KeyboardButtonRequestUser",
"KeyboardButtonRequestUsers",
"LabeledPrice",
"LinkPreviewOptions",
Expand Down Expand Up @@ -198,7 +197,6 @@
"User",
"UserChatBoosts",
"UserProfilePhotos",
"UserShared",
"UsersShared",
"Venue",
"Video",
Expand Down Expand Up @@ -338,11 +336,7 @@
from ._inline.inputvenuemessagecontent import InputVenueMessageContent
from ._keyboardbutton import KeyboardButton
from ._keyboardbuttonpolltype import KeyboardButtonPollType
from ._keyboardbuttonrequest import (
KeyboardButtonRequestChat,
KeyboardButtonRequestUser,
KeyboardButtonRequestUsers,
)
from ._keyboardbuttonrequest import KeyboardButtonRequestChat, KeyboardButtonRequestUsers
from ._linkpreviewoptions import LinkPreviewOptions
from ._loginurl import LoginUrl
from ._menubutton import MenuButton, MenuButtonCommands, MenuButtonDefault, MenuButtonWebApp
Expand Down Expand Up @@ -397,7 +391,7 @@
from ._replykeyboardmarkup import ReplyKeyboardMarkup
from ._replykeyboardremove import ReplyKeyboardRemove
from ._sentwebappmessage import SentWebAppMessage
from ._shared import ChatShared, UserShared, UsersShared
from ._shared import ChatShared, UsersShared
from ._story import Story
from ._switchinlinequerychosenchat import SwitchInlineQueryChosenChat
from ._telegramobject import TelegramObject
Expand Down
733 changes: 378 additions & 355 deletions telegram/_bot.py

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions telegram/_callbackquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ async def edit_message_text(
self,
text: str,
parse_mode: ODVInput[str] = DEFAULT_NONE,
disable_web_page_preview: ODVInput[bool] = DEFAULT_NONE,
reply_markup: Optional["InlineKeyboardMarkup"] = None,
entities: Optional[Sequence["MessageEntity"]] = None,
link_preview_options: ODVInput["LinkPreviewOptions"] = DEFAULT_NONE,
*,
disable_web_page_preview: Optional[bool] = None,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = DEFAULT_NONE,
connect_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -808,13 +808,13 @@ async def copy_message(
parse_mode: ODVInput[str] = DEFAULT_NONE,
caption_entities: Optional[Sequence["MessageEntity"]] = None,
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
reply_markup: Optional[ReplyMarkup] = None,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: Optional[int] = None,
reply_parameters: Optional["ReplyParameters"] = None,
*,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Optional[int] = None,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = DEFAULT_NONE,
connect_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down
Loading

0 comments on commit 277031c

Please sign in to comment.