From bfbf6d3f9474d03a7d267b9d858bc3ba420e991d Mon Sep 17 00:00:00 2001 From: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com> Date: Sun, 7 May 2023 15:31:23 +0200 Subject: [PATCH] Bump Version to v20.3 --- CHANGES.rst | 72 ++++++++++++++++++++++++ docs/source/conf.py | 4 +- docs/source/stability_policy.rst | 6 +- telegram/_bot.py | 8 +-- telegram/_botname.py | 2 +- telegram/_chatinvitelink.py | 4 +- telegram/_chatjoinrequest.py | 4 +- telegram/_chatmember.py | 8 +-- telegram/_chatmemberupdated.py | 8 +-- telegram/_inline/inlinekeyboardbutton.py | 4 +- telegram/_message.py | 38 ++++++------- telegram/_poll.py | 4 +- telegram/_switchinlinequerychosenchat.py | 2 +- telegram/_version.py | 2 +- telegram/_videochat.py | 4 +- telegram/_webhookinfo.py | 8 +-- telegram/_writeaccessallowed.py | 4 +- telegram/constants.py | 8 +-- telegram/ext/_application.py | 2 +- telegram/helpers.py | 2 +- 20 files changed, 133 insertions(+), 61 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 3c4d10387..1c31cf0e0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,78 @@ Changelog ========= +Version 20.3 +============ +*Released 2023-05-07* + +This is the technical changelog for version 20.3. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel `_. + +Major Changes +------------- + +- Full support for API 6.7 (`#3673`_) +- Add a Stability Policy (`#3622`_) + +New Features +------------ + +- Add ``Application.mark_data_for_update_persistence`` (`#3607`_) +- Make ``Message.link`` Point to Thread View Where Possible (`#3640`_) +- Localize Received ``datetime`` Objects According to ``Defaults.tzinfo`` (`#3632`_) + +Minor Changes, Documentation Improvements and CI +------------------------------------------------ + +- Empower ``ruff`` (`#3594`_) +- Drop Usage of ``sys.maxunicode`` (`#3630`_) +- Add String Representation for ``RequestParameter`` (`#3634`_) +- Stabilize CI by Rerunning Failed Tests (`#3631`_) +- Give Loggers Better Names (`#3623`_) +- Add Logging for Invalid JSON Data in ``BasePersistence.parse_json_payload`` (`#3668`_) +- Improve Warning Categories & Stacklevels (`#3674`_) +- Stabilize ``test_delete_sticker_set`` (`#3685`_) +- Shield Update Fetcher Task in ``Application.start`` (`#3657`_) +- Recover 100% Type Completeness (`#3676`_) +- Documentation Improvements (`#3628`_, `#3636`_, `#3694`_) + +Dependencies +------------ + +- Bump ``actions/stale`` from 7 to 8 (`#3644`_) +- Bump ``furo`` from 2023.3.23 to 2023.3.27 (`#3643`_) +- ``pre-commit`` autoupdate (`#3646`_, `#3688`_) +- Remove Deprecated ``codecov`` Package from CI (`#3664`_) +- Bump ``sphinx-copybutton`` from 0.5.1 to 0.5.2 (`#3662`_) +- Update ``httpx`` requirement from ~=0.23.3 to ~=0.24.0 (`#3660`_) +- Bump ``pytest`` from 7.2.2 to 7.3.1 (`#3661`_) + +.. _`#3673`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3673 +.. _`#3622`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3622 +.. _`#3607`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3607 +.. _`#3640`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3640 +.. _`#3632`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3632 +.. _`#3594`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3594 +.. _`#3630`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3630 +.. _`#3634`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3634 +.. _`#3631`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3631 +.. _`#3623`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3623 +.. _`#3668`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3668 +.. _`#3674`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3674 +.. _`#3685`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3685 +.. _`#3657`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3657 +.. _`#3676`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3676 +.. _`#3628`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3628 +.. _`#3636`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3636 +.. _`#3694`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3694 +.. _`#3644`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3644 +.. _`#3643`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3643 +.. _`#3646`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3646 +.. _`#3688`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3688 +.. _`#3664`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3664 +.. _`#3662`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3662 +.. _`#3660`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3660 +.. _`#3661`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3661 + Version 20.2 ============ *Released 2023-03-25* diff --git a/docs/source/conf.py b/docs/source/conf.py index 67dd393b8..c227f30ac 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -21,9 +21,9 @@ author = "Leandro Toledo" # built documents. # # The short X.Y version. -version = "20.2" # telegram.__version__[:3] +version = "20.3" # telegram.__version__[:3] # The full version, including alpha/beta/rc tags. -release = "20.2" # telegram.__version__ +release = "20.3" # telegram.__version__ # If your documentation needs a minimal Sphinx version, state it here. needs_sphinx = "6.1.3" diff --git a/docs/source/stability_policy.rst b/docs/source/stability_policy.rst index 3be281d1d..2bfd1e9be 100644 --- a/docs/source/stability_policy.rst +++ b/docs/source/stability_policy.rst @@ -3,7 +3,7 @@ Stability Policy .. important:: - This stability policy is in place since version NEXT.VERSION. + This stability policy is in place since version 20.3. While earlier versions of ``python-telegram-bot`` also had stable interfaces, they had no explicit stability policy and hence did not follow the rules outlined below in all detail. Please also refer to the :ref:`changelog `. @@ -105,7 +105,7 @@ Should a similarly big change ever be deemed necessary again by the development Non-Bot API Functionality ######################### -Starting with version NEXT.VERSION, deprecated functionality will stay available for the current and the next major version. +Starting with version 20.3, deprecated functionality will stay available for the current and the next major version. For example: - In PTB v20.1.1 the feature exists @@ -120,7 +120,7 @@ Bot API Functionality As PTB has no control over deprecations introduced by Telegram and the schedule of these deprecations rarely coincides with PTBs deprecation schedule, we have a special policy for Bot API functionality. -Starting with NEXT.VERSION, deprecated Bot API functionality will stay available for the current and the next major version of PTB *or* until the next version of the Bot API. +Starting with 20.3, deprecated Bot API functionality will stay available for the current and the next major version of PTB *or* until the next version of the Bot API. More precisely, two cases are possible, for which we show examples below. Case 1 diff --git a/telegram/_bot.py b/telegram/_bot.py index 02b41620d..37241f709 100644 --- a/telegram/_bot.py +++ b/telegram/_bot.py @@ -2866,7 +2866,7 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]): specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter :paramref:`switch_pm_parameter`. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.3 |api6_7_depr| switch_pm_parameter (:obj:`str`, optional): Deep-linking parameter for the :guilabel:`/start` message sent to the bot when user presses the switch button. @@ -2874,12 +2874,12 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]): :tg-const:`telegram.InlineQuery.MAX_SWITCH_PM_TEXT_LENGTH` characters, only ``A-Z``, ``a-z``, ``0-9``, ``_`` and ``-`` are allowed. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.3 |api6_7_depr| button (:class:`telegram.InlineQueryResultsButton`, optional): A button to be shown above the inline query results. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.3 Keyword Args: current_offset (:obj:`str`, optional): The :attr:`telegram.InlineQuery.offset` of @@ -8185,7 +8185,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. """ Use this method to change the bot's name. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.3 Args: name (:obj:`str`, optional): New bot name; diff --git a/telegram/_botname.py b/telegram/_botname.py index 6e69f3908..ed70fb6e6 100644 --- a/telegram/_botname.py +++ b/telegram/_botname.py @@ -30,7 +30,7 @@ class BotName(TelegramObject): Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`name` is equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.3 Args: name (:obj:`str`): The bot's name. diff --git a/telegram/_chatinvitelink.py b/telegram/_chatinvitelink.py index 058b0a5ff..9718d5bf8 100644 --- a/telegram/_chatinvitelink.py +++ b/telegram/_chatinvitelink.py @@ -55,7 +55,7 @@ class ChatInviteLink(TelegramObject): expire_date (:class:`datetime.datetime`, optional): Date when the link will expire or has been expired. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| member_limit (:obj:`int`, optional): Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; @@ -82,7 +82,7 @@ class ChatInviteLink(TelegramObject): expire_date (:class:`datetime.datetime`): Optional. Date when the link will expire or has been expired. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| member_limit (:obj:`int`): Optional. Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; diff --git a/telegram/_chatjoinrequest.py b/telegram/_chatjoinrequest.py index 4d349ea70..9629569d6 100644 --- a/telegram/_chatjoinrequest.py +++ b/telegram/_chatjoinrequest.py @@ -57,7 +57,7 @@ class ChatJoinRequest(TelegramObject): from_user (:class:`telegram.User`): User that sent the join request. date (:class:`datetime.datetime`): Date the request was sent. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| user_chat_id (:obj:`int`): Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming @@ -77,7 +77,7 @@ class ChatJoinRequest(TelegramObject): from_user (:class:`telegram.User`): User that sent the join request. date (:class:`datetime.datetime`): Date the request was sent. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| user_chat_id (:obj:`int`): Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming diff --git a/telegram/_chatmember.py b/telegram/_chatmember.py index b73cc7896..bea0d593e 100644 --- a/telegram/_chatmember.py +++ b/telegram/_chatmember.py @@ -390,7 +390,7 @@ class ChatMemberRestricted(ChatMember): until_date (:class:`datetime.datetime`): Date when restrictions will be lifted for this user. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| can_send_audios (:obj:`bool`): :obj:`True`, if the user is allowed to send audios. @@ -445,7 +445,7 @@ class ChatMemberRestricted(ChatMember): until_date (:class:`datetime.datetime`): Date when restrictions will be lifted for this user. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| can_send_audios (:obj:`bool`): :obj:`True`, if the user is allowed to send audios. @@ -574,7 +574,7 @@ class ChatMemberBanned(ChatMember): until_date (:class:`datetime.datetime`): Date when restrictions will be lifted for this user. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| Attributes: @@ -584,7 +584,7 @@ class ChatMemberBanned(ChatMember): until_date (:class:`datetime.datetime`): Date when restrictions will be lifted for this user. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| """ diff --git a/telegram/_chatmemberupdated.py b/telegram/_chatmemberupdated.py index 59b306234..44d6a55fd 100644 --- a/telegram/_chatmemberupdated.py +++ b/telegram/_chatmemberupdated.py @@ -53,7 +53,7 @@ class ChatMemberUpdated(TelegramObject): date (:class:`datetime.datetime`): Date the change was done in Unix time. Converted to :class:`datetime.datetime`. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| old_chat_member (:class:`telegram.ChatMember`): Previous information about the chat member. new_chat_member (:class:`telegram.ChatMember`): New information about the chat member. @@ -62,7 +62,7 @@ class ChatMemberUpdated(TelegramObject): via_chat_folder_invite_link (:obj:`bool`, optional): :obj:`True`, if the user joined the chat via a chat folder invite link - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.3 Attributes: chat (:class:`telegram.Chat`): Chat the user belongs to. @@ -70,7 +70,7 @@ class ChatMemberUpdated(TelegramObject): date (:class:`datetime.datetime`): Date the change was done in Unix time. Converted to :class:`datetime.datetime`. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| old_chat_member (:class:`telegram.ChatMember`): Previous information about the chat member. new_chat_member (:class:`telegram.ChatMember`): New information about the chat member. @@ -79,7 +79,7 @@ class ChatMemberUpdated(TelegramObject): via_chat_folder_invite_link (:obj:`bool`): Optional. :obj:`True`, if the user joined the chat via a chat folder invite link - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.3 """ diff --git a/telegram/_inline/inlinekeyboardbutton.py b/telegram/_inline/inlinekeyboardbutton.py index 9626fa1d0..6b8a634b5 100644 --- a/telegram/_inline/inlinekeyboardbutton.py +++ b/telegram/_inline/inlinekeyboardbutton.py @@ -132,7 +132,7 @@ class InlineKeyboardButton(TelegramObject): specified type, open that chat and insert the bot's username and the specified inline query in the input field. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.3 Tip: This is similar to :paramref:`switch_inline_query`, but gives more control on @@ -193,7 +193,7 @@ class InlineKeyboardButton(TelegramObject): specified type, open that chat and insert the bot's username and the specified inline query in the input field. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.3 Tip: This is similar to :attr:`switch_inline_query`, but gives more control on diff --git a/telegram/_message.py b/telegram/_message.py index bece91236..02b652d37 100644 --- a/telegram/_message.py +++ b/telegram/_message.py @@ -124,7 +124,7 @@ class Message(TelegramObject): date (:class:`datetime.datetime`): Date the message was sent in Unix time. Converted to :class:`datetime.datetime`. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| chat (:class:`telegram.Chat`): Conversation the message belongs to. forward_from (:class:`telegram.User`, optional): For forwarded messages, sender of @@ -138,7 +138,7 @@ class Message(TelegramObject): forward_date (:class:`datetime.datetime`, optional): For forwarded messages, date the original message was sent in Unix time. Converted to :class:`datetime.datetime`. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| is_automatic_forward (:obj:`bool`, optional): :obj:`True`, if the message is a channel post that was automatically forwarded to the connected discussion group. @@ -150,7 +150,7 @@ class Message(TelegramObject): edit_date (:class:`datetime.datetime`, optional): Date the message was last edited in Unix time. Converted to :class:`datetime.datetime`. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| has_protected_content (:obj:`bool`, optional): :obj:`True`, if the message can't be forwarded. @@ -350,7 +350,7 @@ class Message(TelegramObject): date (:class:`datetime.datetime`): Date the message was sent in Unix time. Converted to :class:`datetime.datetime`. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| chat (:class:`telegram.Chat`): Conversation the message belongs to. forward_from (:class:`telegram.User`): Optional. For forwarded messages, sender of the @@ -362,7 +362,7 @@ class Message(TelegramObject): forward_date (:class:`datetime.datetime`): Optional. For forwarded messages, date the original message was sent in Unix time. Converted to :class:`datetime.datetime`. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| is_automatic_forward (:obj:`bool`): Optional. :obj:`True`, if the message is a channel post that was automatically forwarded to the connected discussion group. @@ -374,7 +374,7 @@ class Message(TelegramObject): edit_date (:class:`datetime.datetime`): Optional. Date the message was last edited in Unix time. Converted to :class:`datetime.datetime`. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| has_protected_content (:obj:`bool`): Optional. :obj:`True`, if the message can't be forwarded. @@ -852,7 +852,7 @@ class Message(TelegramObject): """:obj:`str`: Convenience property. If the chat of the message is not a private chat or normal group, returns a t.me link of the message. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 For messages that are replies or part of a forum topic, the link now points to the corresponding thread view. """ @@ -3369,7 +3369,7 @@ class Message(TelegramObject): .. versionchanged:: 13.10 Spoiler entities are now formatted as HTML. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 Custom emoji entities are now supported. Returns: @@ -3388,7 +3388,7 @@ class Message(TelegramObject): .. versionchanged:: 13.10 Spoiler entities are now formatted as HTML. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 Custom emoji entities are now supported. Returns: @@ -3408,7 +3408,7 @@ class Message(TelegramObject): .. versionchanged:: 13.10 Spoiler entities are now formatted as HTML. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 Custom emoji entities are now supported. Returns: @@ -3427,7 +3427,7 @@ class Message(TelegramObject): .. versionchanged:: 13.10 Spoiler entities are now formatted as HTML. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 Custom emoji entities are now supported. Returns: @@ -3601,7 +3601,7 @@ class Message(TelegramObject): * |custom_emoji_formatting_note| - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.3 |custom_emoji_md1_deprecation| Returns: @@ -3625,7 +3625,7 @@ class Message(TelegramObject): .. versionchanged:: 13.10 Spoiler entities are now formatted as Markdown V2. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 Custom emoji entities are now supported. Returns: @@ -3648,7 +3648,7 @@ class Message(TelegramObject): * |custom_emoji_formatting_note| - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.3 |custom_emoji_md1_deprecation| Returns: @@ -3672,7 +3672,7 @@ class Message(TelegramObject): .. versionchanged:: 13.10 Spoiler entities are now formatted as Markdown V2. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 Custom emoji entities are now supported. Returns: @@ -3695,7 +3695,7 @@ class Message(TelegramObject): * |custom_emoji_formatting_note| - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.3 |custom_emoji_md1_deprecation| Returns: @@ -3719,7 +3719,7 @@ class Message(TelegramObject): .. versionchanged:: 13.10 Spoiler entities are now formatted as Markdown V2. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 Custom emoji entities are now supported. Returns: @@ -3744,7 +3744,7 @@ class Message(TelegramObject): * |custom_emoji_formatting_note| - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.3 |custom_emoji_md1_deprecation| Returns: @@ -3768,7 +3768,7 @@ class Message(TelegramObject): .. versionchanged:: 13.10 Spoiler entities are now formatted as Markdown V2. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 Custom emoji entities are now supported. Returns: diff --git a/telegram/_poll.py b/telegram/_poll.py index 0e1d56c62..5b92bddcd 100644 --- a/telegram/_poll.py +++ b/telegram/_poll.py @@ -173,7 +173,7 @@ class Poll(TelegramObject): close_date (:obj:`datetime.datetime`, optional): Point in time (Unix timestamp) when the poll will be automatically closed. Converted to :obj:`datetime.datetime`. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| Attributes: @@ -209,7 +209,7 @@ class Poll(TelegramObject): close_date (:obj:`datetime.datetime`): Optional. Point in time when the poll will be automatically closed. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| """ diff --git a/telegram/_switchinlinequerychosenchat.py b/telegram/_switchinlinequerychosenchat.py index 206405f7d..ee32aec4d 100644 --- a/telegram/_switchinlinequerychosenchat.py +++ b/telegram/_switchinlinequerychosenchat.py @@ -31,7 +31,7 @@ class SwitchInlineQueryChosenChat(TelegramObject): considered equal, if their :attr:`query`, :attr:`allow_user_chats`, :attr:`allow_bot_chats`, :attr:`allow_group_chats`, and :attr:`allow_channel_chats` are equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.3 Caution: The PTB team has discovered that you must pass at least one of diff --git a/telegram/_version.py b/telegram/_version.py index 61490e4be..078b8e4cd 100644 --- a/telegram/_version.py +++ b/telegram/_version.py @@ -50,7 +50,7 @@ class Version(NamedTuple): return version -__version_info__ = Version(major=20, minor=2, micro=0, releaselevel="final", serial=0) +__version_info__ = Version(major=20, minor=3, micro=0, releaselevel="final", serial=0) __version__ = str(__version_info__) # # SETUP.PY MARKER diff --git a/telegram/_videochat.py b/telegram/_videochat.py index d7b348b0e..459427e81 100644 --- a/telegram/_videochat.py +++ b/telegram/_videochat.py @@ -150,13 +150,13 @@ class VideoChatScheduled(TelegramObject): start_date (:obj:`datetime.datetime`): Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| Attributes: start_date (:obj:`datetime.datetime`): Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| """ diff --git a/telegram/_webhookinfo.py b/telegram/_webhookinfo.py index c62935a7d..26703b378 100644 --- a/telegram/_webhookinfo.py +++ b/telegram/_webhookinfo.py @@ -52,7 +52,7 @@ class WebhookInfo(TelegramObject): last_error_date (:class:`datetime.datetime`): Optional. Datetime for the most recent error that happened when trying to deliver an update via webhook. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| last_error_message (:obj:`str`, optional): Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook. @@ -71,7 +71,7 @@ class WebhookInfo(TelegramObject): .. versionadded:: 20.0 - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| Attributes: url (:obj:`str`): Webhook URL, may be empty if webhook is not set up. @@ -82,7 +82,7 @@ class WebhookInfo(TelegramObject): last_error_date (:class:`datetime.datetime`): Optional. Datetime for the most recent error that happened when trying to deliver an update via webhook. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| last_error_message (:obj:`str`): Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook. @@ -102,7 +102,7 @@ class WebhookInfo(TelegramObject): .. versionadded:: 20.0 - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 |datetime_localization| """ diff --git a/telegram/_writeaccessallowed.py b/telegram/_writeaccessallowed.py index faa5c0072..209412eca 100644 --- a/telegram/_writeaccessallowed.py +++ b/telegram/_writeaccessallowed.py @@ -33,12 +33,12 @@ class WriteAccessAllowed(TelegramObject): Args: web_app_name (:obj:`str`, optional): Name of the Web App which was launched from a link. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.3 Attributes: web_app_name (:obj:`str`): Optional. Name of the Web App which was launched from a link. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.3 """ diff --git a/telegram/constants.py b/telegram/constants.py index 33fe2c758..7250ceabb 100644 --- a/telegram/constants.py +++ b/telegram/constants.py @@ -215,7 +215,7 @@ class BotNameLimit(IntEnum): """This enum contains limitations for the methods :meth:`telegram.Bot.set_my_name`. The enum members of this enumeration are instances of :class:`int` and can be treated as such. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.3 """ __slots__ = () @@ -754,7 +754,7 @@ class InlineQueryLimit(IntEnum): :paramref:`~telegram.Bot.answer_inline_query.switch_pm_parameter` parameter of :meth:`telegram.Bot.answer_inline_query`. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.3 Deprecated in favor of :attr:`InlineQueryResultsButtonLimit.MIN_START_PARAMETER_LENGTH`. """ MAX_SWITCH_PM_TEXT_LENGTH = 64 @@ -762,7 +762,7 @@ class InlineQueryLimit(IntEnum): :paramref:`~telegram.Bot.answer_inline_query.switch_pm_parameter` parameter of :meth:`telegram.Bot.answer_inline_query`. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.3 Deprecated in favor of :attr:`InlineQueryResultsButtonLimit.MAX_START_PARAMETER_LENGTH`. """ @@ -792,7 +792,7 @@ class InlineQueryResultsButtonLimit(IntEnum): """This enum contains limitations for :class:`telegram.InlineQueryResultsButton`. The enum members of this enumeration are instances of :class:`int` and can be treated as such. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.3 """ __slots__ = () diff --git a/telegram/ext/_application.py b/telegram/ext/_application.py index 8a3868d26..09c89222f 100644 --- a/telegram/ext/_application.py +++ b/telegram/ext/_application.py @@ -1394,7 +1394,7 @@ class Application(Generic[BT, CCT, UD, CD, BD, JQ], AsyncContextManager["Applica Note that for data which should be available globally in all handler callbacks independent of the chat/user, it is recommended to use :attr:`bot_data` instead. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.3 Args: chat_ids (:obj:`int` | Collection[:obj:`int`], optional): Chat IDs to mark. diff --git a/telegram/helpers.py b/telegram/helpers.py index 9bf8ba730..bf4a52761 100644 --- a/telegram/helpers.py +++ b/telegram/helpers.py @@ -44,7 +44,7 @@ if TYPE_CHECKING: def escape_markdown(text: str, version: int = 1, entity_type: str = None) -> str: """Helper function to escape telegram markup symbols. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.3 Custom emoji entity escaping is now supported. Args: