diff --git a/CHANGES.rst b/CHANGES.rst index ba37e99a3..32dee75b1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,56 @@ 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 `_. + +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 `_) + +Minor Changes +------------- + +- Allow ``Sequence`` in ``Application.add_handlers`` (:pr:`4531` by `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 `_, :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 ============ diff --git a/telegram/_bot.py b/telegram/_bot.py index 448668702..cc2ba38fb 100644 --- a/telegram/_bot.py +++ b/telegram/_bot.py @@ -969,7 +969,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]): .. versionadded:: 21.3 allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Keyword Args: allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| @@ -1348,7 +1348,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]): .. versionadded:: 21.3 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| .. versionadded:: 21.3 @@ -1511,7 +1511,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]): .. versionadded:: 21.3 allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Keyword Args: allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| @@ -1670,7 +1670,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]): .. versionadded:: 21.3 allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Keyword Args: allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| @@ -1801,7 +1801,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]): .. versionadded:: 21.3 allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Keyword Args: allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| @@ -1962,7 +1962,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]): .. versionadded:: 21.3 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| .. versionadded:: 21.3 @@ -2120,7 +2120,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]): .. versionadded:: 21.3 allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Keyword Args: allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| @@ -2282,7 +2282,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]): .. versionadded:: 21.3 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| .. versionadded:: 21.3 @@ -2442,7 +2442,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]): .. versionadded:: 21.3 allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Keyword Args: allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| @@ -2573,7 +2573,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]): .. versionadded:: 21.3 allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Keyword Args: allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| @@ -2761,7 +2761,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]): .. versionadded:: 21.3 allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Keyword Args: allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| @@ -3073,7 +3073,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]): .. versionadded:: 21.3 allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Keyword Args: allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| @@ -3220,7 +3220,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]): .. versionadded:: 21.3 allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Keyword Args: allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| @@ -3345,7 +3345,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]): .. versionadded:: 21.3 allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Keyword Args: allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| @@ -5154,7 +5154,7 @@ class Bot(TelegramObject, contextlib.AbstractAsyncContextManager["Bot"]): .. versionadded:: 21.3 allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Keyword Args: 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 allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Keyword Args: 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 allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Keyword Args: 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 allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Keyword Args: 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 allow_paid_broadcast (:obj:`bool`, optional): |allow_paid_broadcast| - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Keyword Args: allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| diff --git a/telegram/_copytextbutton.py b/telegram/_copytextbutton.py index e3dee813b..a2bf499a7 100644 --- a/telegram/_copytextbutton.py +++ b/telegram/_copytextbutton.py @@ -30,7 +30,7 @@ class CopyTextButton(TelegramObject): Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`text` is equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Args: text (:obj:`str`): The text to be copied to the clipboard; diff --git a/telegram/_files/file.py b/telegram/_files/file.py index 640dfc968..98575cade 100644 --- a/telegram/_files/file.py +++ b/telegram/_files/file.py @@ -151,7 +151,7 @@ class File(TelegramObject): * This method was previously called ``download``. It was split into :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 a :attr:`file_path` could never be downloaded, as this attribute is mandatory for that operation. @@ -245,7 +245,7 @@ class File(TelegramObject): .. versionadded:: 20.0 - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.7 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 operation. @@ -302,7 +302,7 @@ class File(TelegramObject): ) -> 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 a :attr:`file_path` could never be downloaded, as this attribute is mandatory for that operation. diff --git a/telegram/_inline/inlinekeyboardbutton.py b/telegram/_inline/inlinekeyboardbutton.py index 62031af8c..32edb6554 100644 --- a/telegram/_inline/inlinekeyboardbutton.py +++ b/telegram/_inline/inlinekeyboardbutton.py @@ -127,7 +127,7 @@ class InlineKeyboardButton(TelegramObject): copy_text (:class:`telegram.CopyTextButton`, optional): Description of the button that 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 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 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 be launched when the user presses the button. diff --git a/telegram/_message.py b/telegram/_message.py index 33f1bc150..6c87df7fd 100644 --- a/telegram/_message.py +++ b/telegram/_message.py @@ -3704,7 +3704,7 @@ class Message(MaybeInaccessibleMessage): For the documentation of the arguments, please see :meth:`telegram.Bot.send_paid_media`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Keyword Args: do_quote (:obj:`bool` | :obj:`dict`, optional): |do_quote| diff --git a/telegram/_payment/stars.py b/telegram/_payment/stars.py index b420805f5..a47d3b44f 100644 --- a/telegram/_payment/stars.py +++ b/telegram/_payment/stars.py @@ -431,7 +431,7 @@ class TransactionPartnerTelegramApi(TransactionPartner): 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. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.7 Args: request_count (:obj:`int`): The number of successful requests that exceeded regular limits diff --git a/telegram/_version.py b/telegram/_version.py index bb946f535..5f9c77cc5 100644 --- a/telegram/_version.py +++ b/telegram/_version.py @@ -51,6 +51,6 @@ class Version(NamedTuple): __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__) diff --git a/telegram/constants.py b/telegram/constants.py index 5ff4b8147..52a47d54c 100644 --- a/telegram/constants.py +++ b/telegram/constants.py @@ -1160,7 +1160,7 @@ class FloodLimit(IntEnum): :paramref:`~telegram.Bot.send_message.allow_paid_broadcast` of :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 `paid broadcasting `_. - ..versionadded:: NEXT.VERSION + ..versionadded:: 21.7 """ USER = "user" """:obj:`str`: Transaction with a user.""" diff --git a/telegram/ext/_application.py b/telegram/ext/_application.py index d0997a1fc..49c7417bd 100644 --- a/telegram/ext/_application.py +++ b/telegram/ext/_application.py @@ -1420,7 +1420,7 @@ class Application( Specify a sequence of handlers *or* a dictionary where the keys are groups and values are handlers. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 21.7 Accepts any :class:`collections.abc.Sequence` as input instead of just a list or tuple.