From 491a8815557071d539e61ae7bba7bb19032d9cbd Mon Sep 17 00:00:00 2001 From: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com> Date: Sun, 1 Sep 2024 14:52:12 +0200 Subject: [PATCH] Bump Version to v21.5 --- CHANGES.rst | 52 +++++++++++++++++++ telegram/_bot.py | 10 ++-- telegram/_chat.py | 4 +- telegram/_chatinvitelink.py | 8 +-- telegram/_chatmember.py | 4 +- telegram/_files/inputfile.py | 4 +- telegram/_message.py | 4 +- telegram/_messageentity.py | 4 +- telegram/_payment/stars.py | 4 +- telegram/_reaction.py | 6 +-- telegram/_user.py | 4 +- telegram/_utils/strings.py | 2 +- telegram/_version.py | 2 +- telegram/constants.py | 4 +- .../ext/_handlers/callbackqueryhandler.py | 4 +- telegram/request/_requestdata.py | 2 +- telegram/request/_requestparameter.py | 2 +- 17 files changed, 86 insertions(+), 34 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index f56a61b9b0c..8e5f302dd03 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,58 @@ Changelog ========= +Version 21.5 +============ + +*Released 2024-09-01* + +This is the technical changelog for version 21.5. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel `_. + +Major Changes +------------- + +- Full Support for Bot API 7.9 (:pr:`4429`) +- Full Support for Bot API 7.8 (:pr:`4408`) + +New Features +------------ + +- Add ``MessageEntity.shift_entities`` and ``MessageEntity.concatenate`` (:pr:`4376` closes :issue:`4372`) +- Add Parameter ``game_pattern`` to ``CallbackQueryHandler`` (:pr:`4353` by `jainamoswal `_ closes :issue:`4269`) +- Add Parameter ``read_file_handle`` to ``InputFile`` (:pr:`4388` closes :issue:`4339`) + +Documentation Improvements +-------------------------- + +- Bugfix for "Available In" Admonitions (:pr:`4413`) +- Documentation Improvements (:pr:`4400` closes :issue:`4446`, :pr:`4448` by `Palaptin `_) +- Document Return Types of ``RequestData`` Members (:pr:`4396`) +- Add Introductory Paragraphs to Telegram Types Subsections (:pr:`4389` by `mohdyusuf2312 `_ closes :issue:`4380`) +- Start Adapting to RTD Addons (:pr:`4386`) + +Minor and Internal Changes +--------------------------- + +- Remove Surplus Logging from ``Updater`` Network Loop (:pr:`4432` by `MartinHjelmare `_) +- Add Internal Constants for Encodings (:pr:`4378` by `elpekenin `_) +- Improve PyPI Automation (:pr:`4375` closes :issue:`4373`) +- Update Test Suite to New Test Channel Setup (:pr:`4435`) +- Improve Fixture Usage in ``test_message.py`` (:pr:`4431` by `Palaptin `_) +- Update Python 3.13 Test Suite to RC1 (:pr:`4415`) +- Bump ``ruff`` and Add New Rules (:pr:`4416`) + +Dependency Updates +------------------ + +- Update ``cachetools`` requirement from <5.5.0,>=5.3.3 to >=5.3.3,<5.6.0 (:pr:`4437`) +- Bump ``sphinx`` from 7.4.7 to 8.0.2 and ``furo`` from 2024.7.18 to 2024.8.6 (:pr:`4412`) +- Bump ``test-summary/action`` from 2.3 to 2.4 (:pr:`4410`) +- Bump ``pytest`` from 8.2.2 to 8.3.2 (:pr:`4403`) +- Bump ``dependabot/fetch-metadata`` from 2.1.0 to 2.2.0 (:pr:`4411`) +- Update ``cachetools`` requirement from ~=5.3.3 to >=5.3.3,<5.5.0 (:pr:`4390`) +- Bump ``sphinx`` from 7.3.7 to 7.4.7 (:pr:`4395`) +- Bump ``furo`` from 2024.5.6 to 2024.7.18 (:pr:`4392`) + Version 21.4 ============ diff --git a/telegram/_bot.py b/telegram/_bot.py index 1e21206f41e..b79df08ff17 100644 --- a/telegram/_bot.py +++ b/telegram/_bot.py @@ -6145,7 +6145,7 @@ async def pin_chat_message( business_connection_id (:obj:`str`, optional): Unique identifier of the business connection on behalf of which the message will be pinned. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 Returns: :obj:`bool`: On success, :obj:`True` is returned. @@ -6198,7 +6198,7 @@ async def unpin_chat_message( business_connection_id (:obj:`str`, optional): Unique identifier of the business connection on behalf of which the message will be unpinned. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 Returns: :obj:`bool`: On success, :obj:`True` is returned. @@ -9229,7 +9229,7 @@ async def send_paid_media( keyboard, instructions to remove reply keyboard or to force a reply from the user. business_connection_id (:obj:`str`, optional): |business_id_str| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 Keyword Args: allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| @@ -9294,7 +9294,7 @@ async def create_chat_subscription_invite_link( right. The link can be edited using the :meth:`edit_chat_subscription_invite_link` or revoked using the :meth:`revoke_chat_invite_link`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 Args: chat_id (:obj:`int` | :obj:`str`): |chat_id_channel| @@ -9350,7 +9350,7 @@ async def edit_chat_subscription_invite_link( Use this method to edit a subscription invite link created by the bot. The bot must have :attr:`telegram.ChatPermissions.can_invite_users` administrator right. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 Args: chat_id (:obj:`int` | :obj:`str`): |chat_id_channel| diff --git a/telegram/_chat.py b/telegram/_chat.py index a73a504d8c5..6eb78978596 100644 --- a/telegram/_chat.py +++ b/telegram/_chat.py @@ -2687,7 +2687,7 @@ async def create_subscription_invite_link( For the documentation of the arguments, please see :meth:`telegram.Bot.create_chat_subscription_invite_link`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 Returns: :class:`telegram.ChatInviteLink` @@ -2724,7 +2724,7 @@ async def edit_subscription_invite_link( For the documentation of the arguments, please see :meth:`telegram.Bot.edit_chat_subscription_invite_link`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 Returns: :class:`telegram.ChatInviteLink` diff --git a/telegram/_chatinvitelink.py b/telegram/_chatinvitelink.py index 1e1a0e1cf44..b26de4e332b 100644 --- a/telegram/_chatinvitelink.py +++ b/telegram/_chatinvitelink.py @@ -72,12 +72,12 @@ class ChatInviteLink(TelegramObject): subscription_period (:obj:`int`, optional): The number of seconds the subscription will be active for before the next payment. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 subscription_price (:obj:`int`, optional): The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 Attributes: invite_link (:obj:`str`): The invite link. If the link was created by another chat @@ -109,12 +109,12 @@ class ChatInviteLink(TelegramObject): subscription_period (:obj:`int`): Optional. The number of seconds the subscription will be active for before the next payment. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 subscription_price (:obj:`int`): Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 """ diff --git a/telegram/_chatmember.py b/telegram/_chatmember.py index 1eabaa14e56..da84516b165 100644 --- a/telegram/_chatmember.py +++ b/telegram/_chatmember.py @@ -395,7 +395,7 @@ class ChatMemberMember(ChatMember): until_date (:class:`datetime.datetime`, optional): Date when the user's subscription will expire. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 Attributes: status (:obj:`str`): The member's status in the chat, @@ -404,7 +404,7 @@ class ChatMemberMember(ChatMember): until_date (:class:`datetime.datetime`): Optional. Date when the user's subscription will expire. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 """ diff --git a/telegram/_files/inputfile.py b/telegram/_files/inputfile.py index 8f9c24a2076..e7c9cc6c64b 100644 --- a/telegram/_files/inputfile.py +++ b/telegram/_files/inputfile.py @@ -78,7 +78,7 @@ class InputFile: # here the file handle is already closed and the upload will fail await bot.send_document(chat_id, input_file) - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 Attributes: @@ -126,7 +126,7 @@ def __init__( def field_tuple(self) -> FieldTuple: """Field tuple representing the contents of the file for upload to the Telegram servers. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.5 Content may now be a file handle. Returns: diff --git a/telegram/_message.py b/telegram/_message.py index 48e34583ed6..11bee572493 100644 --- a/telegram/_message.py +++ b/telegram/_message.py @@ -4112,7 +4112,7 @@ async def pin( For the documentation of the arguments, please see :meth:`telegram.Bot.pin_chat_message`. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.5 Now also passes :attr:`business_connection_id` to :meth:`telegram.Bot.pin_chat_message`. @@ -4152,7 +4152,7 @@ async def unpin( For the documentation of the arguments, please see :meth:`telegram.Bot.unpin_chat_message`. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.5 Now also passes :attr:`business_connection_id` to :meth:`telegram.Bot.pin_chat_message`. diff --git a/telegram/_messageentity.py b/telegram/_messageentity.py index cdf103b2d66..ae675e8e9fd 100644 --- a/telegram/_messageentity.py +++ b/telegram/_messageentity.py @@ -262,7 +262,7 @@ def shift_entities(by: Union[str, int], entities: _SEM) -> _SEM: The :paramref:`entities` are *not* modified in place. The function returns a sequence of new objects. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 Args: by (:obj:`str` | :obj:`int`): Either the amount to shift the offset by or @@ -329,7 +329,7 @@ async def prefix_message(update: Update, context: ContextTypes.DEFAULT_TYPE): The entities are *not* modified in place. The function returns a new sequence of objects. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 Args: *args (Tuple[:obj:`str`, Sequence[:class:`telegram.MessageEntity`]] | \ diff --git a/telegram/_payment/stars.py b/telegram/_payment/stars.py index ed83aabc2a5..94f621d00e8 100644 --- a/telegram/_payment/stars.py +++ b/telegram/_payment/stars.py @@ -327,7 +327,7 @@ class TransactionPartnerUser(TransactionPartner): paid_media (Sequence[:class:`telegram.PaidMedia`], optional): Information about the paid media bought by the user. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 Attributes: type (:obj:`str`): The type of the transaction partner, @@ -337,7 +337,7 @@ class TransactionPartnerUser(TransactionPartner): paid_media (Tuple[:class:`telegram.PaidMedia`]): Optional. Information about the paid media bought by the user. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 """ __slots__ = ( diff --git a/telegram/_reaction.py b/telegram/_reaction.py index 55e8968e8eb..90de7823d79 100644 --- a/telegram/_reaction.py +++ b/telegram/_reaction.py @@ -35,7 +35,7 @@ class ReactionType(TelegramObject): and :class:`telegram.ReactionTypePaid`. .. versionadded:: 20.8 - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.5 Added paid reaction. @@ -59,7 +59,7 @@ class ReactionType(TelegramObject): PAID: Final[constants.ReactionType] = constants.ReactionType.PAID """:const:`telegram.constants.ReactionType.PAID` - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 """ def __init__( @@ -174,7 +174,7 @@ class ReactionTypePaid(ReactionType): """ The reaction is paid. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 Attributes: type (:obj:`str`): Type of the reaction, diff --git a/telegram/_user.py b/telegram/_user.py index 50dd66870f3..075c4f12861 100644 --- a/telegram/_user.py +++ b/telegram/_user.py @@ -100,7 +100,7 @@ class User(TelegramObject): has_main_web_app (:obj:`bool`, optional): :obj:`True`, if the bot has the main Web App. Returned only in :meth:`telegram.Bot.get_me`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 Attributes: id (:obj:`int`): Unique identifier for this user or bot. @@ -131,7 +131,7 @@ class User(TelegramObject): has_main_web_app (:obj:`bool`) Optional. :obj:`True`, if the bot has the main Web App. Returned only in :meth:`telegram.Bot.get_me`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 .. |user_chat_id_note| replace:: This shortcuts build on the assumption that :attr:`User.id` coincides with the :attr:`Chat.id` of the private chat with the user. This has been the diff --git a/telegram/_utils/strings.py b/telegram/_utils/strings.py index c57e4e48b32..9c386247eca 100644 --- a/telegram/_utils/strings.py +++ b/telegram/_utils/strings.py @@ -33,7 +33,7 @@ class TextEncoding(StringEnum): """This enum contains encoding schemes for text. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 """ __slots__ = () diff --git a/telegram/_version.py b/telegram/_version.py index ec3f5618c21..20043c8309b 100644 --- a/telegram/_version.py +++ b/telegram/_version.py @@ -51,6 +51,6 @@ def __str__(self) -> str: __version_info__: Final[Version] = Version( - major=21, minor=4, micro=0, releaselevel="final", serial=0 + major=21, minor=5, micro=0, releaselevel="final", serial=0 ) __version__: Final[str] = str(__version_info__) diff --git a/telegram/constants.py b/telegram/constants.py index 2867c6c7c4f..52d69aacaef 100644 --- a/telegram/constants.py +++ b/telegram/constants.py @@ -2907,7 +2907,7 @@ class ReactionType(StringEnum): PAID = "paid" """:obj:`str`: A :class:`telegram.ReactionType` with a paid reaction. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 """ @@ -3110,7 +3110,7 @@ class ChatSubscriptionLimit(IntEnum): :paramref:`telegram.Bot.create_chat_subscription_invite_link.subscription_price`. The enum members of this enumeration are instances of :class:`int` and can be treated as such. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 """ __slots__ = () diff --git a/telegram/ext/_handlers/callbackqueryhandler.py b/telegram/ext/_handlers/callbackqueryhandler.py index c8fb0e7b3f0..a149739a2fb 100644 --- a/telegram/ext/_handlers/callbackqueryhandler.py +++ b/telegram/ext/_handlers/callbackqueryhandler.py @@ -58,7 +58,7 @@ class CallbackQueryHandler(BaseHandler[Update, CCT]): `~telegram.CallbackQuery.game_short_name` or :attr:`~telegram.CallbackQuery.data` matching the defined pattern will be handled - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 Warning: When setting :paramref:`block` to :obj:`False`, you cannot rely on adding custom @@ -100,7 +100,7 @@ async def callback(update: Update, context: CallbackContext) :attr:`telegram.CallbackQuery.game_short_name` to determine if an update should be handled by this handler. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.5 block (:obj:`bool`, optional): Determines whether the return value of the callback should be awaited before processing the next handler in :meth:`telegram.ext.Application.process_update`. Defaults to :obj:`True`. diff --git a/telegram/request/_requestdata.py b/telegram/request/_requestdata.py index a6b8752ee66..71b2654e5b6 100644 --- a/telegram/request/_requestdata.py +++ b/telegram/request/_requestdata.py @@ -131,7 +131,7 @@ def json_payload(self) -> bytes: def multipart_data(self) -> UploadFileDict: """Gives the files contained in this object as mapping of part name to encoded content. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.5 Content may now be a file handle. """ multipart_data: UploadFileDict = {} diff --git a/telegram/request/_requestparameter.py b/telegram/request/_requestparameter.py index c3d19bdbd46..88ed231c066 100644 --- a/telegram/request/_requestparameter.py +++ b/telegram/request/_requestparameter.py @@ -79,7 +79,7 @@ def json_value(self) -> Optional[str]: def multipart_data(self) -> Optional[UploadFileDict]: """A dict with the file data to upload, if any. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.5 Content may now be a file handle. """ if not self.input_files: pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy