FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Bump Version to v21.11 by Bibo-Joshi · Pull Request #4694 · python-telegram-bot/python-telegram-bot · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (21) .rst  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
48 changes: 48 additions & 0 deletions CHANGES.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,54 @@
Changelog
=========

Version 21.11
=============

*Released 2025-03-01*

This is the technical changelog for version 21.11. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel <https://t.me/pythontelegrambotchannel>`_.

Major Changes and New Features
------------------------------

- Full Support for Bot API 8.3 (:pr:`4676` closes :issue:`4677`, :pr:`4682` by `aelkheir <https://github.com/aelkheir>`_, :pr:`4690` by `aelkheir <https://github.com/aelkheir>`_, :pr:`4691` by `aelkheir <https://github.com/aelkheir>`_)
- Make ``provider_token`` Argument Optional (:pr:`4689`)
- Remove Deprecated ``InlineQueryResultArticle.hide_url`` (:pr:`4640` closes :issue:`4638`)
- Accept ``datetime.timedelta`` Input in ``Bot`` Method Parameters (:pr:`4651`)
- Extend Customization Support for ``Bot.base_(file_)url`` (:pr:`4632` closes :issue:`3355`)
- Support ``allow_paid_broadcast`` in ``AIORateLimiter`` (:pr:`4627` closes :issue:`4578`)
- Add ``BaseUpdateProcessor.current_concurrent_updates`` (:pr:`4626` closes :issue:`3984`)

Minor Changes and Bug Fixes
---------------------------

- Add Bootstrapping Logic to ``Application.run_*`` (:pr:`4673` closes :issue:`4657`)
- Fix a Bug in ``edit_user_star_subscription`` (:pr:`4681` by `vavasik800 <https://github.com/vavasik800>`_)
- Simplify Handling of Empty Data in ``TelegramObject.de_json`` and Friends (:pr:`4617` closes :issue:`4614`)

Documentation Improvements
--------------------------

- Documentation Improvements (:pr:`4641`)
- Overhaul Admonition Insertion in Documentation (:pr:`4462` closes :issue:`4414`)

Internal Changes
----------------

- Stabilize Linkcheck Test (:pr:`4693`)
- Bump ``pre-commit`` Hooks to Latest Versions (:pr:`4643`)
- Refactor Tests for ``TelegramObject`` Classes with Subclasses (:pr:`4654` closes :issue:`4652`)
- Use Fine Grained Permissions for GitHub Actions Workflows (:pr:`4668`)

Dependency Updates
------------------

- Bump ``actions/setup-python`` from 5.3.0 to 5.4.0 (:pr:`4665`)
- Bump ``dependabot/fetch-metadata`` from 2.2.0 to 2.3.0 (:pr:`4666`)
- Bump ``actions/stale`` from 9.0.0 to 9.1.0 (:pr:`4667`)
- Bump ``astral-sh/setup-uv`` from 5.1.0 to 5.2.2 (:pr:`4664`)
- Bump ``codecov/test-results-action`` from 1.0.1 to 1.0.2 (:pr:`4663`)

Version 21.10
=============

Expand Down
44 changes: 22 additions & 22 deletions telegram/_bot.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]):
Example:
``"https://api.telegram.org/bot{token}/test"``

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
Supports callable input and string formatting.
base_file_url (:obj:`str`, optional): Telegram Bot API file URL.
If the string contains ``{token}``, it will be replaced with the bot's
Expand All @@ -262,7 +262,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]):
Example:
``"https://api.telegram.org/file/bot{token}/test"``

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
Supports callable input and string formatting.
request (:class:`telegram.request.BaseRequest`, optional): Pre initialized
:class:`telegram.request.BaseRequest` instances. Will be used for all bot methods
Expand Down Expand Up @@ -1246,7 +1246,7 @@ async def forward_message(
video_start_timestamp (:obj:`int`, optional): New start timestamp for the
forwarded video in the message

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.11
disable_notification (:obj:`bool`, optional): |disable_notification|
protect_content (:obj:`bool`, optional): |protect_content|

Expand Down Expand Up @@ -1564,7 +1564,7 @@ async def send_audio(
duration (:obj:`int` | :class:`datetime.timedelta`, optional): Duration of sent audio
in seconds.

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
|time-period-input|
performer (:obj:`str`, optional): Performer.
title (:obj:`str`, optional): Track name.
Expand Down Expand Up @@ -2006,17 +2006,17 @@ async def send_video(
duration (:obj:`int` | :class:`datetime.timedelta`, optional): Duration of sent video
in seconds.

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
|time-period-input|
width (:obj:`int`, optional): Video width.
height (:obj:`int`, optional): Video height.
cover (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`, \
optional): Cover for the video in the message. |fileinputnopath|

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.11
start_timestamp (:obj:`int`, optional): Start timestamp for the video in the message.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.11
caption (:obj:`str`, optional): Video caption (may also be used when resending videos
by file_id), 0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH`
characters after entities parsing.
Expand Down Expand Up @@ -2192,7 +2192,7 @@ async def send_video_note(
duration (:obj:`int` | :class:`datetime.timedelta`, optional): Duration of sent video
in seconds.

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
|time-period-input|
length (:obj:`int`, optional): Video width and height, i.e. diameter of the video
message.
Expand Down Expand Up @@ -2344,7 +2344,7 @@ async def send_animation(
duration (:obj:`int` | :class:`datetime.timedelta`, optional): Duration of sent
animation in seconds.

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
|time-period-input|
width (:obj:`int`, optional): Animation width.
height (:obj:`int`, optional): Animation height.
Expand Down Expand Up @@ -2528,7 +2528,7 @@ async def send_voice(
duration (:obj:`int` | :class:`datetime.timedelta`, optional): Duration of the voice
message in seconds.

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
|time-period-input|
disable_notification (:obj:`bool`, optional): |disable_notification|
protect_content (:obj:`bool`, optional): |protect_content|
Expand Down Expand Up @@ -2842,7 +2842,7 @@ async def send_location(
:tg-const:`telegram.constants.LocationLimit.LIVE_PERIOD_FOREVER` for live
locations that can be edited indefinitely.

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
|time-period-input|
heading (:obj:`int`, optional): For live locations, a direction in which the user is
moving, in degrees. Must be between
Expand Down Expand Up @@ -3012,7 +3012,7 @@ async def edit_message_live_location(

.. versionadded:: 21.2.

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
|time-period-input|
business_connection_id (:obj:`str`, optional): |business_id_str_edit|

Expand Down Expand Up @@ -3709,7 +3709,7 @@ async def answer_inline_query(
time in seconds that the
result of the inline query may be cached on the server. Defaults to ``300``.

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
|time-period-input|
is_personal (:obj:`bool`, optional): Pass :obj:`True`, if results may be cached on
the server side only for the user that sent the query. By default,
Expand Down Expand Up @@ -4161,7 +4161,7 @@ async def answer_callback_query(
time in seconds that the
result of the callback query may be cached client-side. Defaults to 0.

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
|time-period-input|

Returns:
Expand Down Expand Up @@ -5256,7 +5256,7 @@ async def send_invoice(
`@BotFather <https://t.me/BotFather>`_. Pass an empty string for payments in
|tg_stars|.

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
Bot API 7.4 made this parameter is optional and this is now reflected in the
function signature.

Expand Down Expand Up @@ -7387,7 +7387,7 @@ async def send_poll(
:tg-const:`telegram.Poll.MAX_OPEN_PERIOD`. Can't be used together with
:paramref:`close_date`.

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
|time-period-input|
close_date (:obj:`int` | :obj:`datetime.datetime`, optional): Point in time (Unix
timestamp) when the poll will be automatically closed. Must be at least
Expand Down Expand Up @@ -8017,7 +8017,7 @@ async def copy_message(
video_start_timestamp (:obj:`int`, optional): New start timestamp for the
copied video in the message

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.11
caption (:obj:`str`, optional): New caption for media,
0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after
entities parsing. If not specified, the original caption is kept.
Expand Down Expand Up @@ -8326,7 +8326,7 @@ async def create_invoice_link(
`@BotFather <https://t.me/BotFather>`_. Pass an empty string for payments in
|tg_stars|.

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
Bot API 7.4 made this parameter is optional and this is now reflected in the
function signature.

Expand Down Expand Up @@ -9734,7 +9734,7 @@ async def create_chat_subscription_invite_link(
active for before the next payment. Currently, it must always be
:tg-const:`telegram.constants.ChatSubscriptionLimit.SUBSCRIPTION_PERIOD` (30 days).

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
|time-period-input|
subscription_price (:obj:`int`): The number of Telegram Stars a user must pay initially
and after each subsequent subscription period to be a member of the chat;
Expand Down Expand Up @@ -9878,14 +9878,14 @@ async def send_gift(
user_id (:obj:`int`, optional): Required if :paramref:`chat_id` is not specified.
Unique identifier of the target user that will receive the gift.

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
Now optional.
gift_id (:obj:`str` | :class:`~telegram.Gift`): Identifier of the gift or a
:class:`~telegram.Gift` object
chat_id (:obj:`int` | :obj:`str`, optional): Required if :paramref:`user_id`
is not specified. |chat_id_channel| It will receive the gift.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.11
text (:obj:`str`, optional): Text that will be shown along with the gift;
0- :tg-const:`telegram.constants.GiftLimit.MAX_TEXT_LENGTH` characters
text_parse_mode (:obj:`str`, optional): Mode for parsing entities.
Expand All @@ -9912,7 +9912,7 @@ async def send_gift(
Raises:
:class:`telegram.error.TelegramError`
"""
# TODO: Remove when stability policy allows, tags: deprecated NEXT.VERSION
# TODO: Remove when stability policy allows, tags: deprecated 21.11
# also we should raise a deprecation warnung if anything is passed by
# position since it will be moved, not sure how
if gift_id is None:
Expand Down
2 changes: 1 addition & 1 deletion telegram/_chat.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -3485,7 +3485,7 @@ async def send_gift(

.. versionadded:: 21.8

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11

Added support for channel chats.

Expand Down
4 changes: 2 additions & 2 deletions telegram/_chatfullinfo.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class ChatFullInfo(_ChatBase):
.. versionadded:: 21.4
can_send_gift (:obj:`bool`, optional): :obj:`True`, if gifts can be sent to the chat.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.11

Attributes:
id (:obj:`int`): Unique identifier for this chat.
Expand Down Expand Up @@ -359,7 +359,7 @@ class ChatFullInfo(_ChatBase):
.. versionadded:: 21.4
can_send_gift (:obj:`bool`): Optional. :obj:`True`, if gifts can be sent to the chat.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.11

.. _accent colors: https://core.telegram.org/bots/api#accent-colors
.. _topics: https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups
Expand Down
16 changes: 8 additions & 8 deletions telegram/_files/inputmedia.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ class InputPaidMediaVideo(InputPaidMedia):
cover (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`, \
optional): Cover for the video in the message. |fileinputnopath|

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
start_timestamp (:obj:`int`, optional): Start timestamp for the video in the message

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
width (:obj:`int`, optional): Video width.
height (:obj:`int`, optional): Video height.
duration (:obj:`int`, optional): Video duration in seconds.
Expand All @@ -235,10 +235,10 @@ class InputPaidMediaVideo(InputPaidMedia):
cover (:class:`telegram.InputFile`): Optional. Cover for the video in the message.
|fileinputnopath|

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
start_timestamp (:obj:`int`): Optional. Start timestamp for the video in the message

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
width (:obj:`int`): Optional. Video width.
height (:obj:`int`): Optional. Video height.
duration (:obj:`int`): Optional. Video duration in seconds.
Expand Down Expand Up @@ -567,10 +567,10 @@ class InputMediaVideo(InputMedia):
cover (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`, \
optional): Cover for the video in the message. |fileinputnopath|

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
start_timestamp (:obj:`int`, optional): Start timestamp for the video in the message

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|

.. versionadded:: 21.3
Expand Down Expand Up @@ -606,10 +606,10 @@ class InputMediaVideo(InputMedia):
cover (:class:`telegram.InputFile`): Optional. Cover for the video in the message.
|fileinputnopath|

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
start_timestamp (:obj:`int`): Optional. Start timestamp for the video in the message

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
"""

__slots__ = (
Expand Down
8 changes: 4 additions & 4 deletions telegram/_files/video.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ class Video(_BaseThumbedMedium):
cover (Sequence[:class:`telegram.PhotoSize`], optional): Available sizes of the cover of
the video in the message.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.11
start_timestamp (:obj:`int`, optional): Timestamp in seconds from which the video
will play in the message
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.11

Attributes:
file_id (:obj:`str`): Identifier for this file, which can be used to download
Expand All @@ -79,10 +79,10 @@ class Video(_BaseThumbedMedium):
cover (tuple[:class:`telegram.PhotoSize`]): Optional, Available sizes of the cover of
the video in the message.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.11
start_timestamp (:obj:`int`): Optional, Timestamp in seconds from which the video
will play in the message
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.11
"""

__slots__ = (
Expand Down
2 changes: 1 addition & 1 deletion telegram/_inline/inlinequeryresultarticle.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class InlineQueryResultArticle(InlineQueryResult):
.. versionchanged:: 20.5
Removed the deprecated arguments and attributes ``thumb_*``.

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
Removed the deprecated argument and attribute ``hide_url``.

Args:
Expand Down
4 changes: 2 additions & 2 deletions telegram/_inline/inputinvoicemessagecontent.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class InputInvoiceMessageContent(InputMessageContent):
:attr:`currency` and :attr:`prices` are equal.

.. versionadded:: 13.5
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
:attr:`provider_token` is no longer considered for equality comparison.

Args:
Expand All @@ -55,7 +55,7 @@ class InputInvoiceMessageContent(InputMessageContent):
`@Botfather <https://t.me/Botfather>`_. Pass an empty string for payments in
|tg_stars|.

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.11
Bot API 7.4 made this parameter is optional and this is now reflected in the
class signature.
currency (:obj:`str`): Three-letter ISO 4217 currency code, see more on
Expand Down
Loading

Back | FazBrowse Home | New Git URL