Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bump Version to v21.8 #4583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 1, 2024
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
16 changes: 16 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@
Changelog
=========

Version 21.8
============
*Released 2024-12-01*

This is the technical changelog for version 21.8. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel <https://t.me/pythontelegrambotchannel>`_.

Major Changes
-------------

- Full Support for Bot API 8.0 (:pr:`4568`, :pr:`4566` closes :issue:`4567`, :pr:`4572`, :pr:`4571`, :pr:`4570`, :pr:`4576`, :pr:`4574`)

Documentation Improvements
--------------------------

- Documentation Improvements (:pr:`4565` by `Snehashish06 <https://github.com/Snehashish06>`_, :pr:`4573`)

Version 21.7
============
*Released 2024-11-04*
Expand Down
14 changes: 7 additions & 7 deletions telegram/_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3660,7 +3660,7 @@ async def save_prepared_inline_message(
) -> PreparedInlineMessage:
"""Stores a message that can be sent by a user of a Mini App.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8

Args:
user_id (:obj:`int`): Unique identifier of the target user that can use the prepared
Expand Down Expand Up @@ -6246,7 +6246,7 @@ async def set_user_emoji_status(
`requestEmojiStatusAccess <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_
.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8

Args:
user_id (:obj:`int`): Unique identifier of the target user
Expand Down Expand Up @@ -8142,7 +8142,7 @@ async def create_invoice_link(
business_connection_id (:obj:`str`, optional): |business_id_str|
For payments in |tg_stars| only.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8
title (:obj:`str`): Product name. :tg-const:`telegram.Invoice.MIN_TITLE_LENGTH`-
:tg-const:`telegram.Invoice.MAX_TITLE_LENGTH` characters.
description (:obj:`str`): Product description.
Expand Down Expand Up @@ -8177,7 +8177,7 @@ async def create_invoice_link(
number of subscriptions can be active for a given bot at the same time, including
multiple concurrent subscriptions from the same user.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8
max_tip_amount (:obj:`int`, optional): The maximum accepted amount for tips in the
*smallest units* of the currency (integer, **not** float/double). For example, for
a maximum tip of ``US$ 1.45`` pass ``max_tip_amount = 145``. See the ``exp``
Expand Down Expand Up @@ -9391,7 +9391,7 @@ async def edit_user_star_subscription(
"""Allows the bot to cancel or re-enable extension of a subscription paid in Telegram
Stars.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8

Args:
user_id (:obj:`int`): Identifier of the user whose subscription will be edited.
Expand Down Expand Up @@ -9656,7 +9656,7 @@ async def get_available_gifts(
"""Returns the list of gifts that can be sent by the bot to users.
Requires no parameters.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8

Returns:
:class:`telegram.Gifts`
Expand Down Expand Up @@ -9692,7 +9692,7 @@ async def send_gift(
"""Sends a gift to the given user.
The gift can't be converted to Telegram Stars by the user

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8

Args:
user_id (:obj:`int`): Unique identifier of the target user that will receive the gift
Expand Down
2 changes: 1 addition & 1 deletion telegram/_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3459,7 +3459,7 @@ async def send_gift(
Caution:
Can only work, if the chat is a private chat, see :attr:`type`.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8

Returns:
:obj:`bool`: On success, :obj:`True` is returned.
Expand Down
4 changes: 2 additions & 2 deletions telegram/_gifts.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Gift(TelegramObject):
Objects of this class are comparable in terms of equality. Two objects of this class are
considered equal if their :attr:`id` is equal.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8

Args:
id (:obj:`str`): Unique identifier of the gift
Expand Down Expand Up @@ -99,7 +99,7 @@ class Gifts(TelegramObject):
Objects of this class are comparable in terms of equality. Two objects of this class are
considered equal if their :attr:`gifts` are equal.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8

Args:
gifts (Sequence[:class:`Gift`]): The sequence of gifts
Expand Down
2 changes: 1 addition & 1 deletion telegram/_inline/preparedinlinemessage.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class PreparedInlineMessage(TelegramObject):
Objects of this class are comparable in terms of equality. Two objects of this class are
considered equal, if their :attr:`id` is equal.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8

Args:
id (:obj:`str`): Unique identifier of the prepared message
Expand Down
8 changes: 4 additions & 4 deletions telegram/_payment/stars.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ class TransactionPartnerUser(TransactionPartner):
subscription_period (:class:`datetime.timedelta`, optional): The duration of the paid
subscription

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8
paid_media (Sequence[:class:`telegram.PaidMedia`], optional): Information about the paid
media bought by the user.

Expand All @@ -342,7 +342,7 @@ class TransactionPartnerUser(TransactionPartner):
.. versionadded:: 21.6
gift (:class:`telegram.Gift`, optional): The gift sent to the user by the bot

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8

Attributes:
type (:obj:`str`): The type of the transaction partner,
Expand All @@ -352,7 +352,7 @@ class TransactionPartnerUser(TransactionPartner):
subscription_period (:class:`datetime.timedelta`): Optional. The duration of the paid
subscription

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8
paid_media (tuple[:class:`telegram.PaidMedia`]): Optional. Information about the paid
media bought by the user.

Expand All @@ -362,7 +362,7 @@ class TransactionPartnerUser(TransactionPartner):
.. versionadded:: 21.6
gift (:class:`telegram.Gift`): Optional. The gift sent to the user by the bot

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8

"""

Expand Down
12 changes: 6 additions & 6 deletions telegram/_payment/successfulpayment.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ class SuccessfulPayment(TelegramObject):
subscription_expiration_date (:class:`datetime.datetime`, optional): Expiration date of the
subscription; for recurring payments only.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8
is_recurring (:obj:`bool`, optional): True, if the payment is for a subscription.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8
is_first_recurring (:obj:`bool`, optional): True, if the payment is the first payment of a
subscription.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8
shipping_option_id (:obj:`str`, optional): Identifier of the shipping option chosen by the
user.
order_info (:class:`telegram.OrderInfo`, optional): Order info provided by the user.
Expand All @@ -77,14 +77,14 @@ class SuccessfulPayment(TelegramObject):
subscription_expiration_date (:class:`datetime.datetime`): Optional. Expiration
date of the subscription; for recurring payments only.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8
is_recurring (:obj:`bool`): Optional. True, if the payment is for a subscription.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8
is_first_recurring (:obj:`bool`): Optional. True, if the payment is the first payment of a
subscription.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8
shipping_option_id (:obj:`str`): Optional. Identifier of the shipping option chosen by the
user.
order_info (:class:`telegram.OrderInfo`): Optional. Order info provided by the user.
Expand Down
2 changes: 1 addition & 1 deletion telegram/_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,7 @@ async def send_gift(

For the documentation of the arguments, please see :meth:`telegram.Bot.send_gift`.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8

Returns:
:obj:`bool`: On success, :obj:`True` is returned.
Expand Down
2 changes: 1 addition & 1 deletion telegram/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ def __str__(self) -> str:


__version_info__: Final[Version] = Version(
major=21, minor=7, micro=0, releaselevel="final", serial=0
major=21, minor=8, micro=0, releaselevel="final", serial=0
)
__version__: Final[str] = str(__version_info__)
4 changes: 2 additions & 2 deletions telegram/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,7 @@ class GiftLimit(IntEnum):
"""This enum contains limitations for :meth:`~telegram.Bot.send_gift`.
The enum members of this enumeration are instances of :class:`int` and can be treated as such.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8
"""

__slots__ = ()
Expand Down Expand Up @@ -2923,7 +2923,7 @@ class InvoiceLimit(IntEnum):
the next payment, passed as :paramref:`~telegram.Bot.create_invoice_link.subscription_period`
parameter of :meth:`telegram.Bot.create_invoice_link`.

.. versionadded:: NEXT.VERSION
.. versionadded:: 21.8
"""


Expand Down