From 325729b3be2048f339a638536dc308659978e4c2 Mon Sep 17 00:00:00 2001 From: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com> Date: Sat, 7 Dec 2024 13:31:33 +0100 Subject: [PATCH] Bump Version to v21.9 --- CHANGES.rst | 27 +++++++++++++++++++++++++++ telegram/_payment/stars.py | 14 +++++++------- telegram/_version.py | 2 +- telegram/constants.py | 10 +++++----- telegram/ext/_application.py | 4 ++-- telegram/ext/_updater.py | 4 ++-- 6 files changed, 44 insertions(+), 17 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 14fa2012917..9ae55984ad7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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 `_. + +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 `_) +- Allow ``Sequence`` Input for ``allowed_updates`` in ``Application`` and ``Updater`` Methods (:pr:`4589` by `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 `_) +- Bump ``srvaroa/labeler`` from 1.11.1 to 1.12.0 (:pr:`4586`) + Version 21.8 ============ *Released 2024-12-01* diff --git a/telegram/_payment/stars.py b/telegram/_payment/stars.py index f62f28822a9..7ce4cf2de86 100644 --- a/telegram/_payment/stars.py +++ b/telegram/_payment/stars.py @@ -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 @@ -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`""" @@ -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 @@ -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 @@ -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 @@ -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). @@ -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). diff --git a/telegram/_version.py b/telegram/_version.py index 3598e56db74..4b7502703ca 100644 --- a/telegram/_version.py +++ b/telegram/_version.py @@ -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__) diff --git a/telegram/constants.py b/telegram/constants.py index 8e2fbf68c7d..06fb511ada3 100644 --- a/telegram/constants.py +++ b/telegram/constants.py @@ -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__ = () @@ -2499,7 +2499,7 @@ 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` @@ -2507,7 +2507,7 @@ class StarTransactionsLimit(IntEnum): :paramref:`~telegram.AffiliateInfo.nanostar_amount` parameter of :class:`telegram.AffiliateInfo`. - .. versionadded:: NEXT.VERSION + .. versionadded:: 21.9 """ @@ -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.""" @@ -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 """ diff --git a/telegram/ext/_application.py b/telegram/ext/_application.py index fc96422f756..eab3e5f1e2d 100644 --- a/telegram/ext/_application.py +++ b/telegram/ext/_application.py @@ -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`. @@ -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`. diff --git a/telegram/ext/_updater.py b/telegram/ext/_updater.py index 31b1f7a71fb..0c9cf5150ac 100644 --- a/telegram/ext/_updater.py +++ b/telegram/ext/_updater.py @@ -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`. @@ -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``.