diff --git a/CHANGES.rst b/CHANGES.rst index 8c61e6b85..861334959 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,55 @@ Changelog ========= +Version 20.2 +============ +*Released 2023-03-25* + +This is the technical changelog for version 20.2. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel `_. + +Major Changes +------------- +- Full Support for API 6.6 (`#3584`_) +- Revert to HTTP/1.1 as Default and make HTTP/2 an Optional Dependency (`#3576`_) + +Minor Changes, Documentation Improvements and CI +------------------------------------------------ +- Documentation Improvements (`#3565`_, `#3600`_) +- Handle Symbolic Links in ``was_called_by`` (`#3552`_) +- Tidy Up Tests Directory (`#3553`_) +- Enhance ``Application.create_task`` (`#3543`_) +- Make Type Completeness Workflow Usable for ``PRs`` from Forks (`#3551`_) +- Refactor and Overhaul the Test Suite (`#3426`_) + +Dependencies +------------ +- Bump ``pytest-asyncio`` from 0.20.3 to 0.21.0 (`#3624`_) +- Bump ``furo`` from 2022.12.7 to 2023.3.23 (`#3625`_) +- Bump ``pytest-xdist`` from 3.2.0 to 3.2.1 (`#3606`_) +- ``pre-commit`` autoupdate (`#3577`_) +- Update ``apscheduler`` requirement from ~=3.10.0 to ~=3.10.1 (`#3572`_) +- Bump ``pytest`` from 7.2.1 to 7.2.2 (`#3573`_) +- Bump ``pytest-xdist`` from 3.1.0 to 3.2.0 (`#3550`_) +- Bump ``sphinxcontrib-mermaid`` from 0.7.1 to 0.8 (`#3549`_) + +.. _`#3584`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3584 +.. _`#3576`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3576 +.. _`#3565`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3565 +.. _`#3600`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3600 +.. _`#3552`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3552 +.. _`#3553`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3553 +.. _`#3543`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3543 +.. _`#3551`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3551 +.. _`#3426`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3426 +.. _`#3624`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3624 +.. _`#3625`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3625 +.. _`#3606`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3606 +.. _`#3577`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3577 +.. _`#3572`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3572 +.. _`#3573`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3573 +.. _`#3550`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3550 +.. _`#3549`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3549 + Version 20.1 ============ *Released 2023-02-09* diff --git a/docs/source/conf.py b/docs/source/conf.py index 38f3d052e..67dd393b8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -21,9 +21,9 @@ author = "Leandro Toledo" # built documents. # # The short X.Y version. -version = "20.1" # telegram.__version__[:3] +version = "20.2" # telegram.__version__[:3] # The full version, including alpha/beta/rc tags. -release = "20.1" # telegram.__version__ +release = "20.2" # telegram.__version__ # If your documentation needs a minimal Sphinx version, state it here. needs_sphinx = "6.1.3" diff --git a/telegram/_bot.py b/telegram/_bot.py index a61f21ec7..ad24c5960 100644 --- a/telegram/_bot.py +++ b/telegram/_bot.py @@ -1137,12 +1137,12 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]): File paths as input is also accepted for bots *not* running in :paramref:`~telegram.Bot.local_mode`. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail`. thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`, \ optional): |thumbdocstring| - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Keyword Args: filename (:obj:`str`, optional): Custom file name for the audio, when uploading a @@ -1276,12 +1276,12 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]): File paths as input is also accepted for bots *not* running in :paramref:`~telegram.Bot.local_mode`. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail`. thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`, \ optional): |thumbdocstring| - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Keyword Args: filename (:obj:`str`, optional): Custom file name for the document, when uploading a @@ -1369,7 +1369,7 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]): emoji (:obj:`str`, optional): Emoji associated with the sticker; only for just uploaded stickers - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 disable_notification (:obj:`bool`, optional): |disable_notification| protect_content (:obj:`bool`, optional): |protect_content| @@ -1507,7 +1507,7 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]): File paths as input is also accepted for bots *not* running in :paramref:`~telegram.Bot.local_mode`. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail`. has_spoiler (:obj:`bool`, optional): Pass :obj:`True` if the video needs to be covered with a spoiler animation. @@ -1516,7 +1516,7 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]): thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`, \ optional): |thumbdocstring| - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Keyword Args: filename (:obj:`str`, optional): Custom file name for the video, when uploading a @@ -1644,12 +1644,12 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]): File paths as input is also accepted for bots *not* running in :paramref:`~telegram.Bot.local_mode`. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail`. thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`, \ optional): |thumbdocstring| - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Keyword Args: filename (:obj:`str`, optional): Custom file name for the video note, when uploading a @@ -1757,7 +1757,7 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]): File paths as input is also accepted for bots *not* running in :paramref:`~telegram.Bot.local_mode`. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail`. caption (:obj:`str`, optional): Animation caption (may also be used when resending animations by file_id), @@ -1790,7 +1790,7 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]): thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`, \ optional): |thumbdocstring| - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Keyword Args: filename (:obj:`str`, optional): Custom file name for the animation, when uploading a @@ -5606,14 +5606,14 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. format. See `here `_ for technical requirements . |uploadinput| - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 sticker_format (:obj:`str`): Format of the sticker. Must be one of :attr:`telegram.constants.StickerFormat.STATIC`, :attr:`telegram.constants.StickerFormat.ANIMATED`, :attr:`telegram.constants.StickerFormat.VIDEO`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 png_sticker (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path`, \ optional): @@ -5628,7 +5628,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. File paths as input is also accepted for bots *not* running in :paramref:`~telegram.Bot.local_mode`. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 Since Bot API 6.6, this parameter has been deprecated in favor of :paramref:`sticker` and :paramref:`sticker_format`. @@ -5721,7 +5721,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. The parameter ``contains_masks`` has been removed. Use :paramref:`sticker_type` instead. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.2 Since Bot API 6.6, the parameters :paramref:`stickers` and :paramref:`sticker_format` replace the parameters :paramref:`png_sticker`, :paramref:`tgs_sticker`, :paramref:`webm_sticker`, :paramref:`emojis`, and :paramref:`mask_position`. @@ -5746,14 +5746,14 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. :tg-const:`telegram.constants.StickerSetLimit.MAX_INITIAL_STICKERS` initial stickers to be added to the sticker set. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 sticker_format (:obj:`str`): Format of stickers in the set, must be one of :attr:`~telegram.constants.StickerFormat.STATIC`, :attr:`~telegram.constants.StickerFormat.ANIMATED` or :attr:`~telegram.constants.StickerFormat.VIDEO`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 sticker_type (:obj:`str`, optional): Type of stickers in the set, pass :attr:`telegram.Sticker.REGULAR` or :attr:`telegram.Sticker.MASK`, or @@ -5766,7 +5766,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 png_sticker (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path`, \ optional): **PNG** image with the sticker, @@ -5781,7 +5781,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. File paths as input is also accepted for bots *not* running in :paramref:`~telegram.Bot.local_mode`. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |api6_6_depr| tgs_sticker (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path`, \ @@ -5796,7 +5796,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. File paths as input is also accepted for bots *not* running in :paramref:`~telegram.Bot.local_mode`. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |api6_6_depr| webm_sticker (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path`,\ @@ -5810,18 +5810,18 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. File paths as input is also accepted for bots *not* running in :paramref:`~telegram.Bot.local_mode`. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |api6_6_depr| emojis (:obj:`str`, optional): One or more emoji corresponding to the sticker. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |api6_6_depr| mask_position (:class:`telegram.MaskPosition`, optional): Position where the mask should be placed on faces. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |api6_6_depr| Returns: @@ -5928,7 +5928,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. .. |api6_6| replace:: Since Bot API 6.6, this argument is deprecated in favour of :paramref:`sticker`. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.2 Since Bot API 6.6, the parameter :paramref:`sticker` replace the parameters :paramref:`png_sticker`, :paramref:`tgs_sticker`, :paramref:`webm_sticker`, :paramref:`emojis`, and :paramref:`mask_position`. @@ -5940,11 +5940,11 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. sticker. If exactly the same sticker had already been added to the set, then the set isn't changed. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 emojis (:obj:`str`, optional): One or more emoji corresponding to the sticker. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |api6_6| png_sticker (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path`, \ @@ -5960,13 +5960,13 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. File paths as input is also accepted for bots *not* running in :paramref:`~telegram.Bot.local_mode`. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |api6_6| mask_position (:class:`telegram.MaskPosition`, optional): Position where the mask should be placed on faces. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |api6_6| tgs_sticker (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path`, \ @@ -5981,7 +5981,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. File paths as input is also accepted for bots *not* running in :paramref:`~telegram.Bot.local_mode`. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |api6_6| webm_sticker (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path`,\ @@ -5995,7 +5995,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. File paths as input is also accepted for bots *not* running in :paramref:`~telegram.Bot.local_mode`. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |api6_6| Returns: @@ -6149,7 +6149,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. """ Use this method to delete a sticker set that was created by the bot. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Args: name (:obj:`str`): Sticker set name. @@ -6189,7 +6189,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. """Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Args: name (:obj:`str`): Sticker set name @@ -6250,7 +6250,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 Bot API 6.6 renamed this method to :meth:`~Bot.set_sticker_set_thumbnail`. Args: @@ -6344,7 +6344,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. """ Use this method to set the title of a created sticker set. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Args: name (:obj:`str`): Sticker set name. @@ -6387,7 +6387,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Args: sticker (:obj:`str`): File identifier of the sticker. @@ -6430,7 +6430,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Args: sticker (:obj:`str`): File identifier of the sticker. @@ -6473,7 +6473,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. Use this method to change the mask position of a mask sticker. The sticker must belong to a sticker set that was created by the bot. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Args: sticker (:obj:`str`): File identifier of the sticker. @@ -6514,7 +6514,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. """ Use this method to set the thumbnail of a custom emoji sticker set. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Args: name (:obj:`str`): Sticker set name. @@ -8025,7 +8025,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Args: description (:obj:`str`, optional): New bot description; @@ -8071,7 +8071,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Args: short_description (:obj:`str`, optional): New short description for the bot; @@ -8347,7 +8347,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified. setStickerSetThumb = set_sticker_set_thumb """Alias for :meth:`set_sticker_set_thumb` - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 Bot API 6.6 renamed this method to :meth:`~Bot.set_sticker_set_thumbnail`. """ setStickerSetThumbnail = set_sticker_set_thumbnail diff --git a/telegram/_botdescription.py b/telegram/_botdescription.py index 04f528b67..e14ef3234 100644 --- a/telegram/_botdescription.py +++ b/telegram/_botdescription.py @@ -27,7 +27,7 @@ class BotDescription(TelegramObject): Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`description` is equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Args: description (:obj:`str`): The bot's description. @@ -54,7 +54,7 @@ class BotShortDescription(TelegramObject): Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`short_description` is equal. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Args: short_description (:obj:`str`): The bot's short description. diff --git a/telegram/_files/_basethumbedmedium.py b/telegram/_files/_basethumbedmedium.py index 2e446ad6e..08ca07e58 100644 --- a/telegram/_files/_basethumbedmedium.py +++ b/telegram/_files/_basethumbedmedium.py @@ -50,11 +50,11 @@ class _BaseThumbedMedium(_BaseMedium): file_size (:obj:`int`, optional): File size. thumb (:class:`telegram.PhotoSize`, optional): Thumbnail as defined by sender. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail`. thumbnail (:class:`telegram.PhotoSize`, optional): Thumbnail as defined by sender. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Attributes: file_id (:obj:`str`): File identifier. @@ -64,7 +64,7 @@ class _BaseThumbedMedium(_BaseMedium): file_size (:obj:`int`): Optional. File size. thumbnail (:class:`telegram.PhotoSize`): Optional. Thumbnail as defined by sender. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ @@ -100,7 +100,7 @@ class _BaseThumbedMedium(_BaseMedium): def thumb(self) -> Optional[PhotoSize]: """:class:`telegram.PhotoSize`: Optional. Thumbnail as defined by sender. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail`. """ warn_about_deprecated_attr_in_property( diff --git a/telegram/_files/animation.py b/telegram/_files/animation.py index 8bb52a754..c8c8478ff 100644 --- a/telegram/_files/animation.py +++ b/telegram/_files/animation.py @@ -41,7 +41,7 @@ class Animation(_BaseThumbedMedium): duration (:obj:`int`): Duration of the video in seconds as defined by sender. thumb (:class:`telegram.PhotoSize`, optional): Animation thumbnail as defined by sender. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail`. file_name (:obj:`str`, optional): Original animation filename as defined by sender. mime_type (:obj:`str`, optional): MIME type of the file as defined by sender. @@ -49,7 +49,7 @@ class Animation(_BaseThumbedMedium): thumbnail (:class:`telegram.PhotoSize`, optional): Animation thumbnail as defined by sender. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Attributes: file_id (:obj:`str`): Identifier for this file, which can be used to download @@ -66,7 +66,7 @@ class Animation(_BaseThumbedMedium): thumbnail (:class:`telegram.PhotoSize`): Optional. Animation thumbnail as defined by sender. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ diff --git a/telegram/_files/audio.py b/telegram/_files/audio.py index 0b56bac1c..92cee789a 100644 --- a/telegram/_files/audio.py +++ b/telegram/_files/audio.py @@ -46,12 +46,12 @@ class Audio(_BaseThumbedMedium): thumb (:class:`telegram.PhotoSize`, optional): Thumbnail of the album cover to which the music file belongs. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail`. thumbnail (:class:`telegram.PhotoSize`, optional): Thumbnail of the album cover to which the music file belongs. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Attributes: file_id (:obj:`str`): Identifier for this file, which can be used to download @@ -68,7 +68,7 @@ class Audio(_BaseThumbedMedium): thumbnail (:class:`telegram.PhotoSize`): Optional. Thumbnail of the album cover to which the music file belongs. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ diff --git a/telegram/_files/document.py b/telegram/_files/document.py index 07a3c319c..650eb38db 100644 --- a/telegram/_files/document.py +++ b/telegram/_files/document.py @@ -38,14 +38,14 @@ class Document(_BaseThumbedMedium): the same over time and for different bots. Can't be used to download or reuse the file. thumb (:class:`telegram.PhotoSize`, optional): Document thumbnail as defined by sender. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail`. file_name (:obj:`str`, optional): Original filename as defined by sender. mime_type (:obj:`str`, optional): MIME type of the file as defined by sender. file_size (:obj:`int`, optional): File size in bytes. thumbnail (:class:`telegram.PhotoSize`, optional): Document thumbnail as defined by sender. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Attributes: file_id (:obj:`str`): Identifier for this file, which can be used to download @@ -57,7 +57,7 @@ class Document(_BaseThumbedMedium): file_size (:obj:`int`): Optional. File size in bytes. thumbnail (:class:`telegram.PhotoSize`): Optional. Document thumbnail as defined by sender. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ diff --git a/telegram/_files/inputmedia.py b/telegram/_files/inputmedia.py index 17fae9aa2..0967be8e3 100644 --- a/telegram/_files/inputmedia.py +++ b/telegram/_files/inputmedia.py @@ -143,7 +143,7 @@ class InputMediaAnimation(InputMedia): .. versionchanged:: 13.2 Accept :obj:`bytes` as input. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail`. caption (:obj:`str`, optional): Caption of the animation to be sent, 0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters @@ -164,7 +164,7 @@ class InputMediaAnimation(InputMedia): thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`, \ optional): |thumbdocstringnopath| - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Attributes: type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.ANIMATION`. @@ -188,7 +188,7 @@ class InputMediaAnimation(InputMedia): .. versionadded:: 20.0 thumbnail (:class:`telegram.InputFile`): Optional. |thumbdocstringbase| - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ __slots__ = ("duration", "height", "width", "has_spoiler", "thumbnail") @@ -239,7 +239,7 @@ class InputMediaAnimation(InputMedia): def thumb(self) -> Optional[Union[str, InputFile]]: """:class:`telegram.InputFile`: Optional. |thumbdocstringbase| - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail`. """ warn_about_deprecated_attr_in_property( @@ -373,7 +373,7 @@ class InputMediaVideo(InputMedia): .. versionchanged:: 13.2 Accept :obj:`bytes` as input. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail`. has_spoiler (:obj:`bool`, optional): Pass :obj:`True`, if the video needs to be covered with a spoiler animation. @@ -382,7 +382,7 @@ class InputMediaVideo(InputMedia): thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`, \ optional): |thumbdocstringnopath| - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Attributes: type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.VIDEO`. @@ -408,7 +408,7 @@ class InputMediaVideo(InputMedia): .. versionadded:: 20.0 thumbnail (:class:`telegram.InputFile`): Optional. |thumbdocstringbase| - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ __slots__ = ( @@ -468,7 +468,7 @@ class InputMediaVideo(InputMedia): def thumb(self) -> Optional[Union[str, InputFile]]: """:class:`telegram.InputFile`: Optional. |thumbdocstringbase| - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail`. """ warn_about_deprecated_attr_in_property( @@ -520,12 +520,12 @@ class InputMediaAudio(InputMedia): .. versionchanged:: 13.2 Accept :obj:`bytes` as input. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail`. thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`, \ optional): |thumbdocstringnopath| - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Attributes: type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.AUDIO`. @@ -546,7 +546,7 @@ class InputMediaAudio(InputMedia): title (:obj:`str`): Optional. Title of the audio as defined by sender or by audio tags. thumbnail (:class:`telegram.InputFile`): Optional. |thumbdocstringbase| - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ @@ -596,7 +596,7 @@ class InputMediaAudio(InputMedia): def thumb(self) -> Optional[Union[str, InputFile]]: """:class:`telegram.InputFile`: Optional. |thumbdocstringbase| - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail`. """ warn_about_deprecated_attr_in_property( @@ -639,7 +639,7 @@ class InputMediaDocument(InputMedia): .. versionchanged:: 13.2 Accept :obj:`bytes` as input. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail`. disable_content_type_detection (:obj:`bool`, optional): Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always @@ -647,7 +647,7 @@ class InputMediaDocument(InputMedia): thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`, \ optional): |thumbdocstringnopath| - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Attributes: type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.DOCUMENT`. @@ -667,7 +667,7 @@ class InputMediaDocument(InputMedia): :obj:`True`, if the document is sent as part of an album. thumbnail (:class:`telegram.InputFile`): Optional. |thumbdocstringbase| - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ __slots__ = ("disable_content_type_detection", "thumbnail") @@ -706,7 +706,7 @@ class InputMediaDocument(InputMedia): def thumb(self) -> Optional[Union[str, InputFile]]: """:class:`telegram.InputFile`: Optional. |thumbdocstringbase| - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail`. """ warn_about_deprecated_attr_in_property( diff --git a/telegram/_files/inputsticker.py b/telegram/_files/inputsticker.py index 8a0499937..44bab4c2e 100644 --- a/telegram/_files/inputsticker.py +++ b/telegram/_files/inputsticker.py @@ -32,7 +32,7 @@ class InputSticker(TelegramObject): """ This object describes a sticker to be added to a sticker set. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Args: sticker (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path`): The diff --git a/telegram/_files/sticker.py b/telegram/_files/sticker.py index 894d8e108..7477e10f9 100644 --- a/telegram/_files/sticker.py +++ b/telegram/_files/sticker.py @@ -66,7 +66,7 @@ class Sticker(_BaseThumbedMedium): thumb (:class:`telegram.PhotoSize`, optional): Sticker thumbnail in the ``.WEBP`` or ``.JPG`` format. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail`. emoji (:obj:`str`, optional): Emoji associated with the sticker set_name (:obj:`str`, optional): Name of the sticker set to which the sticker belongs. @@ -85,12 +85,12 @@ class Sticker(_BaseThumbedMedium): thumbnail (:class:`telegram.PhotoSize`, optional): Sticker thumbnail in the ``.WEBP`` or ``.JPG`` format. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 needs_repainting (:obj:`bool`, optional): :obj:`True`, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Attributes: file_id (:obj:`str`): Identifier for this file, which can be used to download @@ -126,12 +126,12 @@ class Sticker(_BaseThumbedMedium): thumbnail (:class:`telegram.PhotoSize`): Optional. Sticker thumbnail in the ``.WEBP`` or ``.JPG`` format. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 needs_repainting (:obj:`bool`): Optional. :obj:`True`, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ __slots__ = ( @@ -254,12 +254,12 @@ class StickerSet(TelegramObject): thumb (:class:`telegram.PhotoSize`, optional): Sticker set thumbnail in the ``.WEBP``, ``.TGS``, or ``.WEBM`` format. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail`. thumbnail (:class:`telegram.PhotoSize`, optional): Sticker set thumbnail in the ``.WEBP``, ``.TGS``, or ``.WEBM`` format. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Attributes: name (:obj:`str`): Sticker set name. @@ -281,7 +281,7 @@ class StickerSet(TelegramObject): thumbnail (:class:`telegram.PhotoSize`): Optional. Sticker set thumbnail in the ``.WEBP``, ``.TGS``, or ``.WEBM`` format. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ __slots__ = ( @@ -328,7 +328,7 @@ class StickerSet(TelegramObject): """:class:`telegram.PhotoSize`: Optional. Sticker set thumbnail in the ``.WEBP``, ``.TGS``, or ``.WEBM`` format. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail`. """ warn_about_deprecated_attr_in_property( diff --git a/telegram/_files/video.py b/telegram/_files/video.py index 35dd58e1d..a6b0a4d32 100644 --- a/telegram/_files/video.py +++ b/telegram/_files/video.py @@ -41,14 +41,14 @@ class Video(_BaseThumbedMedium): duration (:obj:`int`): Duration of the video in seconds as defined by sender. thumb (:class:`telegram.PhotoSize`, optional): Video thumbnail. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail`. file_name (:obj:`str`, optional): Original filename as defined by sender. mime_type (:obj:`str`, optional): MIME type of a file as defined by sender. file_size (:obj:`int`, optional): File size in bytes. thumbnail (:class:`telegram.PhotoSize`, optional): Video thumbnail. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Attributes: file_id (:obj:`str`): Identifier for this file, which can be used to download @@ -64,7 +64,7 @@ class Video(_BaseThumbedMedium): file_size (:obj:`int`): Optional. File size in bytes. thumbnail (:class:`telegram.PhotoSize`): Optional. Video thumbnail. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ __slots__ = ("duration", "file_name", "height", "mime_type", "width") diff --git a/telegram/_files/videonote.py b/telegram/_files/videonote.py index cd30d208b..12580cbc2 100644 --- a/telegram/_files/videonote.py +++ b/telegram/_files/videonote.py @@ -40,12 +40,12 @@ class VideoNote(_BaseThumbedMedium): duration (:obj:`int`): Duration of the video in seconds as defined by sender. thumb (:class:`telegram.PhotoSize`, optional): Video thumbnail. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail`. file_size (:obj:`int`, optional): File size in bytes. thumbnail (:class:`telegram.PhotoSize`, optional): Video thumbnail. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Attributes: file_id (:obj:`str`): Identifier for this file, which can be used to download @@ -59,7 +59,7 @@ class VideoNote(_BaseThumbedMedium): file_size (:obj:`int`): Optional. File size in bytes. thumbnail (:class:`telegram.PhotoSize`): Optional. Video thumbnail. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ diff --git a/telegram/_inline/inlinequeryresultarticle.py b/telegram/_inline/inlinequeryresultarticle.py index 26dc80adc..52d6afe33 100644 --- a/telegram/_inline/inlinequeryresultarticle.py +++ b/telegram/_inline/inlinequeryresultarticle.py @@ -54,25 +54,25 @@ class InlineQueryResultArticle(InlineQueryResult): description (:obj:`str`, optional): Short description of the result. thumb_url (:obj:`str`, optional): Url of the thumbnail for the result. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_url`. thumb_width (:obj:`int`, optional): Thumbnail width. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_width`. thumb_height (:obj:`int`, optional): Thumbnail height. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_height`. thumbnail_url (:obj:`str`, optional): Url of the thumbnail for the result. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_width (:obj:`int`, optional): Thumbnail width. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_height (:obj:`int`, optional): Thumbnail height. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Attributes: type (:obj:`str`): :tg-const:`telegram.constants.InlineQueryResultType.ARTICLE`. @@ -90,13 +90,13 @@ class InlineQueryResultArticle(InlineQueryResult): description (:obj:`str`): Optional. Short description of the result. thumbnail_url (:obj:`str`): Optional. Url of the thumbnail for the result. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_width (:obj:`int`): Optional. Thumbnail width. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_height (:obj:`int`): Optional. Thumbnail height. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ @@ -167,7 +167,7 @@ class InlineQueryResultArticle(InlineQueryResult): def thumb_url(self) -> Optional[str]: """:obj:`str`: Optional. Url of the thumbnail for the result. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_url`. """ warn_about_deprecated_attr_in_property( @@ -181,7 +181,7 @@ class InlineQueryResultArticle(InlineQueryResult): def thumb_width(self) -> Optional[int]: """:obj:`str`: Optional. Thumbnail width. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_width`. """ warn_about_deprecated_attr_in_property( @@ -195,7 +195,7 @@ class InlineQueryResultArticle(InlineQueryResult): def thumb_height(self) -> Optional[int]: """:obj:`str`: Optional. Thumbnail height. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_height`. """ warn_about_deprecated_attr_in_property( diff --git a/telegram/_inline/inlinequeryresultcontact.py b/telegram/_inline/inlinequeryresultcontact.py index 60e4d7dc1..1e08323f1 100644 --- a/telegram/_inline/inlinequeryresultcontact.py +++ b/telegram/_inline/inlinequeryresultcontact.py @@ -54,25 +54,25 @@ class InlineQueryResultContact(InlineQueryResult): message to be sent instead of the contact. thumb_url (:obj:`str`, optional): Url of the thumbnail for the result. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_url`. thumb_width (:obj:`int`, optional): Thumbnail width. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_width`. thumb_height (:obj:`int`, optional): Thumbnail height. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_height`. thumbnail_url (:obj:`str`, optional): Url of the thumbnail for the result. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_width (:obj:`int`, optional): Thumbnail width. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_height (:obj:`int`, optional): Thumbnail height. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Attributes: type (:obj:`str`): :tg-const:`telegram.constants.InlineQueryResultType.CONTACT`. @@ -90,13 +90,13 @@ class InlineQueryResultContact(InlineQueryResult): message to be sent instead of the contact. thumbnail_url (:obj:`str`): Optional. Url of the thumbnail for the result. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_width (:obj:`int`): Optional. Thumbnail width. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_height (:obj:`int`): Optional. Thumbnail height. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ @@ -167,7 +167,7 @@ class InlineQueryResultContact(InlineQueryResult): def thumb_url(self) -> Optional[str]: """:obj:`str`: Optional. Url of the thumbnail for the result. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_url`. """ warn_about_deprecated_attr_in_property( @@ -181,7 +181,7 @@ class InlineQueryResultContact(InlineQueryResult): def thumb_width(self) -> Optional[int]: """:obj:`str`: Optional. Thumbnail width. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_width`. """ warn_about_deprecated_attr_in_property( @@ -195,7 +195,7 @@ class InlineQueryResultContact(InlineQueryResult): def thumb_height(self) -> Optional[int]: """:obj:`str`: Optional. Thumbnail height. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_height`. """ warn_about_deprecated_attr_in_property( diff --git a/telegram/_inline/inlinequeryresultdocument.py b/telegram/_inline/inlinequeryresultdocument.py index 238e258da..75e6594be 100644 --- a/telegram/_inline/inlinequeryresultdocument.py +++ b/telegram/_inline/inlinequeryresultdocument.py @@ -68,25 +68,25 @@ class InlineQueryResultDocument(InlineQueryResult): message to be sent instead of the file. thumb_url (:obj:`str`, optional): URL of the thumbnail (JPEG only) for the file. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_url`. thumb_width (:obj:`int`, optional): Thumbnail width. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_width`. thumb_height (:obj:`int`, optional): Thumbnail height. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_height`. thumbnail_url (:obj:`str`, optional): URL of the thumbnail (JPEG only) for the file. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_width (:obj:`int`, optional): Thumbnail width. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_height (:obj:`int`, optional): Thumbnail height. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Attributes: @@ -115,13 +115,13 @@ class InlineQueryResultDocument(InlineQueryResult): message to be sent instead of the file. thumbnail_url (:obj:`str`): Optional. URL of the thumbnail (JPEG only) for the file. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_width (:obj:`int`): Optional. Thumbnail width. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_height (:obj:`int`): Optional. Thumbnail height. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ @@ -201,7 +201,7 @@ class InlineQueryResultDocument(InlineQueryResult): def thumb_url(self) -> Optional[str]: """:obj:`str`: Optional. URL of the thumbnail (JPEG only) for the file. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_url`. """ warn_about_deprecated_attr_in_property( @@ -215,7 +215,7 @@ class InlineQueryResultDocument(InlineQueryResult): def thumb_width(self) -> Optional[int]: """:obj:`str`: Optional. Thumbnail width. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_width`. """ warn_about_deprecated_attr_in_property( @@ -229,7 +229,7 @@ class InlineQueryResultDocument(InlineQueryResult): def thumb_height(self) -> Optional[int]: """:obj:`str`: Optional. Thumbnail height. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_height`. """ warn_about_deprecated_attr_in_property( diff --git a/telegram/_inline/inlinequeryresultgif.py b/telegram/_inline/inlinequeryresultgif.py index 1d9dc9be7..cd65e4af3 100644 --- a/telegram/_inline/inlinequeryresultgif.py +++ b/telegram/_inline/inlinequeryresultgif.py @@ -60,11 +60,11 @@ class InlineQueryResultGif(InlineQueryResult): If you pass neither :paramref:`thumbnail_url` nor :paramref:`thumb_url`, :class:`ValueError` will be raised. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_mime_type (:obj:`str`, optional): MIME type of the thumbnail, must be one of ``'image/jpeg'``, ``'image/gif'``, or ``'video/mp4'``. Defaults to ``'image/jpeg'``. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 title (:obj:`str`, optional): Title for the result. caption (:obj:`str`, optional): Caption of the GIF file to be sent, 0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters @@ -82,12 +82,12 @@ class InlineQueryResultGif(InlineQueryResult): thumb_mime_type (:obj:`str`, optional): MIME type of the thumbnail, must be one of ``'image/jpeg'``, ``'image/gif'``, or ``'video/mp4'``. Defaults to ``'image/jpeg'``. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_mime_type`. thumb_url (:obj:`str`, optional): URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_url`. Raises: @@ -106,11 +106,11 @@ class InlineQueryResultGif(InlineQueryResult): thumbnail_url (:obj:`str`): URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_mime_type (:obj:`str`): Optional. MIME type of the thumbnail, must be one of ``'image/jpeg'``, ``'image/gif'``, or ``'video/mp4'``. Defaults to ``'image/jpeg'``. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 title (:obj:`str`): Optional. Title for the result. caption (:obj:`str`): Optional. Caption of the GIF file to be sent, 0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters @@ -209,7 +209,7 @@ class InlineQueryResultGif(InlineQueryResult): """:obj:`str`: URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_url`. """ warn_about_deprecated_attr_in_property( @@ -224,7 +224,7 @@ class InlineQueryResultGif(InlineQueryResult): """:obj:`str`: Optional. Optional. MIME type of the thumbnail, must be one of ``'image/jpeg'``, ``'image/gif'``, or ``'video/mp4'``. Defaults to ``'image/jpeg'``. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_mime_type`. """ warn_about_deprecated_attr_in_property( diff --git a/telegram/_inline/inlinequeryresultlocation.py b/telegram/_inline/inlinequeryresultlocation.py index 74801d29c..c6dd7e013 100644 --- a/telegram/_inline/inlinequeryresultlocation.py +++ b/telegram/_inline/inlinequeryresultlocation.py @@ -68,25 +68,25 @@ class InlineQueryResultLocation(InlineQueryResult): message to be sent instead of the location. thumb_url (:obj:`str`, optional): Url of the thumbnail for the result. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_url`. thumb_width (:obj:`int`, optional): Thumbnail width. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_width`. thumb_height (:obj:`int`, optional): Thumbnail height. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_height`. thumbnail_url (:obj:`str`, optional): Url of the thumbnail for the result. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_width (:obj:`int`, optional): Thumbnail width. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_height (:obj:`int`, optional): Thumbnail height. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Attributes: type (:obj:`str`): :tg-const:`telegram.constants.InlineQueryResultType.LOCATION`. @@ -118,13 +118,13 @@ class InlineQueryResultLocation(InlineQueryResult): message to be sent instead of the location. thumbnail_url (:obj:`str`): Optional. Url of the thumbnail for the result. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_width (:obj:`int`): Optional. Thumbnail width. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_height (:obj:`int`): Optional. Thumbnail height. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ @@ -206,7 +206,7 @@ class InlineQueryResultLocation(InlineQueryResult): def thumb_url(self) -> Optional[str]: """:obj:`str`: Optional. Url of the thumbnail for the result. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_url`. """ warn_about_deprecated_attr_in_property( @@ -220,7 +220,7 @@ class InlineQueryResultLocation(InlineQueryResult): def thumb_width(self) -> Optional[int]: """:obj:`str`: Optional. Thumbnail width. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_width`. """ warn_about_deprecated_attr_in_property( @@ -234,7 +234,7 @@ class InlineQueryResultLocation(InlineQueryResult): def thumb_height(self) -> Optional[int]: """:obj:`str`: Optional. Thumbnail height. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_height`. """ warn_about_deprecated_attr_in_property( diff --git a/telegram/_inline/inlinequeryresultmpeg4gif.py b/telegram/_inline/inlinequeryresultmpeg4gif.py index 09b45a8f6..fbedef276 100644 --- a/telegram/_inline/inlinequeryresultmpeg4gif.py +++ b/telegram/_inline/inlinequeryresultmpeg4gif.py @@ -61,11 +61,11 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult): If you pass neither :paramref:`thumbnail_url` nor :paramref:`thumb_url`, :class:`ValueError` will be raised. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_mime_type (:obj:`str`, optional): MIME type of the thumbnail, must be one of ``'image/jpeg'``, ``'image/gif'``, or ``'video/mp4'``. Defaults to ``'image/jpeg'``. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 title (:obj:`str`, optional): Title for the result. caption (:obj:`str`, optional): Caption of the MPEG-4 file to be sent, 0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters @@ -98,11 +98,11 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult): thumbnail_url (:obj:`str`): URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_mime_type (:obj:`str`): Optional. MIME type of the thumbnail, must be one of ``'image/jpeg'``, ``'image/gif'``, or ``'video/mp4'``. Defaults to ``'image/jpeg'``. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 title (:obj:`str`): Optional. Title for the result. caption (:obj:`str`): Optional. Caption of the MPEG-4 file to be sent, 0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters @@ -202,7 +202,7 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult): """:obj:`str`: URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_url`. """ warn_about_deprecated_attr_in_property( @@ -217,7 +217,7 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult): """:obj:`str`: Optional. Optional. MIME type of the thumbnail, must be one of ``'image/jpeg'``, ``'image/gif'``, or ``'video/mp4'``. Defaults to ``'image/jpeg'``. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_mime_type`. """ warn_about_deprecated_attr_in_property( diff --git a/telegram/_inline/inlinequeryresultphoto.py b/telegram/_inline/inlinequeryresultphoto.py index 65da0564d..631324628 100644 --- a/telegram/_inline/inlinequeryresultphoto.py +++ b/telegram/_inline/inlinequeryresultphoto.py @@ -57,7 +57,7 @@ class InlineQueryResultPhoto(InlineQueryResult): If you pass neither :paramref:`thumbnail_url` nor :paramref:`thumb_url`, :class:`ValueError` will be raised. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 photo_width (:obj:`int`, optional): Width of the photo. photo_height (:obj:`int`, optional): Height of the photo. title (:obj:`str`, optional): Title for the result. @@ -77,7 +77,7 @@ class InlineQueryResultPhoto(InlineQueryResult): message to be sent instead of the photo. thumb_url (:obj:`str`, optional): URL of the thumbnail for the photo. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_url`. Raises: @@ -182,7 +182,7 @@ class InlineQueryResultPhoto(InlineQueryResult): def thumb_url(self) -> Optional[str]: """:obj:`str`: URL of the thumbnail for the photo. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_url`. """ warn_about_deprecated_attr_in_property( diff --git a/telegram/_inline/inlinequeryresultvenue.py b/telegram/_inline/inlinequeryresultvenue.py index 68aa67ebc..fd0733a9b 100644 --- a/telegram/_inline/inlinequeryresultvenue.py +++ b/telegram/_inline/inlinequeryresultvenue.py @@ -65,25 +65,25 @@ class InlineQueryResultVenue(InlineQueryResult): message to be sent instead of the venue. thumb_url (:obj:`str`, optional): Url of the thumbnail for the result. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_url`. thumb_width (:obj:`int`, optional): Thumbnail width. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_width`. thumb_height (:obj:`int`, optional): Thumbnail height. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_height`. thumbnail_url (:obj:`str`, optional): Url of the thumbnail for the result. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_width (:obj:`int`, optional): Thumbnail width. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_height (:obj:`int`, optional): Thumbnail height. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 Attributes: type (:obj:`str`): :tg-const:`telegram.constants.InlineQueryResultType.VENUE`. @@ -108,13 +108,13 @@ class InlineQueryResultVenue(InlineQueryResult): message to be sent instead of the venue. thumbnail_url (:obj:`str`): Optional. Url of the thumbnail for the result. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_width (:obj:`int`): Optional. Thumbnail width. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 thumbnail_height (:obj:`int`): Optional. Thumbnail height. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ @@ -197,7 +197,7 @@ class InlineQueryResultVenue(InlineQueryResult): def thumb_url(self) -> Optional[str]: """:obj:`str`: Optional. Url of the thumbnail for the result. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_url`. """ warn_about_deprecated_attr_in_property( @@ -211,7 +211,7 @@ class InlineQueryResultVenue(InlineQueryResult): def thumb_width(self) -> Optional[int]: """:obj:`str`: Optional. Thumbnail width. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_width`. """ warn_about_deprecated_attr_in_property( @@ -225,7 +225,7 @@ class InlineQueryResultVenue(InlineQueryResult): def thumb_height(self) -> Optional[int]: """:obj:`str`: Optional. Thumbnail height. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_height`. """ warn_about_deprecated_attr_in_property( diff --git a/telegram/_inline/inlinequeryresultvideo.py b/telegram/_inline/inlinequeryresultvideo.py index e99410bbc..cbfd31e45 100644 --- a/telegram/_inline/inlinequeryresultvideo.py +++ b/telegram/_inline/inlinequeryresultvideo.py @@ -62,7 +62,7 @@ class InlineQueryResultVideo(InlineQueryResult): If you pass neither :paramref:`thumbnail_url` nor :paramref:`thumb_url`, :class:`ValueError` will be raised. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 title (:obj:`str`, optional): Title for the result. Warning: @@ -91,7 +91,7 @@ class InlineQueryResultVideo(InlineQueryResult): (e.g., a YouTube video). thumb_url (:obj:`str`, optional): URL of the thumbnail (JPEG only) for the video. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbargumentdeprecation| :paramref:`thumbnail_url`. Raises: @@ -108,7 +108,7 @@ class InlineQueryResultVideo(InlineQueryResult): mime_type (:obj:`str`): Mime type of the content of video url, "text/html" or "video/mp4". thumbnail_url (:obj:`str`): URL of the thumbnail (JPEG only) for the video. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 title (:obj:`str`): Title for the result. caption (:obj:`str`): Optional. Caption of the video to be sent, 0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after entities @@ -218,7 +218,7 @@ class InlineQueryResultVideo(InlineQueryResult): def thumb_url(self) -> str: """:obj:`str`: URL of the thumbnail (JPEG only) for the video. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.2 |thumbattributedeprecation| :attr:`thumbnail_url`. """ warn_about_deprecated_attr_in_property( diff --git a/telegram/_utils/warnings_transition.py b/telegram/_utils/warnings_transition.py index 731b2fdb9..06bf7eaa8 100644 --- a/telegram/_utils/warnings_transition.py +++ b/telegram/_utils/warnings_transition.py @@ -21,7 +21,7 @@ It was created to prevent circular imports that would be caused by creating the warnings inside warnings.py. -.. versionadded:: NEXT.VERSION +.. versionadded:: 20.2 """ import functools from typing import Any diff --git a/telegram/_version.py b/telegram/_version.py index 47dd0bc95..61490e4be 100644 --- a/telegram/_version.py +++ b/telegram/_version.py @@ -50,7 +50,7 @@ class Version(NamedTuple): return version -__version_info__ = Version(major=20, minor=1, micro=0, releaselevel="final", serial=0) +__version_info__ = Version(major=20, minor=2, micro=0, releaselevel="final", serial=0) __version__ = str(__version_info__) # # SETUP.PY MARKER diff --git a/telegram/constants.py b/telegram/constants.py index a5a8d57e8..65569ebe9 100644 --- a/telegram/constants.py +++ b/telegram/constants.py @@ -192,7 +192,7 @@ class BotDescriptionLimit(IntEnum): :meth:`telegram.Bot.set_my_short_description`. The enum members of this enumeration are instances of :class:`int` and can be treated as such. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ __slots__ = () @@ -1272,7 +1272,7 @@ class StickerFormat(StringEnum): """This enum contains the available formats of :class:`telegram.Sticker` in the set. The enum members of this enumeration are instances of :class:`str` and can be treated as such. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ __slots__ = () @@ -1312,28 +1312,28 @@ class StickerLimit(IntEnum): :paramref:`~telegram.Bot.setStickerEmojiList.emoji_list` parameter of :meth:`telegram.Bot.set_sticker_emoji_list`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ MAX_STICKER_EMOJI = 20 """:obj:`int`: Maximum number of emojis associated with a sticker, passed as the :paramref:`~telegram.Bot.setStickerEmojiList.emoji_list` parameter of :meth:`telegram.Bot.set_sticker_emoji_list`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ MAX_SEARCH_KEYWORDS = 20 """:obj:`int`: Maximum number of search keywords for a sticker, passed as the :paramref:`~telegram.Bot.set_sticker_keywords.keywords` parameter of :meth:`telegram.Bot.set_sticker_keywords`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ MAX_KEYWORD_LENGTH = 64 """:obj:`int`: Maximum number of characters in a search keyword for a sticker, for each item in :paramref:`~telegram.Bot.set_sticker_keywords.keywords` sequence of :meth:`telegram.Bot.set_sticker_keywords`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ @@ -1343,7 +1343,7 @@ class StickerSetLimit(IntEnum): The enum members of this enumeration are instances of :class:`int` and can be treated as such. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ __slots__ = () diff --git a/telegram/ext/_application.py b/telegram/ext/_application.py index 52f706619..ddb9c0d4e 100644 --- a/telegram/ext/_application.py +++ b/telegram/ext/_application.py @@ -953,7 +953,7 @@ class Application(Generic[BT, CCT, UD, CD, BD, JQ], AsyncContextManager["Applica Args: coroutine (:term:`awaitable`): The awaitable to run as task. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.2 Accepts :class:`asyncio.Future` and generator-based coroutine functions. update (:obj:`object`, optional): If set, will be passed to :meth:`process_error` as additional information for the error handlers. Moreover, the corresponding diff --git a/telegram/ext/_applicationbuilder.py b/telegram/ext/_applicationbuilder.py index af4a5ab31..7c8876d60 100644 --- a/telegram/ext/_applicationbuilder.py +++ b/telegram/ext/_applicationbuilder.py @@ -584,7 +584,7 @@ class ApplicationBuilder(Generic[BT, CCT, UD, CD, BD, JQ]): robust option at this time" `_. .. versionadded:: 20.1 - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.2 Reset the default version to 1.1. Args: @@ -741,7 +741,7 @@ class ApplicationBuilder(Generic[BT, CCT, UD, CD, BD, JQ]): pip install httpx[http2] .. versionadded:: 20.1 - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.2 Reset the default version to 1.1. Args: diff --git a/telegram/ext/_callbackcontext.py b/telegram/ext/_callbackcontext.py index d344ce9b9..b4b4f1b56 100644 --- a/telegram/ext/_callbackcontext.py +++ b/telegram/ext/_callbackcontext.py @@ -306,7 +306,7 @@ class CallbackContext(Generic[BT, UD, CD, BD]): .. versionadded:: 20.0 - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.2 Accepts :class:`asyncio.Future` and generator-based coroutine functions. Returns: :class:`telegram.ext.CallbackContext` diff --git a/telegram/request/_httpxrequest.py b/telegram/request/_httpxrequest.py index 8994363e2..ae1444c86 100644 --- a/telegram/request/_httpxrequest.py +++ b/telegram/request/_httpxrequest.py @@ -86,7 +86,7 @@ class HTTPXRequest(BaseRequest): Defaults to ``"1.1"``. .. versionadded:: 20.1 - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.2 Reset the default version to 1.1. """ @@ -151,7 +151,7 @@ class HTTPXRequest(BaseRequest): """ :obj:`str`: Used HTTP version, see :paramref:`http_version`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.2 """ return self._http_version