From 2ac4e009d02e991b46e5c4363446dc3bd6dbb8be Mon Sep 17 00:00:00 2001 From: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com> Date: Fri, 12 Jul 2024 17:40:42 +0200 Subject: [PATCH] Bump version to v21.4 (#4371) --- CHANGES.rst | 52 +++++++++++++++++++ README.rst | 2 +- telegram/_bot.py | 18 +++---- telegram/_botcommandscope.py | 2 +- telegram/_chat.py | 2 +- telegram/_chatfullinfo.py | 4 +- telegram/_files/inputmedia.py | 6 +-- telegram/_menubutton.py | 2 +- telegram/_message.py | 28 +++++----- telegram/_messageentity.py | 2 +- telegram/_paidmedia.py | 10 ++-- .../_passport/encryptedpassportelement.py | 4 +- telegram/_passport/passportfile.py | 8 +-- telegram/_payment/stars.py | 22 ++++---- telegram/_reply.py | 4 +- telegram/_telegramobject.py | 4 +- telegram/_version.py | 2 +- telegram/constants.py | 16 +++--- telegram/ext/filters.py | 4 +- 19 files changed, 122 insertions(+), 70 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 79a6f1244..f56a61b9b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,58 @@ Changelog ========= +Version 21.4 +============ + +*Released 2024-07-12* + +This is the technical changelog for version 21.4. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel `_. + +Major Changes +------------- + +- Full Support for Bot API 7.5 (:pr:`4328`, :pr:`4316`, :pr:`4315`, :pr:`4312` closes :issue:`4310`, :pr:`4311`) +- Full Support for Bot API 7.6 (:pr:`4333` closes :issue:`4331`, :pr:`4344`, :pr:`4341`, :pr:`4334`, :pr:`4335`, :pr:`4351`, :pr:`4342`, :pr:`4348`) +- Full Support for Bot API 7.7 (:pr:`4356` closes :issue:`4355`) +- Drop ``python-telegram-bot-raw`` And Switch to ``pyproject.toml`` Based Packaging (:pr:`4288` closes :issue:`4129` and :issue:`4296`) +- Deprecate Inclusion of ``successful_payment`` in ``Message.effective_attachment`` (:pr:`4365` closes :issue:`4350`) + +New Features +------------ + +- Add Support for Python 3.13 Beta (:pr:`4253`) +- Add ``filters.PAID_MEDIA`` (:pr:`4357`) +- Log Received Data on Deserialization Errors (:pr:`4304`) +- Add ``MessageEntity.adjust_message_entities_to_utf_16`` Utility Function (:pr:`4323` by `Antares0982 `_ closes :issue:`4319`) +- Make Argument ``bot`` of ``TelegramObject.de_json`` Optional (:pr:`4320`) + +Documentation Improvements +-------------------------- + +- Documentation Improvements (:pr:`4303` closes :issue:`4301`) +- Restructure Readme (:pr:`4362`) +- Fix Link-Check Workflow (:pr:`4332`) + +Internal Changes +---------------- + +- Automate PyPI Releases (:pr:`4364` closes :issue:`4318`) +- Add ``mise-en-place`` to ``.gitignore`` (:pr:`4300`) +- Use a Composite Action for Testing Type Completeness (:pr:`4367`) +- Stabilize Some Concurrency Usages in Test Suite (:pr:`4360`) +- Add a Test Case for ``MenuButton`` (:pr:`4363`) +- Extend ``SuccessfulPayment`` Test (:pr:`4349`) +- Small Fixes for ``test_stars.py`` (:pr:`4347`) +- Use Python 3.13 Beta 3 in Test Suite (:pr:`4336`) + +Dependency Updates +------------------ + +- Bump ``ruff`` and Add New Rules (:pr:`4329`) +- Bump ``pre-commit`` Hooks to Latest Versions (:pr:`4337`) +- Add Lower Bound for ``flaky`` Dependency (:pr:`4322` by `Palaptin `_) +- Bump ``pytest`` from 8.2.1 to 8.2.2 (:pr:`4294`) + Version 21.3 ============ *Released 2024-06-07* diff --git a/README.rst b/README.rst index 2dabd3780..09b01d923 100644 --- a/README.rst +++ b/README.rst @@ -119,7 +119,7 @@ Verifying Releases To enable you to verify that a release file that you downloaded was indeed provided by the ``python-telegram-bot`` team, we have taken the following measures. -Starting with NEXT.VERSION, all releases are signed via `sigstore `_. +Starting with v21.4, all releases are signed via `sigstore `_. The corresponding signature files are uploaded to the `GitHub releases page`_. To verify the signature, please install the `sigstore Python client `_ and follow the instructions for `verifying signatures from GitHub Actions `_. As input for the ``--repository`` parameter, please use the value ``python-telegram-bot/python-telegram-bot``. diff --git a/telegram/_bot.py b/telegram/_bot.py index ff1ccbb37..4d8a778cc 100644 --- a/telegram/_bot.py +++ b/telegram/_bot.py @@ -2856,7 +2856,7 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]): .. versionadded:: 21.2. business_connection_id (:obj:`str`, optional): |business_id_str_edit| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Keyword Args: location (:class:`telegram.Location`, optional): The location to send. @@ -2932,7 +2932,7 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]): inline keyboard. business_connection_id (:obj:`str`, optional): |business_id_str_edit| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Returns: :class:`telegram.Message`: On success, if edited message is not an inline message, the @@ -4006,7 +4006,7 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]): inline keyboard. business_connection_id (:obj:`str`, optional): |business_id_str_edit| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Keyword Args: disable_web_page_preview (:obj:`bool`, optional): Disables link previews for links in @@ -4104,7 +4104,7 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]): .. versionadded:: 21.3 business_connection_id (:obj:`str`, optional): |business_id_str_edit| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Returns: :class:`telegram.Message`: On success, if edited message is not an inline message, the @@ -4177,7 +4177,7 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]): inline keyboard. business_connection_id (:obj:`str`, optional): |business_id_str_edit| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Returns: :class:`telegram.Message`: On success, if edited message is not an inline message, the @@ -4238,7 +4238,7 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]): inline keyboard. business_connection_id (:obj:`str`, optional): |business_id_str_edit| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Returns: :class:`telegram.Message`: On success, if edited message is not an inline message, the @@ -7185,7 +7185,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. message inline keyboard. business_connection_id (:obj:`str`, optional): |business_id_str_edit| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Returns: :class:`telegram.Poll`: On success, the stopped Poll is returned. @@ -9138,7 +9138,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. ) -> StarTransactions: """Returns the bot's Telegram Star transactions in chronological order. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Args: offset (:obj:`int`, optional): Number of transactions to skip in the response. @@ -9193,7 +9193,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. ) -> Message: """Use this method to send paid media to channel chats. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Args: chat_id (:obj:`int` | :obj:`str`): |chat_id_channel| diff --git a/telegram/_botcommandscope.py b/telegram/_botcommandscope.py index 53e65610c..73cafd175 100644 --- a/telegram/_botcommandscope.py +++ b/telegram/_botcommandscope.py @@ -95,7 +95,7 @@ class BotCommandScope(TelegramObject): bot (:class:`telegram.Bot`, optional): The bot associated with this object. Defaults to :obj:`None`, in which case shortcut methods will not be available. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.4 :paramref:`bot` is now optional and defaults to :obj:`None` Returns: diff --git a/telegram/_chat.py b/telegram/_chat.py index 2513e0ff3..200e192c9 100644 --- a/telegram/_chat.py +++ b/telegram/_chat.py @@ -3286,7 +3286,7 @@ class _ChatBase(TelegramObject): For the documentation of the arguments, please see :meth:`telegram.Bot.send_paid_media`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Returns: :class:`telegram.Message`: On success, instance representing the message posted. diff --git a/telegram/_chatfullinfo.py b/telegram/_chatfullinfo.py index d4bda7d41..04898659c 100644 --- a/telegram/_chatfullinfo.py +++ b/telegram/_chatfullinfo.py @@ -198,7 +198,7 @@ class ChatFullInfo(_ChatBase): can_send_paid_media (:obj:`bool`, optional): :obj:`True`, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Attributes: id (:obj:`int`): Unique identifier for this chat. @@ -352,7 +352,7 @@ class ChatFullInfo(_ChatBase): can_send_paid_media (:obj:`bool`): Optional. :obj:`True`, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 .. _accent colors: https://core.telegram.org/bots/api#accent-colors .. _topics: https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups diff --git a/telegram/_files/inputmedia.py b/telegram/_files/inputmedia.py index 3715682fa..692369130 100644 --- a/telegram/_files/inputmedia.py +++ b/telegram/_files/inputmedia.py @@ -124,7 +124,7 @@ class InputPaidMedia(TelegramObject): .. seealso:: :wiki:`Working with Files and Media ` - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Args: type (:obj:`str`): Type of media that the instance represents. @@ -164,7 +164,7 @@ class InputPaidMediaPhoto(InputPaidMedia): .. seealso:: :wiki:`Working with Files and Media ` - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Args: media (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | \ @@ -196,7 +196,7 @@ class InputPaidMediaVideo(InputPaidMedia): .. seealso:: :wiki:`Working with Files and Media ` - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Note: * When using a :class:`telegram.Video` for the :attr:`media` attribute, it will take the diff --git a/telegram/_menubutton.py b/telegram/_menubutton.py index ef89d8a53..50b6511b0 100644 --- a/telegram/_menubutton.py +++ b/telegram/_menubutton.py @@ -80,7 +80,7 @@ class MenuButton(TelegramObject): bot (:class:`telegram.Bot`, optional): The bot associated with this object. Defaults to :obj:`None`, in which case shortcut methods will not be available. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.4 :paramref:`bot` is now optional and defaults to :obj:`None` Returns: diff --git a/telegram/_message.py b/telegram/_message.py index edf9fb401..fceb8cb87 100644 --- a/telegram/_message.py +++ b/telegram/_message.py @@ -582,11 +582,11 @@ class Message(MaybeInaccessibleMessage): paid_media (:obj:`telegram.PaidMediaInfo`, optional): Message contains paid media; information about the paid media. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 refunded_payment (:obj:`telegram.RefundedPayment`, optional): Message is a service message about a refunded payment, information about the payment. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Attributes: message_id (:obj:`int`): Unique message identifier inside this chat. @@ -909,11 +909,11 @@ class Message(MaybeInaccessibleMessage): paid_media (:obj:`telegram.PaidMediaInfo`): Optional. Message contains paid media; information about the paid media. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 refunded_payment (:obj:`telegram.RefundedPayment`): Optional. Message is a service message about a refunded payment, information about the payment. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 .. |custom_emoji_no_md1_support| replace:: Since custom emoji entities are not supported by :attr:`~telegram.constants.ParseMode.MARKDOWN`, this method now raises a @@ -1426,10 +1426,10 @@ class Message(MaybeInaccessibleMessage): :attr:`dice`, :attr:`passport_data` and :attr:`poll` are now also considered to be an attachment. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.4 :attr:`paid_media` is now also considered to be an attachment. - .. deprecated:: NEXT.VERSION + .. deprecated:: 21.4 :attr:`successful_payment` will be removed in future major versions. """ @@ -1442,7 +1442,7 @@ class Message(MaybeInaccessibleMessage): if attachment_type == MessageAttachmentType.SUCCESSFUL_PAYMENT: warn( PTBDeprecationWarning( - "NEXT.VERSION", + "21.4", "successful_payment will no longer be considered an attachment in" " future major versions", ), @@ -3649,7 +3649,7 @@ class Message(MaybeInaccessibleMessage): of methods) or channel posts, if the bot is an admin in that channel. However, this behaviour is undocumented and might be changed by Telegram. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.4 Now also passes :attr:`business_connection_id`. Returns: @@ -3706,7 +3706,7 @@ class Message(MaybeInaccessibleMessage): of methods) or channel posts, if the bot is an admin in that channel. However, this behaviour is undocumented and might be changed by Telegram. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.4 Now also passes :attr:`business_connection_id`. Returns: @@ -3759,7 +3759,7 @@ class Message(MaybeInaccessibleMessage): of methods) or channel posts, if the bot is an admin in that channel. However, this behaviour is undocumented and might be changed by Telegram. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.4 Now also passes :attr:`business_connection_id`. Returns: @@ -3808,7 +3808,7 @@ class Message(MaybeInaccessibleMessage): of methods) or channel posts, if the bot is an admin in that channel. However, this behaviour is undocumented and might be changed by Telegram. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.4 Now also passes :attr:`business_connection_id`. Returns: @@ -3862,7 +3862,7 @@ class Message(MaybeInaccessibleMessage): of methods) or channel posts, if the bot is an admin in that channel. However, this behaviour is undocumented and might be changed by Telegram. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.4 Now also passes :attr:`business_connection_id`. Returns: @@ -3916,7 +3916,7 @@ class Message(MaybeInaccessibleMessage): of methods) or channel posts, if the bot is an admin in that channel. However, this behaviour is undocumented and might be changed by Telegram. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.4 Now also passes :attr:`business_connection_id`. Returns: @@ -4072,7 +4072,7 @@ class Message(MaybeInaccessibleMessage): For the documentation of the arguments, please see :meth:`telegram.Bot.stop_poll`. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.4 Now also passes :attr:`business_connection_id`. Returns: diff --git a/telegram/_messageentity.py b/telegram/_messageentity.py index bc80c2dcb..302f3a1c0 100644 --- a/telegram/_messageentity.py +++ b/telegram/_messageentity.py @@ -158,7 +158,7 @@ class MessageEntity(TelegramObject): For more information, see `Unicode `_ and `Plane (Unicode) `_. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Examples: Below is a snippet of code that demonstrates how to use this function to convert diff --git a/telegram/_paidmedia.py b/telegram/_paidmedia.py index 82594ada3..fe78cca28 100644 --- a/telegram/_paidmedia.py +++ b/telegram/_paidmedia.py @@ -42,7 +42,7 @@ class PaidMedia(TelegramObject): Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`type` is equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Args: type (:obj:`str`): Type of the paid media. @@ -114,7 +114,7 @@ class PaidMediaPreview(PaidMedia): considered equal, if their :attr:`width`, :attr:`height`, and :attr:`duration` are equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Args: type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.PREVIEW`. @@ -156,7 +156,7 @@ class PaidMediaPhoto(PaidMedia): Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`photo` are equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Args: type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.PHOTO`. @@ -202,7 +202,7 @@ class PaidMediaVideo(PaidMedia): Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`video` are equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Args: type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.VIDEO`. @@ -248,7 +248,7 @@ class PaidMediaInfo(TelegramObject): Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`star_count` and :attr:`paid_media` are equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Args: star_count (:obj:`int`): The number of Telegram Stars that must be paid to buy access to diff --git a/telegram/_passport/encryptedpassportelement.py b/telegram/_passport/encryptedpassportelement.py index 76eb8e51f..b05003f2c 100644 --- a/telegram/_passport/encryptedpassportelement.py +++ b/telegram/_passport/encryptedpassportelement.py @@ -222,10 +222,10 @@ class EncryptedPassportElement(TelegramObject): bot (:class:`telegram.Bot` | :obj:`None`): The bot associated with these object. May be :obj:`None`, in which case shortcut methods will not be available. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.4 :paramref:`bot` is now optional and defaults to :obj:`None` - .. deprecated:: NEXT.VERSION + .. deprecated:: 21.4 This argument will be converted to an optional argument in future versions. credentials (:class:`telegram.FileCredentials`): The credentials diff --git a/telegram/_passport/passportfile.py b/telegram/_passport/passportfile.py index 3ae4a42e8..61b704862 100644 --- a/telegram/_passport/passportfile.py +++ b/telegram/_passport/passportfile.py @@ -128,10 +128,10 @@ class PassportFile(TelegramObject): bot (:class:`telegram.Bot` | :obj:`None`): The bot associated with these object. May be :obj:`None`, in which case shortcut methods will not be available. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.4 :paramref:`bot` is now optional and defaults to :obj:`None` - .. deprecated:: NEXT.VERSION + .. deprecated:: 21.4 This argument will be converted to an optional argument in future versions. credentials (:class:`telegram.FileCredentials`): The credentials @@ -168,10 +168,10 @@ class PassportFile(TelegramObject): bot (:class:`telegram.Bot` | :obj:`None`): The bot associated with these object. May be :obj:`None`, in which case shortcut methods will not be available. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.4 :paramref:`bot` is now optional and defaults to :obj:`None` - .. deprecated:: NEXT.VERSION + .. deprecated:: 21.4 This argument will be converted to an optional argument in future versions. credentials (:class:`telegram.FileCredentials`): The credentials diff --git a/telegram/_payment/stars.py b/telegram/_payment/stars.py index 6c537532c..b176f2315 100644 --- a/telegram/_payment/stars.py +++ b/telegram/_payment/stars.py @@ -45,7 +45,7 @@ class RevenueWithdrawalState(TelegramObject): Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`type` is equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Args: type (:obj:`str`): The type of the state. @@ -94,7 +94,7 @@ class RevenueWithdrawalState(TelegramObject): class RevenueWithdrawalStatePending(RevenueWithdrawalState): """The withdrawal is in progress. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Attributes: type (:obj:`str`): The type of the state, always @@ -114,7 +114,7 @@ class RevenueWithdrawalStateSucceeded(RevenueWithdrawalState): Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`date` are equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Args: date (:obj:`datetime.datetime`): Date the withdrawal was completed as a datetime object. @@ -165,7 +165,7 @@ class RevenueWithdrawalStateSucceeded(RevenueWithdrawalState): class RevenueWithdrawalStateFailed(RevenueWithdrawalState): """The withdrawal failed and the transaction was refunded. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Attributes: type (:obj:`str`): The type of the state, always @@ -191,7 +191,7 @@ class TransactionPartner(TelegramObject): Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`type` is equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Args: type (:obj:`str`): The type of the transaction partner. @@ -257,7 +257,7 @@ class TransactionPartner(TelegramObject): class TransactionPartnerFragment(TransactionPartner): """Describes a withdrawal transaction with Fragment. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Args: withdrawal_state (:obj:`telegram.RevenueWithdrawalState`, optional): State of the @@ -305,7 +305,7 @@ class TransactionPartnerUser(TransactionPartner): Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`user` are equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Args: user (:class:`telegram.User`): Information about the user. @@ -354,7 +354,7 @@ class TransactionPartnerUser(TransactionPartner): class TransactionPartnerOther(TransactionPartner): """Describes a transaction with an unknown partner. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Attributes: type (:obj:`str`): The type of the transaction partner, @@ -371,7 +371,7 @@ class TransactionPartnerOther(TransactionPartner): class TransactionPartnerTelegramAds(TransactionPartner): """Describes a withdrawal transaction to the Telegram Ads platform. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Attributes: type (:obj:`str`): The type of the transaction partner, @@ -391,7 +391,7 @@ class StarTransaction(TelegramObject): Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`id`, :attr:`source`, and :attr:`receiver` are equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Args: id (:obj:`str`): Unique identifier of the transaction. Coincides with the identifer @@ -474,7 +474,7 @@ class StarTransactions(TelegramObject): Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`transactions` are equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Args: transactions (Sequence[:class:`telegram.StarTransaction`]): The list of transactions. diff --git a/telegram/_reply.py b/telegram/_reply.py index 2aefa1508..0c15844c8 100644 --- a/telegram/_reply.py +++ b/telegram/_reply.py @@ -108,7 +108,7 @@ class ExternalReplyInfo(TelegramObject): paid_media (:class:`telegram.PaidMedia`, optional): Message contains paid media; information about the paid media. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 Attributes: origin (:class:`telegram.MessageOrigin`): Origin of the message replied to by the given @@ -158,7 +158,7 @@ class ExternalReplyInfo(TelegramObject): paid_media (:class:`telegram.PaidMedia`): Optional. Message contains paid media; information about the paid media. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 """ __slots__ = ( diff --git a/telegram/_telegramobject.py b/telegram/_telegramobject.py index 04275b9a9..4f7ba92d6 100644 --- a/telegram/_telegramobject.py +++ b/telegram/_telegramobject.py @@ -442,7 +442,7 @@ class TelegramObject: bot (:class:`telegram.Bot`, optional): The bot associated with this object. Defaults to :obj:`None`, in which case shortcut methods will not be available. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.4 :paramref:`bot` is now optional and defaults to :obj:`None` Returns: @@ -467,7 +467,7 @@ class TelegramObject: bot (:class:`telegram.Bot`, optional): The bot associated with these object. Defaults to :obj:`None`, in which case shortcut methods will not be available. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.4 :paramref:`bot` is now optional and defaults to :obj:`None` Returns: diff --git a/telegram/_version.py b/telegram/_version.py index 557a1ab90..ec3f5618c 100644 --- a/telegram/_version.py +++ b/telegram/_version.py @@ -51,6 +51,6 @@ class Version(NamedTuple): __version_info__: Final[Version] = Version( - major=21, minor=3, micro=0, releaselevel="final", serial=0 + major=21, minor=4, micro=0, releaselevel="final", serial=0 ) __version__: Final[str] = str(__version_info__) diff --git a/telegram/constants.py b/telegram/constants.py index 9cd41b5f3..fb4bc9a19 100644 --- a/telegram/constants.py +++ b/telegram/constants.py @@ -1265,7 +1265,7 @@ class InputPaidMediaType(StringEnum): """This enum contains the available types of :class:`telegram.InputPaidMedia`. The enum members of this enumeration are instances of :class:`str` and can be treated as such. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 """ __slots__ = () @@ -1622,7 +1622,7 @@ class MessageAttachmentType(StringEnum): PAID_MEDIA = "paid_media" """:obj:`str`: Messages with :attr:`telegram.Message.paid_media`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 """ PASSPORT_DATA = "passport_data" """:obj:`str`: Messages with :attr:`telegram.Message.passport_data`.""" @@ -1908,7 +1908,7 @@ class MessageType(StringEnum): PAID_MEDIA = "paid_media" """:obj:`str`: Messages with :attr:`telegram.Message.paid_media`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 """ PASSPORT_DATA = "passport_data" """:obj:`str`: Messages with :attr:`telegram.Message.passport_data`.""" @@ -1923,7 +1923,7 @@ class MessageType(StringEnum): REFUNDED_PAYMENT = "refunded_payment" """:obj:`str`: Messages with :attr:`telegram.Message.refunded_payment`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 """ REPLY_TO_STORY = "reply_to_story" """:obj:`str`: Messages with :attr:`telegram.Message.reply_to_story`. @@ -1988,7 +1988,7 @@ class PaidMediaType(StringEnum): This enum contains the available types of :class:`telegram.PaidMedia`. The enum members of this enumeration are instances of :class:`str` and can be treated as such. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 """ __slots__ = () @@ -2360,7 +2360,7 @@ class RevenueWithdrawalStateType(StringEnum): """This enum contains the available types of :class:`telegram.RevenueWithdrawalState`. The enum members of this enumeration are instances of :class:`str` and can be treated as such. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 """ __slots__ = () @@ -2377,7 +2377,7 @@ class StarTransactionsLimit(IntEnum): """This enum contains limitations for :class:`telegram.Bot.get_star_transactions`. The enum members of this enumeration are instances of :class:`int` and can be treated as such. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 """ __slots__ = () @@ -2529,7 +2529,7 @@ class TransactionPartnerType(StringEnum): """This enum contains the available types of :class:`telegram.TransactionPartner`. The enum members of this enumeration are instances of :class:`str` and can be treated as such. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 """ __slots__ = () diff --git a/telegram/ext/filters.py b/telegram/ext/filters.py index bc6b06fda..de105e28b 100644 --- a/telegram/ext/filters.py +++ b/telegram/ext/filters.py @@ -1717,7 +1717,7 @@ class _PaidMedia(MessageFilter): PAID_MEDIA = _PaidMedia(name="filters.PAID_MEDIA") """Messages that contain :attr:`telegram.Message.paid_media`. -.. versionadded:: NEXT.VERSION +.. versionadded:: 21.4 """ @@ -2214,7 +2214,7 @@ class StatusUpdate: REFUNDED_PAYMENT = _RefundedPayment("filters.StatusUpdate.REFUNDED_PAYMENT") """Messages that contain :attr:`telegram.Message.refunded_payment`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.4 """ class _UserShared(MessageFilter):