Skip to content

Commit

Permalink
Bump Version to v21.9 (python-telegram-bot#4601)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bibo-Joshi authored Dec 7, 2024
1 parent ca7a309 commit 2ac5201
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 17 deletions.
27 changes: 27 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@
Changelog
=========

Version 21.9
============

*Released 2024-12-07*

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

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

- Full Support for Bot API 8.1 (:pr:`4594` closes :issue:`4592`)

Minor Changes
-------------

- Use ``MessageLimit.DEEP_LINK_LENGTH`` in ``helpers.create_deep_linked_url`` (:pr:`4597` by `nemacysts <https://github.com/nemacysts>`_)
- Allow ``Sequence`` Input for ``allowed_updates`` in ``Application`` and ``Updater`` Methods (:pr:`4589` by `nemacysts <https://github.com/nemacysts>`_)

Dependency Updates
------------------

- Update ``aiolimiter`` requirement from ~=1.1.0 to >=1.1,<1.3 (:pr:`4595`)
- Bump ``pytest`` from 8.3.3 to 8.3.4 (:pr:`4596`)
- Bump ``codecov/codecov-action`` from 4 to 5 (:pr:`4585`)
- Bump ``pylint`` to v3.3.2 to Improve Python 3.13 Support (:pr:`4590` by `nemacysts <https://github.com/nemacysts>`_)
- Bump ``srvaroa/labeler`` from 1.11.1 to 1.12.0 (:pr:`4586`)

Version 21.8
============
*Released 2024-12-01*
Expand Down
14 changes: 7 additions & 7 deletions telegram/_payment/stars.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class AffiliateInfo(TelegramObject):
considered equal, if their :attr:`affiliate_user`, :attr:`affiliate_chat`,
:attr:`commission_per_mille`, :attr:`amount`, and :attr:`nanostar_amount` are equal.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.9
Args:
affiliate_user (:class:`telegram.User`, optional): The bot or the user that received an
Expand Down Expand Up @@ -315,7 +315,7 @@ class TransactionPartner(TelegramObject):
AFFILIATE_PROGRAM: Final[str] = constants.TransactionPartnerType.AFFILIATE_PROGRAM
""":const:`telegram.constants.TransactionPartnerType.AFFILIATE_PROGRAM`
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.9
"""
FRAGMENT: Final[str] = constants.TransactionPartnerType.FRAGMENT
""":const:`telegram.constants.TransactionPartnerType.FRAGMENT`"""
Expand Down Expand Up @@ -380,7 +380,7 @@ class TransactionPartnerAffiliateProgram(TransactionPartner):
This object is comparable in terms of equality. Two objects of this class are considered equal,
if their :attr:`commission_per_mille` are equal.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.9
Args:
sponsor_user (:class:`telegram.User`, optional): Information about the bot that sponsored
Expand Down Expand Up @@ -490,7 +490,7 @@ class TransactionPartnerUser(TransactionPartner):
affiliate (:class:`telegram.AffiliateInfo`, optional): Information about the affiliate that
received a commission via this transaction
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.9
invoice_payload (:obj:`str`, optional): Bot-specified invoice payload.
subscription_period (:class:`datetime.timedelta`, optional): The duration of the paid
subscription
Expand All @@ -514,7 +514,7 @@ class TransactionPartnerUser(TransactionPartner):
affiliate (:class:`telegram.AffiliateInfo`): Optional. Information about the affiliate that
received a commission via this transaction
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.9
invoice_payload (:obj:`str`): Optional. Bot-specified invoice payload.
subscription_period (:class:`datetime.timedelta`): Optional. The duration of the paid
subscription
Expand Down Expand Up @@ -676,7 +676,7 @@ class StarTransaction(TelegramObject):
Stars transferred by the transaction; from 0 to
:tg-const:`~telegram.constants.StarTransactionsLimit.NANOSTAR_MAX_AMOUNT`
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.9
date (:obj:`datetime.datetime`): Date the transaction was created as a datetime object.
source (:class:`telegram.TransactionPartner`, optional): Source of an incoming transaction
(e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal).
Expand All @@ -696,7 +696,7 @@ class StarTransaction(TelegramObject):
Stars transferred by the transaction; from 0 to
:tg-const:`~telegram.constants.StarTransactionsLimit.NANOSTAR_MAX_AMOUNT`
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.9
date (:obj:`datetime.datetime`): Date the transaction was created as a datetime object.
source (:class:`telegram.TransactionPartner`): Optional. Source of an incoming transaction
(e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal).
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=8, micro=0, releaselevel="final", serial=0
major=21, minor=9, micro=0, releaselevel="final", serial=0
)
__version__: Final[str] = str(__version_info__)
10 changes: 5 additions & 5 deletions telegram/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2466,7 +2466,7 @@ class StarTransactions(FloatEnum):
The enum members of this enumeration are instances of :class:`float` and can be treated as
such.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.9
"""

__slots__ = ()
Expand Down Expand Up @@ -2499,15 +2499,15 @@ class StarTransactionsLimit(IntEnum):
""":obj:`int`: Minimum value allowed for :paramref:`~telegram.AffiliateInfo.nanostar_amount`
parameter of :class:`telegram.AffiliateInfo`.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.9
"""
NANOSTAR_MAX_AMOUNT = 999999999
""":obj:`int`: Maximum value allowed for :paramref:`~telegram.StarTransaction.nanostar_amount`
parameter of :class:`telegram.StarTransaction` and
:paramref:`~telegram.AffiliateInfo.nanostar_amount` parameter of
:class:`telegram.AffiliateInfo`.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.9
"""


Expand Down Expand Up @@ -2656,7 +2656,7 @@ class TransactionPartnerType(StringEnum):
AFFILIATE_PROGRAM = "affiliate_program"
""":obj:`str`: Transaction with Affiliate Program.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.9
"""
FRAGMENT = "fragment"
""":obj:`str`: Withdrawal transaction with Fragment."""
Expand Down Expand Up @@ -2965,7 +2965,7 @@ class InvoiceLimit(IntEnum):
""":obj:`int`: The maximum price of a subscription created wtih
:meth:`telegram.Bot.create_invoice_link`.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.9
"""


Expand Down
4 changes: 2 additions & 2 deletions telegram/ext/_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ def run_polling(
allowed_updates (Sequence[:obj:`str`], optional): Passed to
:meth:`telegram.Bot.get_updates`.
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.9
Accepts any :class:`collections.abc.Sequence` as input instead of just a list
close_loop (:obj:`bool`, optional): If :obj:`True`, the current event loop will be
closed upon shutdown. Defaults to :obj:`True`.
Expand Down Expand Up @@ -960,7 +960,7 @@ def run_webhook(
allowed_updates (Sequence[:obj:`str`], optional): Passed to
:meth:`telegram.Bot.set_webhook`.
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.9
Accepts any :class:`collections.abc.Sequence` as input instead of just a list
drop_pending_updates (:obj:`bool`, optional): Whether to clean any pending updates on
Telegram servers before actually starting to poll. Default is :obj:`False`.
Expand Down
4 changes: 2 additions & 2 deletions telegram/ext/_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ async def start_polling(
allowed_updates (Sequence[:obj:`str`], optional): Passed to
:meth:`telegram.Bot.get_updates`.
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.9
Accepts any :class:`collections.abc.Sequence` as input instead of just a list
drop_pending_updates (:obj:`bool`, optional): Whether to clean any pending updates on
Telegram servers before actually starting to poll. Default is :obj:`False`.
Expand Down Expand Up @@ -523,7 +523,7 @@ async def start_webhook(
allowed_updates (Sequence[:obj:`str`], optional): Passed to
:meth:`telegram.Bot.set_webhook`. Defaults to :obj:`None`.
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.9
Accepts any :class:`collections.abc.Sequence` as input instead of just a list
max_connections (:obj:`int`, optional): Passed to
:meth:`telegram.Bot.set_webhook`. Defaults to ``40``.
Expand Down

0 comments on commit 2ac5201

Please sign in to comment.