diff --git a/CHANGES.rst b/CHANGES.rst index 8e5f302dd..ba37e99a3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,37 @@ Changelog ========= +Version 21.6 +============ + +*Released 2024-09-19* + +This is the technical changelog for version 21.6. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel `_. + +New Features +------------ + +- Full Support for Bot API 7.10 (:pr:`4461` closes :issue:`4459`, :pr:`4460`, :pr:`4463` by `aelkheir `_, :pr:`4464`) +- Add Parameter ``httpx_kwargs`` to ``HTTPXRequest`` (:pr:`4451` closes :issue:`4424`) + +Minor Changes +------------- + +- Improve Type Completeness (:pr:`4466`) + +Internal Changes +---------------- + +- Update Python 3.13 Test Suite to RC2 (:pr:`4471`) +- Enforce the ``offline_bot`` Fixture in ``Test*WithoutRequest`` (:pr:`4465`) +- Make Tests for ``telegram.ext`` Independent of Networking (:pr:`4454`) +- Rename Testing Base Classes (:pr:`4453`) + +Dependency Updates +------------------ + +- Bump ``pytest`` from 8.3.2 to 8.3.3 (:pr:`4475`) + Version 21.5 ============ diff --git a/telegram/_bot.py b/telegram/_bot.py index 62f25125c..513e43d16 100644 --- a/telegram/_bot.py +++ b/telegram/_bot.py @@ -9220,7 +9220,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. 0-:tg-const:`telegram.constants.InvoiceLimit.MAX_PAYLOAD_LENGTH` bytes. This will not be displayed to the user, use it for your internal processes. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 caption (:obj:`str`, optional): Caption of the media to be sent, 0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters. parse_mode (:obj:`str`, optional): |parse_mode| diff --git a/telegram/_chatboost.py b/telegram/_chatboost.py index c39537442..e5e26d2f4 100644 --- a/telegram/_chatboost.py +++ b/telegram/_chatboost.py @@ -202,7 +202,7 @@ class ChatBoostSourceGiveaway(ChatBoostSource): prize_star_count (:obj:`int`, optional): The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 is_unclaimed (:obj:`bool`, optional): :obj:`True`, if the giveaway was completed, but there was no user to win the prize. @@ -215,7 +215,7 @@ class ChatBoostSourceGiveaway(ChatBoostSource): prize_star_count (:obj:`int`): Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 is_unclaimed (:obj:`bool`): Optional. :obj:`True`, if the giveaway was completed, but there was no user to win the prize. """ diff --git a/telegram/_giveaway.py b/telegram/_giveaway.py index a482f4757..1e258b477 100644 --- a/telegram/_giveaway.py +++ b/telegram/_giveaway.py @@ -59,7 +59,7 @@ class Giveaway(TelegramObject): prize_star_count (:obj:`int`, optional): The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 premium_subscription_month_count (:obj:`int`, optional): The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only. @@ -83,7 +83,7 @@ class Giveaway(TelegramObject): prize_star_count (:obj:`int`): Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 premium_subscription_month_count (:obj:`int`): Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only. @@ -163,13 +163,13 @@ class GiveawayCreated(TelegramObject): prize_star_count (:obj:`int`, optional): The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 Attributes: prize_star_count (:obj:`int`): Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 """ @@ -204,7 +204,7 @@ class GiveawayWinners(TelegramObject): prize_star_count (:obj:`int`, optional): The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 additional_chat_count (:obj:`int`, optional): The number of other chats the user had to join in order to be eligible for the giveaway premium_subscription_month_count (:obj:`int`, optional): The number of months the Telegram @@ -229,7 +229,7 @@ class GiveawayWinners(TelegramObject): prize_star_count (:obj:`int`): Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 premium_subscription_month_count (:obj:`int`): Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for unclaimed_prize_count (:obj:`int`): Optional. Number of undistributed prizes @@ -337,7 +337,7 @@ class GiveawayCompleted(TelegramObject): is_star_giveaway (:obj:`bool`, optional): :obj:`True`, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 Attributes: winner_count (:obj:`int`): Number of winners in the giveaway unclaimed_prize_count (:obj:`int`): Optional. Number of undistributed prizes @@ -346,7 +346,7 @@ class GiveawayCompleted(TelegramObject): is_star_giveaway (:obj:`bool`): Optional. :obj:`True`, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 """ __slots__ = ("giveaway_message", "is_star_giveaway", "unclaimed_prize_count", "winner_count") diff --git a/telegram/_paidmedia.py b/telegram/_paidmedia.py index 57126b130..1c2cc4091 100644 --- a/telegram/_paidmedia.py +++ b/telegram/_paidmedia.py @@ -300,7 +300,7 @@ class PaidMediaPurchased(TelegramObject): Note: In Python :keyword:`from` is a reserved word. Use :paramref:`from_user` instead. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 Args: from_user (:class:`telegram.User`): User who purchased the media. diff --git a/telegram/_payment/stars.py b/telegram/_payment/stars.py index 2a3f1dca2..dfeb832e2 100644 --- a/telegram/_payment/stars.py +++ b/telegram/_payment/stars.py @@ -330,7 +330,7 @@ class TransactionPartnerUser(TransactionPartner): .. versionadded:: 21.5 paid_media_payload (:obj:`str`, optional): Optional. Bot-specified paid media payload. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 Attributes: type (:obj:`str`): The type of the transaction partner, @@ -343,7 +343,7 @@ class TransactionPartnerUser(TransactionPartner): .. versionadded:: 21.5 paid_media_payload (:obj:`str`): Optional. Optional. Bot-specified paid media payload. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 """ diff --git a/telegram/_update.py b/telegram/_update.py index be4f2ec58..5db7b9a55 100644 --- a/telegram/_update.py +++ b/telegram/_update.py @@ -160,7 +160,7 @@ class Update(TelegramObject): purchased_paid_media (:class:`telegram.PaidMediaPurchased`, optional): A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 Attributes: @@ -273,7 +273,7 @@ class Update(TelegramObject): purchased_paid_media (:class:`telegram.PaidMediaPurchased`): Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 """ __slots__ = ( @@ -399,7 +399,7 @@ class Update(TelegramObject): PURCHASED_PAID_MEDIA: Final[str] = constants.UpdateType.PURCHASED_PAID_MEDIA """:const:`telegram.constants.UpdateType.PURCHASED_PAID_MEDIA` - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 """ ALL_TYPES: Final[List[str]] = list(constants.UpdateType) @@ -496,7 +496,7 @@ class Update(TelegramObject): This property now also considers :attr:`business_connection`, :attr:`business_message` and :attr:`edited_business_message`. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.6 This property now also considers :attr:`purchased_paid_media`. Example: diff --git a/telegram/_version.py b/telegram/_version.py index 20043c830..bb946f535 100644 --- a/telegram/_version.py +++ b/telegram/_version.py @@ -51,6 +51,6 @@ class Version(NamedTuple): __version_info__: Final[Version] = Version( - major=21, minor=5, micro=0, releaselevel="final", serial=0 + major=21, minor=6, micro=0, releaselevel="final", serial=0 ) __version__: Final[str] = str(__version_info__) diff --git a/telegram/constants.py b/telegram/constants.py index 4d95368ce..582de62c4 100644 --- a/telegram/constants.py +++ b/telegram/constants.py @@ -2782,7 +2782,7 @@ class UpdateType(StringEnum): PURCHASED_PAID_MEDIA = "purchased_paid_media" """:obj:`str`: Updates with :attr:`telegram.Update.purchased_paid_media`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 """ @@ -2871,14 +2871,14 @@ class InvoiceLimit(IntEnum): passed as :paramref:`~telegram.Bot.send_paid_media.star_count` parameter of :meth:`telegram.Bot.send_paid_media`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 """ MAX_STAR_COUNT = 2500 """:obj:`int`: Maximum amount of starts that must be paid to buy access to a paid media passed as :paramref:`~telegram.Bot.send_paid_media.star_count` parameter of :meth:`telegram.Bot.send_paid_media`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 """ diff --git a/telegram/ext/_handlers/paidmediapurchasedhandler.py b/telegram/ext/_handlers/paidmediapurchasedhandler.py index 13a7cf123..f74e0dae0 100644 --- a/telegram/ext/_handlers/paidmediapurchasedhandler.py +++ b/telegram/ext/_handlers/paidmediapurchasedhandler.py @@ -32,7 +32,7 @@ class PaidMediaPurchasedHandler(BaseHandler[Update, CCT, RT]): """Handler class to handle Telegram :attr:`purchased paid media `. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 Args: callback (:term:`coroutine function`): The callback function for this handler. Will be diff --git a/telegram/request/_httpxrequest.py b/telegram/request/_httpxrequest.py index d74ed00d8..a2e13582d 100644 --- a/telegram/request/_httpxrequest.py +++ b/telegram/request/_httpxrequest.py @@ -135,7 +135,7 @@ class HTTPXRequest(BaseRequest): No runtime warnings will be issued about parameters that are overridden in this way. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.6 """