diff --git a/.readthedocs.yml b/.readthedocs.yml index bd9f8c51f..51706328d 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -12,6 +12,7 @@ sphinx: # Optionally build your docs in additional formats such as PDF formats: - pdf + - htmlzip # Optionally set the version of Python and requirements required to build your docs python: diff --git a/AUTHORS.rst b/AUTHORS.rst index d284dafa0..e01a2a13e 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -25,6 +25,7 @@ The following wonderful people contributed directly or indirectly to this projec - `Abshar `_ - `Alateas `_ - `Ales Dokshanin `_ +- `Alexandre `_ - `Alizia `_ - `Ambro17 `_ - `Andrej Zhilenkov `_ @@ -69,6 +70,7 @@ The following wonderful people contributed directly or indirectly to this projec - `Joscha Götzer `_ - `jossalgon `_ - `JRoot3D `_ +- `kenjitagawa `_ - `kennethcheo `_ - `Kirill Vasin `_ - `Kjwon15 `_ diff --git a/CHANGES.rst b/CHANGES.rst index 6d793ebda..19c62c192 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,12 +4,12 @@ Changelog ========= -Version 20.6 +Version 20.7 ============ *Released 2023-11-27* -This is the technical changelog for version 20.6. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel `__. +This is the technical changelog for version 20.7. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel `__. New Features ------------ diff --git a/docs/source/telegram.constants.rst b/docs/source/telegram.constants.rst index 124951465..78d5af899 100644 --- a/docs/source/telegram.constants.rst +++ b/docs/source/telegram.constants.rst @@ -4,3 +4,4 @@ telegram.constants Module .. automodule:: telegram.constants :members: :show-inheritance: + :inherited-members: Enum, EnumMeta diff --git a/telegram/_bot.py b/telegram/_bot.py index 0392f3182..e6eca3260 100644 --- a/telegram/_bot.py +++ b/telegram/_bot.py @@ -4820,7 +4820,7 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]): `@BotFather `_. currency (:obj:`str`): Three-letter ISO 4217 currency code, see `more on currencies `_. - prices (Sequence[:class:`telegram.LabeledPrice`)]: Price breakdown, a sequence + prices (Sequence[:class:`telegram.LabeledPrice`]): Price breakdown, a sequence of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). diff --git a/telegram/_files/file.py b/telegram/_files/file.py index 7e4c7972e..dd8ed7e9e 100644 --- a/telegram/_files/file.py +++ b/telegram/_files/file.py @@ -231,6 +231,10 @@ class File(TelegramObject): .. seealso:: :wiki:`Working with Files and Media ` + Hint: + If you want to immediately read the data from ``out`` after calling this method, you + should call ``out.seek(0)`` first. See also :meth:`io.IOBase.seek`. + .. versionadded:: 20.0 Args: diff --git a/telegram/ext/_application.py b/telegram/ext/_application.py index 2925404a3..4a6fc68bd 100644 --- a/telegram/ext/_application.py +++ b/telegram/ext/_application.py @@ -157,6 +157,18 @@ class Application(Generic[BT, CCT, UD, CD, BD, JQ], AsyncContextManager["Applica .. seealso:: :meth:`__aenter__` and :meth:`__aexit__`. + This class is a :class:`~typing.Generic` class and accepts six type variables: + + 1. The type of :attr:`bot`. Must be :class:`telegram.Bot` or a subclass of that class. + 2. The type of the argument ``context`` of callback functions for (error) handlers and jobs. + Must be :class:`telegram.ext.CallbackContext` or a subclass of that class. This must be + consistent with the following types. + 3. The type of the values of :attr:`user_data`. + 4. The type of the values of :attr:`chat_data`. + 5. The type of :attr:`bot_data`. + 6. The type of :attr:`job_queue`. Must either be :class:`telegram.ext.JobQueue` or a subclass + of that or :obj:`None`. + Examples: :any:`Echo Bot ` diff --git a/telegram/ext/_extbot.py b/telegram/ext/_extbot.py index f03b623da..a92ea2fab 100644 --- a/telegram/ext/_extbot.py +++ b/telegram/ext/_extbot.py @@ -128,6 +128,10 @@ class ExtBot(Bot, Generic[RLARGS]): This can be used to pass additional information to the rate limiter, specifically to :paramref:`telegram.ext.BaseRateLimiter.process_request.rate_limit_args`. + This class is a :class:`~typing.Generic` class and accepts one type variable that specifies + the generic type of the :attr:`rate_limiter` used by the bot. Use :obj:`None` if no rate + limiter is used. + Warning: * The keyword argument ``rate_limit_args`` can `not` be used, if :attr:`rate_limiter` is :obj:`None`.