Skip to content

Bump Version to v21.5 #4449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
============

Expand Down
10 changes: 5 additions & 5 deletions telegram/_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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|
Expand Down Expand Up @@ -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|
Expand Down Expand Up @@ -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|
Expand Down
4 changes: 2 additions & 2 deletions telegram/_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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`
Expand Down
8 changes: 4 additions & 4 deletions telegram/_chatinvitelink.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

"""

Expand Down
4 changes: 2 additions & 2 deletions telegram/_chatmember.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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

"""

Expand Down
4 changes: 2 additions & 2 deletions telegram/_files/inputfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions telegram/_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down Expand Up @@ -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`.

Expand Down
4 changes: 2 additions & 2 deletions telegram/_messageentity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`]] | \
Expand Down
4 changes: 2 additions & 2 deletions telegram/_payment/stars.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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__ = (
Expand Down
6 changes: 3 additions & 3 deletions telegram/_reaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ReactionType(TelegramObject):
and :class:`telegram.ReactionTypePaid`.

.. versionadded:: 20.8
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.5

Added paid reaction.

Expand All @@ -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__(
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions telegram/_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion telegram/_utils/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
class TextEncoding(StringEnum):
"""This enum contains encoding schemes for text.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.5
"""

__slots__ = ()
Expand Down
2 changes: 1 addition & 1 deletion telegram/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
4 changes: 2 additions & 2 deletions telegram/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""


Expand Down Expand Up @@ -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__ = ()
Expand Down
4 changes: 2 additions & 2 deletions telegram/ext/_handlers/callbackqueryhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion telegram/request/_requestdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down
2 changes: 1 addition & 1 deletion telegram/request/_requestparameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading
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