mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-23 07:38:58 +01:00
Bump Version to v21.5 (#4449)
This commit is contained in:
parent
970d2ab085
commit
8c692d1008
17 changed files with 86 additions and 34 deletions
52
CHANGES.rst
52
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 <https://t.me/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 <https://github.com/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 <https://github.com/Palaptin>`_)
|
||||
- Document Return Types of ``RequestData`` Members (:pr:`4396`)
|
||||
- Add Introductory Paragraphs to Telegram Types Subsections (:pr:`4389` by `mohdyusuf2312 <https://github.com/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 <https://github.com/MartinHjelmare>`_)
|
||||
- Add Internal Constants for Encodings (:pr:`4378` by `elpekenin <https://github.com/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 <https://github.com/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
|
||||
============
|
||||
|
||||
|
|
|
@ -6145,7 +6145,7 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]):
|
|||
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 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]):
|
|||
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 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified.
|
|||
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 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified.
|
|||
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 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified.
|
|||
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|
|
||||
|
|
|
@ -2687,7 +2687,7 @@ class _ChatBase(TelegramObject):
|
|||
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 @@ class _ChatBase(TelegramObject):
|
|||
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`
|
||||
|
|
|
@ -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
|
||||
|
||||
"""
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
"""
|
||||
|
||||
|
|
|
@ -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 @@ class InputFile:
|
|||
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:
|
||||
|
|
|
@ -4112,7 +4112,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
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 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
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`.
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ class MessageEntity(TelegramObject):
|
|||
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 @@ class MessageEntity(TelegramObject):
|
|||
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`]] | \
|
||||
|
|
|
@ -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__ = (
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -33,7 +33,7 @@ from telegram._utils.enum import StringEnum
|
|||
class TextEncoding(StringEnum):
|
||||
"""This enum contains encoding schemes for text.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 21.5
|
||||
"""
|
||||
|
||||
__slots__ = ()
|
||||
|
|
|
@ -51,6 +51,6 @@ class Version(NamedTuple):
|
|||
|
||||
|
||||
__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__)
|
||||
|
|
|
@ -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__ = ()
|
||||
|
|
|
@ -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 @@ class CallbackQueryHandler(BaseHandler[Update, CCT]):
|
|||
: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`.
|
||||
|
|
|
@ -131,7 +131,7 @@ class RequestData:
|
|||
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 = {}
|
||||
|
|
|
@ -79,7 +79,7 @@ class RequestParameter:
|
|||
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:
|
||||
|
|
Loading…
Reference in a new issue