Bump Version to v21.7 (#4557)

This commit is contained in:
Bibo-Joshi 2024-11-04 21:29:59 +01:00 committed by GitHub
parent 0eb11ff3e9
commit 151123745e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 81 additions and 31 deletions

View file

@ -4,6 +4,56 @@
Changelog Changelog
========= =========
Version 21.7
============
*Released 2024-11-04*
This is the technical changelog for version 21.7. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel <https://t.me/pythontelegrambotchannel>`_.
Major Changes
-------------
- Full Support for Bot API 7.11 (:pr:`4546` closes :issue:`4543`)
- Add ``Message.reply_paid_media`` (:pr:`4551`)
- Drop Support for Python 3.8 (:pr:`4398` by `elpekenin <https://github.com/elpekenin>`_)
Minor Changes
-------------
- Allow ``Sequence`` in ``Application.add_handlers`` (:pr:`4531` by `roast-lord <https://github.com/roast-lord>`_ closes :issue:`4530`)
- Improve Exception Handling in ``File.download_*`` (:pr:`4542`)
- Use Stable Python 3.13 Release in Test Suite (:pr:`4535`)
Documentation Improvements
--------------------------
- Documentation Improvements (:pr:`4536` by `Ecode2 <https://github.com/Ecode2>`_, :pr:`4556`)
- Fix Linkcheck Workflow (:pr:`4545`)
- Use ``sphinx-build-compatibility`` to Keep Sphinx Compatibility (:pr:`4492`)
Internal Changes
----------------
- Improve Test Instability Caused by ``Message`` Fixtures (:pr:`4507`)
- Stabilize Some Flaky Tests (:pr:`4500`)
- Reduce Creation of HTTP Clients in Tests (:pr:`4493`)
- Update ``pytest-xdist`` Usage (:pr:`4491`)
- Fix Failing Tests by Making Them Independent (:pr:`4494`)
- Introduce Codecov's Test Analysis (:pr:`4487`)
- Maintenance Work on ``Bot`` Tests (:pr:`4489`)
- Introduce ``conftest.py`` for File Related Tests (:pr:`4488`)
- Update Issue Templates to Use Issue Types (:pr:`4553`)
- Update Automation to Label Changes (:pr:`4552`)
Dependency Updates
------------------
- Bump ``srvaroa/labeler`` from 1.11.0 to 1.11.1 (:pr:`4549`)
- Bump ``sphinx`` from 8.0.2 to 8.1.3 (:pr:`4532`)
- Bump ``sphinxcontrib-mermaid`` from 0.9.2 to 1.0.0 (:pr:`4529`)
- Bump ``srvaroa/labeler`` from 1.10.1 to 1.11.0 (:pr:`4509`)
- Bump ``Bibo-Joshi/pyright-type-completeness`` from 1.0.0 to 1.0.1 (:pr:`4510`)
Version 21.6 Version 21.6
============ ============

View file

@ -969,7 +969,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]):
.. versionadded:: 21.3 .. versionadded:: 21.3
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Keyword Args: Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
@ -1348,7 +1348,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]):
.. versionadded:: 21.3 .. versionadded:: 21.3
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med| show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|
.. versionadded:: 21.3 .. versionadded:: 21.3
@ -1511,7 +1511,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]):
.. versionadded:: 21.3 .. versionadded:: 21.3
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Keyword Args: Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
@ -1670,7 +1670,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]):
.. versionadded:: 21.3 .. versionadded:: 21.3
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Keyword Args: Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
@ -1801,7 +1801,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]):
.. versionadded:: 21.3 .. versionadded:: 21.3
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Keyword Args: Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
@ -1962,7 +1962,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]):
.. versionadded:: 21.3 .. versionadded:: 21.3
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med| show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|
.. versionadded:: 21.3 .. versionadded:: 21.3
@ -2120,7 +2120,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]):
.. versionadded:: 21.3 .. versionadded:: 21.3
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Keyword Args: Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
@ -2282,7 +2282,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]):
.. versionadded:: 21.3 .. versionadded:: 21.3
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med| show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|
.. versionadded:: 21.3 .. versionadded:: 21.3
@ -2442,7 +2442,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]):
.. versionadded:: 21.3 .. versionadded:: 21.3
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Keyword Args: Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
@ -2573,7 +2573,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]):
.. versionadded:: 21.3 .. versionadded:: 21.3
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Keyword Args: Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
@ -2761,7 +2761,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]):
.. versionadded:: 21.3 .. versionadded:: 21.3
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Keyword Args: Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
@ -3073,7 +3073,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]):
.. versionadded:: 21.3 .. versionadded:: 21.3
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Keyword Args: Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
@ -3220,7 +3220,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]):
.. versionadded:: 21.3 .. versionadded:: 21.3
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Keyword Args: Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
@ -3345,7 +3345,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]):
.. versionadded:: 21.3 .. versionadded:: 21.3
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Keyword Args: Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
@ -5154,7 +5154,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]):
.. versionadded:: 21.3 .. versionadded:: 21.3
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Keyword Args: Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
@ -7165,7 +7165,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified.
.. versionadded:: 21.3 .. versionadded:: 21.3
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Keyword Args: Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
@ -7348,7 +7348,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified.
.. versionadded:: 21.3 .. versionadded:: 21.3
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Keyword Args: Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
@ -7778,7 +7778,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified.
.. versionadded:: 21.3 .. versionadded:: 21.3
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Keyword Args: Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
@ -9315,7 +9315,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified.
.. versionadded:: 21.5 .. versionadded:: 21.5
allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast|
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Keyword Args: Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|

View file

@ -30,7 +30,7 @@ class CopyTextButton(TelegramObject):
Objects of this class are comparable in terms of equality. Two objects of this class are Objects of this class are comparable in terms of equality. Two objects of this class are
considered equal, if their :attr:`text` is equal. considered equal, if their :attr:`text` is equal.
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Args: Args:
text (:obj:`str`): The text to be copied to the clipboard; text (:obj:`str`): The text to be copied to the clipboard;

View file

@ -151,7 +151,7 @@ class File(TelegramObject):
* This method was previously called ``download``. It was split into * This method was previously called ``download``. It was split into
:meth:`download_to_drive` and :meth:`download_to_memory`. :meth:`download_to_drive` and :meth:`download_to_memory`.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 21.7
Raises :exc:`RuntimeError` if :attr:`file_path` is not set. Note that files without Raises :exc:`RuntimeError` if :attr:`file_path` is not set. Note that files without
a :attr:`file_path` could never be downloaded, as this attribute is mandatory for that a :attr:`file_path` could never be downloaded, as this attribute is mandatory for that
operation. operation.
@ -245,7 +245,7 @@ class File(TelegramObject):
.. versionadded:: 20.0 .. versionadded:: 20.0
.. versionchanged:: NEXT.VERSION .. versionchanged:: 21.7
Raises :exc:`RuntimeError` if :attr:`file_path` is not set. Note that files without Raises :exc:`RuntimeError` if :attr:`file_path` is not set. Note that files without
a :attr:`file_path` could never be downloaded, as this attribute is mandatory for that a :attr:`file_path` could never be downloaded, as this attribute is mandatory for that
operation. operation.
@ -302,7 +302,7 @@ class File(TelegramObject):
) -> bytearray: ) -> bytearray:
"""Download this file and return it as a bytearray. """Download this file and return it as a bytearray.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 21.7
Raises :exc:`RuntimeError` if :attr:`file_path` is not set. Note that files without Raises :exc:`RuntimeError` if :attr:`file_path` is not set. Note that files without
a :attr:`file_path` could never be downloaded, as this attribute is mandatory for that a :attr:`file_path` could never be downloaded, as this attribute is mandatory for that
operation. operation.

View file

@ -127,7 +127,7 @@ class InlineKeyboardButton(TelegramObject):
copy_text (:class:`telegram.CopyTextButton`, optional): Description of the button that copy_text (:class:`telegram.CopyTextButton`, optional): Description of the button that
copies the specified text to the clipboard. copies the specified text to the clipboard.
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
callback_game (:class:`telegram.CallbackGame`, optional): Description of the game that will callback_game (:class:`telegram.CallbackGame`, optional): Description of the game that will
be launched when the user presses the button be launched when the user presses the button
@ -200,7 +200,7 @@ class InlineKeyboardButton(TelegramObject):
copy_text (:class:`telegram.CopyTextButton`): Optional. Description of the button that copy_text (:class:`telegram.CopyTextButton`): Optional. Description of the button that
copies the specified text to the clipboard. copies the specified text to the clipboard.
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
callback_game (:class:`telegram.CallbackGame`): Optional. Description of the game that will callback_game (:class:`telegram.CallbackGame`): Optional. Description of the game that will
be launched when the user presses the button. be launched when the user presses the button.

View file

@ -3704,7 +3704,7 @@ class Message(MaybeInaccessibleMessage):
For the documentation of the arguments, please see :meth:`telegram.Bot.send_paid_media`. For the documentation of the arguments, please see :meth:`telegram.Bot.send_paid_media`.
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Keyword Args: Keyword Args:
do_quote (:obj:`bool` | :obj:`dict`, optional): |do_quote| do_quote (:obj:`bool` | :obj:`dict`, optional): |do_quote|

View file

@ -431,7 +431,7 @@ class TransactionPartnerTelegramApi(TransactionPartner):
Objects of this class are comparable in terms of equality. Two objects of this class are Objects of this class are comparable in terms of equality. Two objects of this class are
considered equal, if their :attr:`request_count` is equal. considered equal, if their :attr:`request_count` is equal.
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
Args: Args:
request_count (:obj:`int`): The number of successful requests that exceeded regular limits request_count (:obj:`int`): The number of successful requests that exceeded regular limits

View file

@ -51,6 +51,6 @@ class Version(NamedTuple):
__version_info__: Final[Version] = Version( __version_info__: Final[Version] = Version(
major=21, minor=6, micro=0, releaselevel="final", serial=0 major=21, minor=7, micro=0, releaselevel="final", serial=0
) )
__version__: Final[str] = str(__version_info__) __version__: Final[str] = str(__version_info__)

View file

@ -1160,7 +1160,7 @@ class FloodLimit(IntEnum):
:paramref:`~telegram.Bot.send_message.allow_paid_broadcast` of :paramref:`~telegram.Bot.send_message.allow_paid_broadcast` of
:meth:`~telegram.Bot.send_message`. :meth:`~telegram.Bot.send_message`.
.. versionadded:: NEXT.VERSION .. versionadded:: 21.7
""" """
@ -2616,7 +2616,7 @@ class TransactionPartnerType(StringEnum):
""":obj:`str`: Transaction with with payment for """:obj:`str`: Transaction with with payment for
`paid broadcasting <https://core.telegram.org/bots/api#paid-broadcasts>`_. `paid broadcasting <https://core.telegram.org/bots/api#paid-broadcasts>`_.
..versionadded:: NEXT.VERSION ..versionadded:: 21.7
""" """
USER = "user" USER = "user"
""":obj:`str`: Transaction with a user.""" """:obj:`str`: Transaction with a user."""

View file

@ -1420,7 +1420,7 @@ class Application(
Specify a sequence of handlers *or* a dictionary where the keys are groups and Specify a sequence of handlers *or* a dictionary where the keys are groups and
values are handlers. values are handlers.
.. versionchanged:: NEXT.VERSION .. versionchanged:: 21.7
Accepts any :class:`collections.abc.Sequence` as input instead of just a list Accepts any :class:`collections.abc.Sequence` as input instead of just a list
or tuple. or tuple.