Bump Version to v20.3

This commit is contained in:
Hinrich Mahler 2023-05-07 15:31:23 +02:00
parent 0c4180c74b
commit bfbf6d3f94
20 changed files with 133 additions and 61 deletions

View file

@ -4,6 +4,78 @@
Changelog 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 <https://t.me/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 Version 20.2
============ ============
*Released 2023-03-25* *Released 2023-03-25*

View file

@ -21,9 +21,9 @@ author = "Leandro Toledo"
# built documents. # built documents.
# #
# The short X.Y version. # 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. # 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. # If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = "6.1.3" needs_sphinx = "6.1.3"

View file

@ -3,7 +3,7 @@ Stability Policy
.. important:: .. 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. 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 <ptb-changelog>`. Please also refer to the :ref:`changelog <ptb-changelog>`.
@ -105,7 +105,7 @@ Should a similarly big change ever be deemed necessary again by the development
Non-Bot API Functionality 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: For example:
- In PTB v20.1.1 the feature exists - 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. 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. More precisely, two cases are possible, for which we show examples below.
Case 1 Case 1

View file

@ -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 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`. bot a start message with the parameter :paramref:`switch_pm_parameter`.
.. deprecated:: NEXT.VERSION .. deprecated:: 20.3
|api6_7_depr| |api6_7_depr|
switch_pm_parameter (:obj:`str`, optional): Deep-linking parameter for the switch_pm_parameter (:obj:`str`, optional): Deep-linking parameter for the
:guilabel:`/start` message sent to the bot when user presses the switch button. :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, :tg-const:`telegram.InlineQuery.MAX_SWITCH_PM_TEXT_LENGTH` characters,
only ``A-Z``, ``a-z``, ``0-9``, ``_`` and ``-`` are allowed. only ``A-Z``, ``a-z``, ``0-9``, ``_`` and ``-`` are allowed.
.. deprecated:: NEXT.VERSION .. deprecated:: 20.3
|api6_7_depr| |api6_7_depr|
button (:class:`telegram.InlineQueryResultsButton`, optional): A button to be shown button (:class:`telegram.InlineQueryResultsButton`, optional): A button to be shown
above the inline query results. above the inline query results.
.. versionadded:: NEXT.VERSION .. versionadded:: 20.3
Keyword Args: Keyword Args:
current_offset (:obj:`str`, optional): The :attr:`telegram.InlineQuery.offset` of 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. Use this method to change the bot's name.
.. versionadded:: NEXT.VERSION .. versionadded:: 20.3
Args: Args:
name (:obj:`str`, optional): New bot name; name (:obj:`str`, optional): New bot name;

View file

@ -30,7 +30,7 @@ class BotName(TelegramObject):
Objects of this class are comparable in terms of equality. Two objects of this class are Objects of this class are comparable in terms of equality. Two objects of this class are
considered equal, if their :attr:`name` is equal. considered equal, if their :attr:`name` is equal.
.. versionadded:: NEXT.VERSION .. versionadded:: 20.3
Args: Args:
name (:obj:`str`): The bot's name. name (:obj:`str`): The bot's name.

View file

@ -55,7 +55,7 @@ class ChatInviteLink(TelegramObject):
expire_date (:class:`datetime.datetime`, optional): Date when the link will expire or expire_date (:class:`datetime.datetime`, optional): Date when the link will expire or
has been expired. has been expired.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
member_limit (:obj:`int`, optional): Maximum number of users that can be members of the 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; 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 expire_date (:class:`datetime.datetime`): Optional. Date when the link will expire or
has been expired. has been expired.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
member_limit (:obj:`int`): Optional. Maximum number of users that can be members 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; of the chat simultaneously after joining the chat via this invite link;

View file

@ -57,7 +57,7 @@ class ChatJoinRequest(TelegramObject):
from_user (:class:`telegram.User`): User that sent the join request. from_user (:class:`telegram.User`): User that sent the join request.
date (:class:`datetime.datetime`): Date the request was sent. date (:class:`datetime.datetime`): Date the request was sent.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
user_chat_id (:obj:`int`): Identifier of a private chat with the user who sent the join 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 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. from_user (:class:`telegram.User`): User that sent the join request.
date (:class:`datetime.datetime`): Date the request was sent. date (:class:`datetime.datetime`): Date the request was sent.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
user_chat_id (:obj:`int`): Identifier of a private chat with the user who sent the join 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 request. This number may have more than 32 significant bits and some programming

View file

@ -390,7 +390,7 @@ class ChatMemberRestricted(ChatMember):
until_date (:class:`datetime.datetime`): Date when restrictions until_date (:class:`datetime.datetime`): Date when restrictions
will be lifted for this user. will be lifted for this user.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
can_send_audios (:obj:`bool`): :obj:`True`, if the user is allowed to send audios. 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 until_date (:class:`datetime.datetime`): Date when restrictions
will be lifted for this user. will be lifted for this user.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
can_send_audios (:obj:`bool`): :obj:`True`, if the user is allowed to send audios. 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 until_date (:class:`datetime.datetime`): Date when restrictions
will be lifted for this user. will be lifted for this user.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
Attributes: Attributes:
@ -584,7 +584,7 @@ class ChatMemberBanned(ChatMember):
until_date (:class:`datetime.datetime`): Date when restrictions until_date (:class:`datetime.datetime`): Date when restrictions
will be lifted for this user. will be lifted for this user.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
""" """

View file

@ -53,7 +53,7 @@ class ChatMemberUpdated(TelegramObject):
date (:class:`datetime.datetime`): Date the change was done in Unix time. Converted to date (:class:`datetime.datetime`): Date the change was done in Unix time. Converted to
:class:`datetime.datetime`. :class:`datetime.datetime`.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
old_chat_member (:class:`telegram.ChatMember`): Previous information about the chat member. old_chat_member (:class:`telegram.ChatMember`): Previous information about the chat member.
new_chat_member (:class:`telegram.ChatMember`): New 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 via_chat_folder_invite_link (:obj:`bool`, optional): :obj:`True`, if the user joined the
chat via a chat folder invite link chat via a chat folder invite link
.. versionadded:: NEXT.VERSION .. versionadded:: 20.3
Attributes: Attributes:
chat (:class:`telegram.Chat`): Chat the user belongs to. 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 date (:class:`datetime.datetime`): Date the change was done in Unix time. Converted to
:class:`datetime.datetime`. :class:`datetime.datetime`.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
old_chat_member (:class:`telegram.ChatMember`): Previous information about the chat member. old_chat_member (:class:`telegram.ChatMember`): Previous information about the chat member.
new_chat_member (:class:`telegram.ChatMember`): New 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 via_chat_folder_invite_link (:obj:`bool`): Optional. :obj:`True`, if the user joined the
chat via a chat folder invite link chat via a chat folder invite link
.. versionadded:: NEXT.VERSION .. versionadded:: 20.3
""" """

View file

@ -132,7 +132,7 @@ class InlineKeyboardButton(TelegramObject):
specified type, open that chat and insert the bot's username and the specified inline specified type, open that chat and insert the bot's username and the specified inline
query in the input field. query in the input field.
.. versionadded:: NEXT.VERSION .. versionadded:: 20.3
Tip: Tip:
This is similar to :paramref:`switch_inline_query`, but gives more control on 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 specified type, open that chat and insert the bot's username and the specified inline
query in the input field. query in the input field.
.. versionadded:: NEXT.VERSION .. versionadded:: 20.3
Tip: Tip:
This is similar to :attr:`switch_inline_query`, but gives more control on This is similar to :attr:`switch_inline_query`, but gives more control on

View file

@ -124,7 +124,7 @@ class Message(TelegramObject):
date (:class:`datetime.datetime`): Date the message was sent in Unix time. Converted to date (:class:`datetime.datetime`): Date the message was sent in Unix time. Converted to
:class:`datetime.datetime`. :class:`datetime.datetime`.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
chat (:class:`telegram.Chat`): Conversation the message belongs to. chat (:class:`telegram.Chat`): Conversation the message belongs to.
forward_from (:class:`telegram.User`, optional): For forwarded messages, sender of 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 forward_date (:class:`datetime.datetime`, optional): For forwarded messages, date the
original message was sent in Unix time. Converted to :class:`datetime.datetime`. original message was sent in Unix time. Converted to :class:`datetime.datetime`.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
is_automatic_forward (:obj:`bool`, optional): :obj:`True`, if the message is a channel is_automatic_forward (:obj:`bool`, optional): :obj:`True`, if the message is a channel
post that was automatically forwarded to the connected discussion group. 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 edit_date (:class:`datetime.datetime`, optional): Date the message was last edited in Unix
time. Converted to :class:`datetime.datetime`. time. Converted to :class:`datetime.datetime`.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
has_protected_content (:obj:`bool`, optional): :obj:`True`, if the message can't be has_protected_content (:obj:`bool`, optional): :obj:`True`, if the message can't be
forwarded. forwarded.
@ -350,7 +350,7 @@ class Message(TelegramObject):
date (:class:`datetime.datetime`): Date the message was sent in Unix time. Converted to date (:class:`datetime.datetime`): Date the message was sent in Unix time. Converted to
:class:`datetime.datetime`. :class:`datetime.datetime`.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
chat (:class:`telegram.Chat`): Conversation the message belongs to. chat (:class:`telegram.Chat`): Conversation the message belongs to.
forward_from (:class:`telegram.User`): Optional. For forwarded messages, sender of the 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 forward_date (:class:`datetime.datetime`): Optional. For forwarded messages, date the
original message was sent in Unix time. Converted to :class:`datetime.datetime`. original message was sent in Unix time. Converted to :class:`datetime.datetime`.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
is_automatic_forward (:obj:`bool`): Optional. :obj:`True`, if the message is a channel is_automatic_forward (:obj:`bool`): Optional. :obj:`True`, if the message is a channel
post that was automatically forwarded to the connected discussion group. 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 edit_date (:class:`datetime.datetime`): Optional. Date the message was last edited in Unix
time. Converted to :class:`datetime.datetime`. time. Converted to :class:`datetime.datetime`.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
has_protected_content (:obj:`bool`): Optional. :obj:`True`, if the message can't be has_protected_content (:obj:`bool`): Optional. :obj:`True`, if the message can't be
forwarded. forwarded.
@ -852,7 +852,7 @@ class Message(TelegramObject):
""":obj:`str`: Convenience property. If the chat of the message is not """: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. 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 For messages that are replies or part of a forum topic, the link now points
to the corresponding thread view. to the corresponding thread view.
""" """
@ -3369,7 +3369,7 @@ class Message(TelegramObject):
.. versionchanged:: 13.10 .. versionchanged:: 13.10
Spoiler entities are now formatted as HTML. Spoiler entities are now formatted as HTML.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
Custom emoji entities are now supported. Custom emoji entities are now supported.
Returns: Returns:
@ -3388,7 +3388,7 @@ class Message(TelegramObject):
.. versionchanged:: 13.10 .. versionchanged:: 13.10
Spoiler entities are now formatted as HTML. Spoiler entities are now formatted as HTML.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
Custom emoji entities are now supported. Custom emoji entities are now supported.
Returns: Returns:
@ -3408,7 +3408,7 @@ class Message(TelegramObject):
.. versionchanged:: 13.10 .. versionchanged:: 13.10
Spoiler entities are now formatted as HTML. Spoiler entities are now formatted as HTML.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
Custom emoji entities are now supported. Custom emoji entities are now supported.
Returns: Returns:
@ -3427,7 +3427,7 @@ class Message(TelegramObject):
.. versionchanged:: 13.10 .. versionchanged:: 13.10
Spoiler entities are now formatted as HTML. Spoiler entities are now formatted as HTML.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
Custom emoji entities are now supported. Custom emoji entities are now supported.
Returns: Returns:
@ -3601,7 +3601,7 @@ class Message(TelegramObject):
* |custom_emoji_formatting_note| * |custom_emoji_formatting_note|
.. deprecated:: NEXT.VERSION .. deprecated:: 20.3
|custom_emoji_md1_deprecation| |custom_emoji_md1_deprecation|
Returns: Returns:
@ -3625,7 +3625,7 @@ class Message(TelegramObject):
.. versionchanged:: 13.10 .. versionchanged:: 13.10
Spoiler entities are now formatted as Markdown V2. Spoiler entities are now formatted as Markdown V2.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
Custom emoji entities are now supported. Custom emoji entities are now supported.
Returns: Returns:
@ -3648,7 +3648,7 @@ class Message(TelegramObject):
* |custom_emoji_formatting_note| * |custom_emoji_formatting_note|
.. deprecated:: NEXT.VERSION .. deprecated:: 20.3
|custom_emoji_md1_deprecation| |custom_emoji_md1_deprecation|
Returns: Returns:
@ -3672,7 +3672,7 @@ class Message(TelegramObject):
.. versionchanged:: 13.10 .. versionchanged:: 13.10
Spoiler entities are now formatted as Markdown V2. Spoiler entities are now formatted as Markdown V2.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
Custom emoji entities are now supported. Custom emoji entities are now supported.
Returns: Returns:
@ -3695,7 +3695,7 @@ class Message(TelegramObject):
* |custom_emoji_formatting_note| * |custom_emoji_formatting_note|
.. deprecated:: NEXT.VERSION .. deprecated:: 20.3
|custom_emoji_md1_deprecation| |custom_emoji_md1_deprecation|
Returns: Returns:
@ -3719,7 +3719,7 @@ class Message(TelegramObject):
.. versionchanged:: 13.10 .. versionchanged:: 13.10
Spoiler entities are now formatted as Markdown V2. Spoiler entities are now formatted as Markdown V2.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
Custom emoji entities are now supported. Custom emoji entities are now supported.
Returns: Returns:
@ -3744,7 +3744,7 @@ class Message(TelegramObject):
* |custom_emoji_formatting_note| * |custom_emoji_formatting_note|
.. deprecated:: NEXT.VERSION .. deprecated:: 20.3
|custom_emoji_md1_deprecation| |custom_emoji_md1_deprecation|
Returns: Returns:
@ -3768,7 +3768,7 @@ class Message(TelegramObject):
.. versionchanged:: 13.10 .. versionchanged:: 13.10
Spoiler entities are now formatted as Markdown V2. Spoiler entities are now formatted as Markdown V2.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
Custom emoji entities are now supported. Custom emoji entities are now supported.
Returns: Returns:

View file

@ -173,7 +173,7 @@ class Poll(TelegramObject):
close_date (:obj:`datetime.datetime`, optional): Point in time (Unix timestamp) when the close_date (:obj:`datetime.datetime`, optional): Point in time (Unix timestamp) when the
poll will be automatically closed. Converted to :obj:`datetime.datetime`. poll will be automatically closed. Converted to :obj:`datetime.datetime`.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
Attributes: Attributes:
@ -209,7 +209,7 @@ class Poll(TelegramObject):
close_date (:obj:`datetime.datetime`): Optional. Point in time when the poll will be close_date (:obj:`datetime.datetime`): Optional. Point in time when the poll will be
automatically closed. automatically closed.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
""" """

View file

@ -31,7 +31,7 @@ class SwitchInlineQueryChosenChat(TelegramObject):
considered equal, if their :attr:`query`, :attr:`allow_user_chats`, :attr:`allow_bot_chats`, 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. :attr:`allow_group_chats`, and :attr:`allow_channel_chats` are equal.
.. versionadded:: NEXT.VERSION .. versionadded:: 20.3
Caution: Caution:
The PTB team has discovered that you must pass at least one of The PTB team has discovered that you must pass at least one of

View file

@ -50,7 +50,7 @@ class Version(NamedTuple):
return version 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__) __version__ = str(__version_info__)
# # SETUP.PY MARKER # # SETUP.PY MARKER

View file

@ -150,13 +150,13 @@ class VideoChatScheduled(TelegramObject):
start_date (:obj:`datetime.datetime`): Point in time (Unix timestamp) when the video start_date (:obj:`datetime.datetime`): Point in time (Unix timestamp) when the video
chat is supposed to be started by a chat administrator chat is supposed to be started by a chat administrator
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
Attributes: Attributes:
start_date (:obj:`datetime.datetime`): Point in time (Unix timestamp) when the video start_date (:obj:`datetime.datetime`): Point in time (Unix timestamp) when the video
chat is supposed to be started by a chat administrator chat is supposed to be started by a chat administrator
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
""" """

View file

@ -52,7 +52,7 @@ class WebhookInfo(TelegramObject):
last_error_date (:class:`datetime.datetime`): Optional. Datetime for the most recent last_error_date (:class:`datetime.datetime`): Optional. Datetime for the most recent
error that happened when trying to deliver an update via webhook. error that happened when trying to deliver an update via webhook.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
last_error_message (:obj:`str`, optional): Error message in human-readable format for the 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. most recent error that happened when trying to deliver an update via webhook.
@ -71,7 +71,7 @@ class WebhookInfo(TelegramObject):
.. versionadded:: 20.0 .. versionadded:: 20.0
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
Attributes: Attributes:
url (:obj:`str`): Webhook URL, may be empty if webhook is not set up. 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 last_error_date (:class:`datetime.datetime`): Optional. Datetime for the most recent
error that happened when trying to deliver an update via webhook. error that happened when trying to deliver an update via webhook.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
last_error_message (:obj:`str`): Optional. Error message in human-readable format for the 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. most recent error that happened when trying to deliver an update via webhook.
@ -102,7 +102,7 @@ class WebhookInfo(TelegramObject):
.. versionadded:: 20.0 .. versionadded:: 20.0
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
|datetime_localization| |datetime_localization|
""" """

View file

@ -33,12 +33,12 @@ class WriteAccessAllowed(TelegramObject):
Args: Args:
web_app_name (:obj:`str`, optional): Name of the Web App which was launched from a link. web_app_name (:obj:`str`, optional): Name of the Web App which was launched from a link.
.. versionadded:: NEXT.VERSION .. versionadded:: 20.3
Attributes: Attributes:
web_app_name (:obj:`str`): Optional. Name of the Web App which was launched from a link. web_app_name (:obj:`str`): Optional. Name of the Web App which was launched from a link.
.. versionadded:: NEXT.VERSION .. versionadded:: 20.3
""" """

View file

@ -215,7 +215,7 @@ class BotNameLimit(IntEnum):
"""This enum contains limitations for the methods :meth:`telegram.Bot.set_my_name`. """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. The enum members of this enumeration are instances of :class:`int` and can be treated as such.
.. versionadded:: NEXT.VERSION .. versionadded:: 20.3
""" """
__slots__ = () __slots__ = ()
@ -754,7 +754,7 @@ class InlineQueryLimit(IntEnum):
:paramref:`~telegram.Bot.answer_inline_query.switch_pm_parameter` parameter of :paramref:`~telegram.Bot.answer_inline_query.switch_pm_parameter` parameter of
:meth:`telegram.Bot.answer_inline_query`. :meth:`telegram.Bot.answer_inline_query`.
.. deprecated:: NEXT.VERSION .. deprecated:: 20.3
Deprecated in favor of :attr:`InlineQueryResultsButtonLimit.MIN_START_PARAMETER_LENGTH`. Deprecated in favor of :attr:`InlineQueryResultsButtonLimit.MIN_START_PARAMETER_LENGTH`.
""" """
MAX_SWITCH_PM_TEXT_LENGTH = 64 MAX_SWITCH_PM_TEXT_LENGTH = 64
@ -762,7 +762,7 @@ class InlineQueryLimit(IntEnum):
:paramref:`~telegram.Bot.answer_inline_query.switch_pm_parameter` parameter of :paramref:`~telegram.Bot.answer_inline_query.switch_pm_parameter` parameter of
:meth:`telegram.Bot.answer_inline_query`. :meth:`telegram.Bot.answer_inline_query`.
.. deprecated:: NEXT.VERSION .. deprecated:: 20.3
Deprecated in favor of :attr:`InlineQueryResultsButtonLimit.MAX_START_PARAMETER_LENGTH`. 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`. """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. The enum members of this enumeration are instances of :class:`int` and can be treated as such.
.. versionadded:: NEXT.VERSION .. versionadded:: 20.3
""" """
__slots__ = () __slots__ = ()

View file

@ -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 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. independent of the chat/user, it is recommended to use :attr:`bot_data` instead.
.. versionadded:: NEXT.VERSION .. versionadded:: 20.3
Args: Args:
chat_ids (:obj:`int` | Collection[:obj:`int`], optional): Chat IDs to mark. chat_ids (:obj:`int` | Collection[:obj:`int`], optional): Chat IDs to mark.

View file

@ -44,7 +44,7 @@ if TYPE_CHECKING:
def escape_markdown(text: str, version: int = 1, entity_type: str = None) -> str: def escape_markdown(text: str, version: int = 1, entity_type: str = None) -> str:
"""Helper function to escape telegram markup symbols. """Helper function to escape telegram markup symbols.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 20.3
Custom emoji entity escaping is now supported. Custom emoji entity escaping is now supported.
Args: Args: