Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The following wonderful people contributed directly or indirectly to this projec
- `Abshar <https://github.com/abxhr>`_
- `Alateas <https://github.com/alateas>`_
- `Ales Dokshanin <https://github.com/alesdokshanin>`_
- `Alexandre <https://github.com/xTudoS>`_
- `Alizia <https://github.com/thefunkycat>`_
- `Ambro17 <https://github.com/Ambro17>`_
- `Andrej Zhilenkov <https://github.com/Andrej730>`_
Expand Down Expand Up @@ -69,6 +70,7 @@ The following wonderful people contributed directly or indirectly to this projec
- `Joscha Götzer <https://github.com/Rostgnom>`_
- `jossalgon <https://github.com/jossalgon>`_
- `JRoot3D <https://github.com/JRoot3D>`_
- `kenjitagawa <https://github.com/kenjitagawa>`_
- `kennethcheo <https://github.com/kennethcheo>`_
- `Kirill Vasin <https://github.com/vasinkd>`_
- `Kjwon15 <https://github.com/kjwon15>`_
Expand Down
4 changes: 2 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://t.me/pythontelegrambotchannel>`__.
This is the technical changelog for version 20.7. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel <https://t.me/pythontelegrambotchannel>`__.

New Features
------------
Expand Down
1 change: 1 addition & 0 deletions docs/source/telegram.constants.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ telegram.constants Module
.. automodule:: telegram.constants
:members:
:show-inheritance:
:inherited-members: Enum, EnumMeta
2 changes: 1 addition & 1 deletion telegram/_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4820,7 +4820,7 @@ async def send_invoice(
`@BotFather <https://t.me/BotFather>`_.
currency (:obj:`str`): Three-letter ISO 4217 currency code, see `more on currencies
<https://core.telegram.org/bots/payments#supported-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.).

Expand Down
4 changes: 4 additions & 0 deletions telegram/_files/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ async def download_to_memory(

.. seealso:: :wiki:`Working with Files and Media <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:
Expand Down
12 changes: 12 additions & 0 deletions telegram/ext/_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <examples.echobot>`

Expand Down
4 changes: 4 additions & 0 deletions telegram/ext/_extbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down