From cec34e4bca3c0f6d301f6e5c328696bee05f85ea Mon Sep 17 00:00:00 2001 From: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com> Date: Sun, 1 Dec 2024 12:19:55 +0100 Subject: [PATCH] Bump Version to v21.8 (#4583) --- CHANGES.rst | 16 ++++++++++++++++ telegram/_bot.py | 14 +++++++------- telegram/_chat.py | 2 +- telegram/_gifts.py | 4 ++-- telegram/_inline/preparedinlinemessage.py | 2 +- telegram/_payment/stars.py | 8 ++++---- telegram/_payment/successfulpayment.py | 12 ++++++------ telegram/_user.py | 2 +- telegram/_version.py | 2 +- telegram/constants.py | 4 ++-- 10 files changed, 41 insertions(+), 25 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 32dee75b1..14fa20129 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,22 @@ Changelog ========= +Version 21.8 +============ +*Released 2024-12-01* + +This is the technical changelog for version 21.8. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel `_. + +Major Changes +------------- + +- Full Support for Bot API 8.0 (:pr:`4568`, :pr:`4566` closes :issue:`4567`, :pr:`4572`, :pr:`4571`, :pr:`4570`, :pr:`4576`, :pr:`4574`) + +Documentation Improvements +-------------------------- + +- Documentation Improvements (:pr:`4565` by `Snehashish06 `_, :pr:`4573`) + Version 21.7 ============ *Released 2024-11-04* diff --git a/telegram/_bot.py b/telegram/_bot.py index 338c2843b..7ba6c9a78 100644 --- a/telegram/_bot.py +++ b/telegram/_bot.py @@ -3660,7 +3660,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]): ) -> PreparedInlineMessage: """Stores a message that can be sent by a user of a Mini App. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 Args: user_id (:obj:`int`): Unique identifier of the target user that can use the prepared @@ -6246,7 +6246,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]): `requestEmojiStatusAccess `_ . - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 Args: user_id (:obj:`int`): Unique identifier of the target user @@ -8142,7 +8142,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. business_connection_id (:obj:`str`, optional): |business_id_str| For payments in |tg_stars| only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 title (:obj:`str`): Product name. :tg-const:`telegram.Invoice.MIN_TITLE_LENGTH`- :tg-const:`telegram.Invoice.MAX_TITLE_LENGTH` characters. description (:obj:`str`): Product description. @@ -8177,7 +8177,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 max_tip_amount (:obj:`int`, optional): The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of ``US$ 1.45`` pass ``max_tip_amount = 145``. See the ``exp`` @@ -9391,7 +9391,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. """Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 Args: user_id (:obj:`int`): Identifier of the user whose subscription will be edited. @@ -9656,7 +9656,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. """Returns the list of gifts that can be sent by the bot to users. Requires no parameters. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 Returns: :class:`telegram.Gifts` @@ -9692,7 +9692,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. """Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 Args: user_id (:obj:`int`): Unique identifier of the target user that will receive the gift diff --git a/telegram/_chat.py b/telegram/_chat.py index 08321fe25..1fd359516 100644 --- a/telegram/_chat.py +++ b/telegram/_chat.py @@ -3459,7 +3459,7 @@ class _ChatBase(TelegramObject): Caution: Can only work, if the chat is a private chat, see :attr:`type`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 Returns: :obj:`bool`: On success, :obj:`True` is returned. diff --git a/telegram/_gifts.py b/telegram/_gifts.py index 63055974c..4aa5f5f60 100644 --- a/telegram/_gifts.py +++ b/telegram/_gifts.py @@ -36,7 +36,7 @@ class Gift(TelegramObject): Objects of this class are comparable in terms of equality. Two objects of this class are considered equal if their :attr:`id` is equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 Args: id (:obj:`str`): Unique identifier of the gift @@ -99,7 +99,7 @@ class Gifts(TelegramObject): Objects of this class are comparable in terms of equality. Two objects of this class are considered equal if their :attr:`gifts` are equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 Args: gifts (Sequence[:class:`Gift`]): The sequence of gifts diff --git a/telegram/_inline/preparedinlinemessage.py b/telegram/_inline/preparedinlinemessage.py index cc4078d2d..3f094d56b 100644 --- a/telegram/_inline/preparedinlinemessage.py +++ b/telegram/_inline/preparedinlinemessage.py @@ -34,7 +34,7 @@ class PreparedInlineMessage(TelegramObject): Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`id` is equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 Args: id (:obj:`str`): Unique identifier of the prepared message diff --git a/telegram/_payment/stars.py b/telegram/_payment/stars.py index e6c685497..61b5ded46 100644 --- a/telegram/_payment/stars.py +++ b/telegram/_payment/stars.py @@ -332,7 +332,7 @@ class TransactionPartnerUser(TransactionPartner): subscription_period (:class:`datetime.timedelta`, optional): The duration of the paid subscription - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 paid_media (Sequence[:class:`telegram.PaidMedia`], optional): Information about the paid media bought by the user. @@ -342,7 +342,7 @@ class TransactionPartnerUser(TransactionPartner): .. versionadded:: 21.6 gift (:class:`telegram.Gift`, optional): The gift sent to the user by the bot - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 Attributes: type (:obj:`str`): The type of the transaction partner, @@ -352,7 +352,7 @@ class TransactionPartnerUser(TransactionPartner): subscription_period (:class:`datetime.timedelta`): Optional. The duration of the paid subscription - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 paid_media (tuple[:class:`telegram.PaidMedia`]): Optional. Information about the paid media bought by the user. @@ -362,7 +362,7 @@ class TransactionPartnerUser(TransactionPartner): .. versionadded:: 21.6 gift (:class:`telegram.Gift`): Optional. The gift sent to the user by the bot - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 """ diff --git a/telegram/_payment/successfulpayment.py b/telegram/_payment/successfulpayment.py index 434cecfcf..5a947a8f4 100644 --- a/telegram/_payment/successfulpayment.py +++ b/telegram/_payment/successfulpayment.py @@ -50,14 +50,14 @@ class SuccessfulPayment(TelegramObject): subscription_expiration_date (:class:`datetime.datetime`, optional): Expiration date of the subscription; for recurring payments only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 is_recurring (:obj:`bool`, optional): True, if the payment is for a subscription. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 is_first_recurring (:obj:`bool`, optional): True, if the payment is the first payment of a subscription. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 shipping_option_id (:obj:`str`, optional): Identifier of the shipping option chosen by the user. order_info (:class:`telegram.OrderInfo`, optional): Order info provided by the user. @@ -77,14 +77,14 @@ class SuccessfulPayment(TelegramObject): subscription_expiration_date (:class:`datetime.datetime`): Optional. Expiration date of the subscription; for recurring payments only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 is_recurring (:obj:`bool`): Optional. True, if the payment is for a subscription. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 is_first_recurring (:obj:`bool`): Optional. True, if the payment is the first payment of a subscription. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 shipping_option_id (:obj:`str`): Optional. Identifier of the shipping option chosen by the user. order_info (:class:`telegram.OrderInfo`): Optional. Order info provided by the user. diff --git a/telegram/_user.py b/telegram/_user.py index 2a4b4dc7a..c4296e819 100644 --- a/telegram/_user.py +++ b/telegram/_user.py @@ -1666,7 +1666,7 @@ class User(TelegramObject): For the documentation of the arguments, please see :meth:`telegram.Bot.send_gift`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 Returns: :obj:`bool`: On success, :obj:`True` is returned. diff --git a/telegram/_version.py b/telegram/_version.py index 5f9c77cc5..3598e56db 100644 --- a/telegram/_version.py +++ b/telegram/_version.py @@ -51,6 +51,6 @@ class Version(NamedTuple): __version_info__: Final[Version] = Version( - major=21, minor=7, micro=0, releaselevel="final", serial=0 + major=21, minor=8, micro=0, releaselevel="final", serial=0 ) __version__: Final[str] = str(__version_info__) diff --git a/telegram/constants.py b/telegram/constants.py index b3d17c4ff..4f0b993f3 100644 --- a/telegram/constants.py +++ b/telegram/constants.py @@ -1229,7 +1229,7 @@ class GiftLimit(IntEnum): """This enum contains limitations for :meth:`~telegram.Bot.send_gift`. The enum members of this enumeration are instances of :class:`int` and can be treated as such. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 """ __slots__ = () @@ -2923,7 +2923,7 @@ class InvoiceLimit(IntEnum): the next payment, passed as :paramref:`~telegram.Bot.create_invoice_link.subscription_period` parameter of :meth:`telegram.Bot.create_invoice_link`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.8 """