Bump version to v20.2

This commit is contained in:
Hinrich Mahler 2023-03-25 13:25:59 +01:00
parent 4ddc36c625
commit 4aedb33d37
29 changed files with 235 additions and 186 deletions

View file

@ -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 <https://t.me/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*

View file

@ -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"

View file

@ -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 <https://core.telegram.org/stickers>`_ 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

View file

@ -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.

View file

@ -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(

View file

@ -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
"""

View file

@ -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
"""

View file

@ -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
"""

View file

@ -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(

View file

@ -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

View file

@ -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(

View file

@ -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")

View file

@ -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
"""

View file

@ -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(

View file

@ -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(

View file

@ -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(

View file

@ -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(

View file

@ -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(

View file

@ -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(

View file

@ -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(

View file

@ -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(

View file

@ -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(

View file

@ -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

View file

@ -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

View file

@ -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__ = ()

View file

@ -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

View file

@ -584,7 +584,7 @@ class ApplicationBuilder(Generic[BT, CCT, UD, CD, BD, JQ]):
robust option at this time" <https://www.python-httpx.org/http2#enabling-http2>`_.
.. 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:

View file

@ -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`

View file

@ -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