mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-06 07:50:32 +00:00
Update changelog
This commit is contained in:
parent
50f84ad44c
commit
20d36a2ab8
8 changed files with 173 additions and 143 deletions
173
CHANGES.rst
173
CHANGES.rst
|
|
@ -16,6 +16,179 @@ Changelog
|
|||
|
||||
.. towncrier release notes start
|
||||
|
||||
3.20.0 (2025-04-14)
|
||||
====================
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
- Add different shortcut methods for ``aiogram.utils.formatting.Text.as_kwargs()``
|
||||
`#1657 <https://github.com/aiogram/aiogram/issues/1657>`_
|
||||
- Added full support for the `Bot API 9.0 <https://core.telegram.org/bots/api-changelog#april-11-2025>`_:
|
||||
|
||||
**Business Accounts**
|
||||
|
||||
- Added the class :class:`aiogram.types.business_bot_rights.BusinessBotRights` and replaced
|
||||
the field :code:`can_reply` with the field :code:`rights` of the type
|
||||
:class:`aiogram.types.business_bot_rights.BusinessBotRights` in the class
|
||||
:class:`aiogram.types.business_connection.BusinessConnection`.
|
||||
- Added the method :class:`aiogram.methods.read_business_message.ReadBusinessMessage`,
|
||||
allowing bots to mark incoming messages as read on behalf of a business account.
|
||||
- Added the method :class:`aiogram.methods.delete_business_messages.DeleteBusinessMessages`,
|
||||
allowing bots to delete messages on behalf of a business account.
|
||||
- Added the method :class:`aiogram.methods.set_business_account_name.SetBusinessAccountName`,
|
||||
allowing bots to change the first and last name of a managed business account.
|
||||
- Added the method :class:`aiogram.methods.set_business_account_username.SetBusinessAccountUsername`,
|
||||
allowing bots to change the username of a managed business account.
|
||||
- Added the method :class:`aiogram.methods.set_business_account_bio.SetBusinessAccountBio`,
|
||||
allowing bots to change the bio of a managed business account.
|
||||
- Added the class :class:`aiogram.types.input_profile_photo.InputProfilePhoto`,
|
||||
describing a profile photo to be set.
|
||||
- Added the methods :class:`aiogram.methods.set_business_account_profile_photo.SetBusinessAccountProfilePhoto`
|
||||
and :class:`aiogram.methods.remove_business_account_profile_photo.RemoveBusinessAccountProfilePhoto`,
|
||||
allowing bots to change the profile photo of a managed business account.
|
||||
- Added the method :class:`aiogram.methods.set_business_account_gift_settings.SetBusinessAccountGiftSettings`,
|
||||
allowing bots to change the privacy settings pertaining to incoming gifts in a managed business account.
|
||||
- Added the class :class:`aiogram.types.star_amount.StarAmount` and the method
|
||||
:class:`aiogram.methods.get_business_account_star_balance.GetBusinessAccountStarBalance`,
|
||||
allowing bots to check the current Telegram Star balance of a managed business account.
|
||||
- Added the method :class:`aiogram.methods.transfer_business_account_stars.TransferBusinessAccountStars`,
|
||||
allowing bots to transfer Telegram Stars from the balance of a managed business account to their own balance
|
||||
for withdrawal.
|
||||
- Added the classes :class:`aiogram.types.owned_gift_regular.OwnedGiftRegular`,
|
||||
:class:`aiogram.types.owned_gift_unique.OwnedGiftUnique`, :class:`aiogram.types.owned_gifts.OwnedGifts`
|
||||
and the method :class:`aiogram.methods.get_business_account_gifts.GetBusinessAccountGifts`,
|
||||
allowing bots to fetch the list of gifts owned by a managed business account.
|
||||
- Added the method :class:`aiogram.methods.convert_gift_to_stars.ConvertGiftToStars`,
|
||||
allowing bots to convert gifts received by a managed business account to Telegram Stars.
|
||||
- Added the method :class:`aiogram.methods.upgrade_gift.UpgradeGift`,
|
||||
allowing bots to upgrade regular gifts received by a managed business account to unique gifts.
|
||||
- Added the method :class:`aiogram.methods.transfer_gift.TransferGift`,
|
||||
allowing bots to transfer unique gifts owned by a managed business account.
|
||||
- Added the classes :class:`aiogram.types.input_story_content_photo.InputStoryContentPhoto`
|
||||
and :class:`aiogram.types.input_story_content_video.InputStoryContentVideo`
|
||||
representing the content of a story to post.
|
||||
- Added the classes :class:`aiogram.types.story_area.StoryArea`,
|
||||
:class:`aiogram.types.story_area_position.StoryAreaPosition`,
|
||||
:class:`aiogram.types.location_address.LocationAddress`,
|
||||
:class:`aiogram.types.story_area_type_location.StoryAreaTypeLocation`,
|
||||
:class:`aiogram.types.story_area_type_suggested_reaction.StoryAreaTypeSuggestedReaction`,
|
||||
:class:`aiogram.types.story_area_type_link.StoryAreaTypeLink`,
|
||||
:class:`aiogram.types.story_area_type_weather.StoryAreaTypeWeather`
|
||||
and :class:`aiogram.types.story_area_type_unique_gift.StoryAreaTypeUniqueGift`,
|
||||
describing clickable active areas on stories.
|
||||
- Added the methods :class:`aiogram.methods.post_story.PostStory`,
|
||||
:class:`aiogram.methods.edit_story.EditStory`
|
||||
and :class:`aiogram.methods.delete_story.DeleteStory`,
|
||||
allowing bots to post, edit and delete stories on behalf of a managed business account.
|
||||
|
||||
**Mini Apps**
|
||||
|
||||
- Added the field :code:`DeviceStorage`, allowing Mini Apps to use persistent
|
||||
local storage on the user's device.
|
||||
- Added the field :code:`SecureStorage`, allowing Mini Apps to use a secure local
|
||||
storage on the user's device for sensitive data.
|
||||
|
||||
**Gifts**
|
||||
|
||||
- Added the classes :class:`aiogram.types.unique_gift_model.UniqueGiftModel`,
|
||||
:class:`aiogram.types.unique_gift_symbol.UniqueGiftSymbol`,
|
||||
:class:`aiogram.types.unique_gift_backdrop_colors.UniqueGiftBackdropColors`,
|
||||
and :class:`aiogram.types.unique_gift_backdrop.UniqueGiftBackdrop`
|
||||
to describe the properties of a unique gift.
|
||||
- Added the class :class:`aiogram.types.unique_gift.UniqueGift` describing
|
||||
a gift that was upgraded to a unique one.
|
||||
- Added the class :class:`aiogram.types.accepted_gift_types.AcceptedGiftTypes`
|
||||
describing the types of gifts that are accepted by a user or a chat.
|
||||
- Replaced the field :code:`can_send_gift` with the field :code:`accepted_gift_types`
|
||||
of the type :class:`aiogram.types.accepted_gift_types.AcceptedGiftTypes`
|
||||
in the class :class:`aiogram.types.chat_full_info.ChatFullInfo`.
|
||||
- Added the class :class:`aiogram.types.gift_info.GiftInfo` and the field :code:`gift`
|
||||
to the class :class:`aiogram.types.message.Message`,
|
||||
describing a service message about a regular gift that was sent or received.
|
||||
- Added the class :class:`aiogram.types.unique_gift_info.UniqueGiftInfo`
|
||||
and the field :code:`unique_gift` to the class :class:`aiogram.types.message.Message`,
|
||||
describing a service message about a unique gift that was sent or received.
|
||||
|
||||
**Telegram Premium**
|
||||
|
||||
- Added the method :class:`aiogram.methods.gift_premium_subscription.GiftPremiumSubscription`,
|
||||
allowing bots to gift a user a Telegram Premium subscription paid in Telegram Stars.
|
||||
- Added the field :code:`premium_subscription_duration` to the class
|
||||
:class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`
|
||||
for transactions involving a Telegram Premium subscription purchased by the bot.
|
||||
- Added the field :code:`transaction_type` to the class
|
||||
:class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`,
|
||||
simplifying the differentiation and processing of all transaction types.
|
||||
|
||||
**General**
|
||||
|
||||
- Increased the maximum price for paid media to 10000 Telegram Stars.
|
||||
- Increased the maximum price for a subscription period to 10000 Telegram Stars.
|
||||
- Added the class :class:`aiogram.types.paid_message_price_changed.PaidMessagePriceChanged`
|
||||
and the field :code:`paid_message_price_changed` to the class
|
||||
:class:`aiogram.types.message.Message`, describing a service message about a price change
|
||||
for paid messages sent to the chat.
|
||||
- Added the field :code:`paid_star_count` to the class :class:`aiogram.types.message.Message`,
|
||||
containing the number of Telegram Stars that were paid to send the message.
|
||||
`#1671 <https://github.com/aiogram/aiogram/issues/1671>`_
|
||||
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Fix memory exhaustion in polling mode with concurrent updates.
|
||||
|
||||
Added a semaphore-based solution to limit the number of concurrent tasks when using :code:`handle_as_tasks=True` in polling mode.
|
||||
This prevents Out of Memory (OOM) errors in memory-limited containers when there's a large queue of updates to process.
|
||||
You can now control the maximum number of concurrent updates with the new :code:`tasks_concurrency_limit`
|
||||
parameter in :code:`start_polling()` and :code:`run_polling()` methods.
|
||||
`#1658 <https://github.com/aiogram/aiogram/issues/1658>`_
|
||||
- Fix empty response into webhook.
|
||||
|
||||
We need to return something “empty”, and “empty” form doesn’t work since
|
||||
it’s sending only “end” boundary w/o “start”.
|
||||
|
||||
An empty formdata should look smth like this for Telegram to understand:
|
||||
|
||||
::
|
||||
|
||||
--webhookBoundaryvsF_aMHhspPjfOq7O0JNRg
|
||||
--webhookBoundaryvsF_aMHhspPjfOq7O0JNRg--
|
||||
|
||||
But aiohttp sends only the ending boundary:
|
||||
|
||||
::
|
||||
|
||||
--webhookBoundaryvsF_aMHhspPjfOq7O0JNRg--
|
||||
|
||||
Such response doesn't suit Telegram servers.
|
||||
|
||||
The fix replaces empty response with empty JSON response:
|
||||
|
||||
::
|
||||
|
||||
{}
|
||||
`#1664 <https://github.com/aiogram/aiogram/issues/1664>`_
|
||||
|
||||
|
||||
Improved Documentation
|
||||
----------------------
|
||||
|
||||
- Fixed broken code block formatting in ``router.rst`` caused by incorrect indentation of directive options.
|
||||
`#1666 <https://github.com/aiogram/aiogram/issues/1666>`_
|
||||
|
||||
|
||||
Misc
|
||||
----
|
||||
|
||||
- Bump pydantic upper bound from <2.11 to <2.12.
|
||||
Upgrading `pydantic` to version 2.11 significantly reduces resource consumption, more details on the `pydantic blog post <https://pydantic.dev/articles/pydantic-v2-11-release>`_
|
||||
`#1659 <https://github.com/aiogram/aiogram/issues/1659>`_
|
||||
- Replaced ```loop.run_in_executor``` with ```asyncio.to_thread``` for improved readability and consistency.
|
||||
`#1661 <https://github.com/aiogram/aiogram/issues/1661>`_
|
||||
|
||||
|
||||
3.19.0 (2025-03-19)
|
||||
====================
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
Add different shortcut methods for ``aiogram.utils.formatting.Text.as_kwargs()``
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
Fix memory exhaustion in polling mode with concurrent updates.
|
||||
|
||||
Added a semaphore-based solution to limit the number of concurrent tasks when using :code:`handle_as_tasks=True` in polling mode.
|
||||
This prevents Out of Memory (OOM) errors in memory-limited containers when there's a large queue of updates to process.
|
||||
You can now control the maximum number of concurrent updates with the new :code:`tasks_concurrency_limit`
|
||||
parameter in :code:`start_polling()` and :code:`run_polling()` methods.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Bump pydantic upper bound from <2.11 to <2.12.
|
||||
Upgrading `pydantic` to version 2.11 significantly reduces resource consumption, more details on the `pydantic blog post <https://pydantic.dev/articles/pydantic-v2-11-release>`_
|
||||
|
|
@ -1 +0,0 @@
|
|||
Replaced ```loop.run_in_executor``` with ```asyncio.to_thread``` for improved readability and consistency.
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
Fix empty response into webhook.
|
||||
|
||||
We need to return something “empty”, and “empty” form doesn’t work since
|
||||
it’s sending only “end” boundary w/o “start”.
|
||||
|
||||
An empty formdata should look smth like this for Telegram to understand:
|
||||
|
||||
::
|
||||
|
||||
--webhookBoundaryvsF_aMHhspPjfOq7O0JNRg
|
||||
--webhookBoundaryvsF_aMHhspPjfOq7O0JNRg--
|
||||
|
||||
But aiohttp sends only the ending boundary:
|
||||
|
||||
::
|
||||
|
||||
--webhookBoundaryvsF_aMHhspPjfOq7O0JNRg--
|
||||
|
||||
Such response doesn't suit Telegram servers.
|
||||
|
||||
The fix replaces empty response with empty JSON response:
|
||||
|
||||
::
|
||||
|
||||
{}
|
||||
|
|
@ -1 +0,0 @@
|
|||
Fixed broken code block formatting in ``router.rst`` caused by incorrect indentation of directive options.
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
Added full support for the `Bot API 9.0 <https://core.telegram.org/bots/api-changelog#april-11-2025>`_:
|
||||
|
||||
**Business Accounts**
|
||||
|
||||
- Added the class :class:`aiogram.types.business_bot_rights.BusinessBotRights` and replaced
|
||||
the field :code:`can_reply` with the field :code:`rights` of the type
|
||||
:class:`aiogram.types.business_bot_rights.BusinessBotRights` in the class
|
||||
:class:`aiogram.types.business_connection.BusinessConnection`.
|
||||
- Added the method :class:`aiogram.methods.read_business_message.ReadBusinessMessage`,
|
||||
allowing bots to mark incoming messages as read on behalf of a business account.
|
||||
- Added the method :class:`aiogram.methods.delete_business_messages.DeleteBusinessMessages`,
|
||||
allowing bots to delete messages on behalf of a business account.
|
||||
- Added the method :class:`aiogram.methods.set_business_account_name.SetBusinessAccountName`,
|
||||
allowing bots to change the first and last name of a managed business account.
|
||||
- Added the method :class:`aiogram.methods.set_business_account_username.SetBusinessAccountUsername`,
|
||||
allowing bots to change the username of a managed business account.
|
||||
- Added the method :class:`aiogram.methods.set_business_account_bio.SetBusinessAccountBio`,
|
||||
allowing bots to change the bio of a managed business account.
|
||||
- Added the class :class:`aiogram.types.input_profile_photo.InputProfilePhoto`,
|
||||
describing a profile photo to be set.
|
||||
- Added the methods :class:`aiogram.methods.set_business_account_profile_photo.SetBusinessAccountProfilePhoto`
|
||||
and :class:`aiogram.methods.remove_business_account_profile_photo.RemoveBusinessAccountProfilePhoto`,
|
||||
allowing bots to change the profile photo of a managed business account.
|
||||
- Added the method :class:`aiogram.methods.set_business_account_gift_settings.SetBusinessAccountGiftSettings`,
|
||||
allowing bots to change the privacy settings pertaining to incoming gifts in a managed business account.
|
||||
- Added the class :class:`aiogram.types.star_amount.StarAmount` and the method
|
||||
:class:`aiogram.methods.get_business_account_star_balance.GetBusinessAccountStarBalance`,
|
||||
allowing bots to check the current Telegram Star balance of a managed business account.
|
||||
- Added the method :class:`aiogram.methods.transfer_business_account_stars.TransferBusinessAccountStars`,
|
||||
allowing bots to transfer Telegram Stars from the balance of a managed business account to their own balance
|
||||
for withdrawal.
|
||||
- Added the classes :class:`aiogram.types.owned_gift_regular.OwnedGiftRegular`,
|
||||
:class:`aiogram.types.owned_gift_unique.OwnedGiftUnique`, :class:`aiogram.types.owned_gifts.OwnedGifts`
|
||||
and the method :class:`aiogram.methods.get_business_account_gifts.GetBusinessAccountGifts`,
|
||||
allowing bots to fetch the list of gifts owned by a managed business account.
|
||||
- Added the method :class:`aiogram.methods.convert_gift_to_stars.ConvertGiftToStars`,
|
||||
allowing bots to convert gifts received by a managed business account to Telegram Stars.
|
||||
- Added the method :class:`aiogram.methods.upgrade_gift.UpgradeGift`,
|
||||
allowing bots to upgrade regular gifts received by a managed business account to unique gifts.
|
||||
- Added the method :class:`aiogram.methods.transfer_gift.TransferGift`,
|
||||
allowing bots to transfer unique gifts owned by a managed business account.
|
||||
- Added the classes :class:`aiogram.types.input_story_content_photo.InputStoryContentPhoto`
|
||||
and :class:`aiogram.types.input_story_content_video.InputStoryContentVideo`
|
||||
representing the content of a story to post.
|
||||
- Added the classes :class:`aiogram.types.story_area.StoryArea`,
|
||||
:class:`aiogram.types.story_area_position.StoryAreaPosition`,
|
||||
:class:`aiogram.types.location_address.LocationAddress`,
|
||||
:class:`aiogram.types.story_area_type_location.StoryAreaTypeLocation`,
|
||||
:class:`aiogram.types.story_area_type_suggested_reaction.StoryAreaTypeSuggestedReaction`,
|
||||
:class:`aiogram.types.story_area_type_link.StoryAreaTypeLink`,
|
||||
:class:`aiogram.types.story_area_type_weather.StoryAreaTypeWeather`
|
||||
and :class:`aiogram.types.story_area_type_unique_gift.StoryAreaTypeUniqueGift`,
|
||||
describing clickable active areas on stories.
|
||||
- Added the methods :class:`aiogram.methods.post_story.PostStory`,
|
||||
:class:`aiogram.methods.edit_story.EditStory`
|
||||
and :class:`aiogram.methods.delete_story.DeleteStory`,
|
||||
allowing bots to post, edit and delete stories on behalf of a managed business account.
|
||||
|
||||
**Mini Apps**
|
||||
|
||||
- Added the field :code:`DeviceStorage`, allowing Mini Apps to use persistent
|
||||
local storage on the user's device.
|
||||
- Added the field :code:`SecureStorage`, allowing Mini Apps to use a secure local
|
||||
storage on the user's device for sensitive data.
|
||||
|
||||
**Gifts**
|
||||
|
||||
- Added the classes :class:`aiogram.types.unique_gift_model.UniqueGiftModel`,
|
||||
:class:`aiogram.types.unique_gift_symbol.UniqueGiftSymbol`,
|
||||
:class:`aiogram.types.unique_gift_backdrop_colors.UniqueGiftBackdropColors`,
|
||||
and :class:`aiogram.types.unique_gift_backdrop.UniqueGiftBackdrop`
|
||||
to describe the properties of a unique gift.
|
||||
- Added the class :class:`aiogram.types.unique_gift.UniqueGift` describing
|
||||
a gift that was upgraded to a unique one.
|
||||
- Added the class :class:`aiogram.types.accepted_gift_types.AcceptedGiftTypes`
|
||||
describing the types of gifts that are accepted by a user or a chat.
|
||||
- Replaced the field :code:`can_send_gift` with the field :code:`accepted_gift_types`
|
||||
of the type :class:`aiogram.types.accepted_gift_types.AcceptedGiftTypes`
|
||||
in the class :class:`aiogram.types.chat_full_info.ChatFullInfo`.
|
||||
- Added the class :class:`aiogram.types.gift_info.GiftInfo` and the field :code:`gift`
|
||||
to the class :class:`aiogram.types.message.Message`,
|
||||
describing a service message about a regular gift that was sent or received.
|
||||
- Added the class :class:`aiogram.types.unique_gift_info.UniqueGiftInfo`
|
||||
and the field :code:`unique_gift` to the class :class:`aiogram.types.message.Message`,
|
||||
describing a service message about a unique gift that was sent or received.
|
||||
|
||||
**Telegram Premium**
|
||||
|
||||
- Added the method :class:`aiogram.methods.gift_premium_subscription.GiftPremiumSubscription`,
|
||||
allowing bots to gift a user a Telegram Premium subscription paid in Telegram Stars.
|
||||
- Added the field :code:`premium_subscription_duration` to the class
|
||||
:class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`
|
||||
for transactions involving a Telegram Premium subscription purchased by the bot.
|
||||
- Added the field :code:`transaction_type` to the class
|
||||
:class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`,
|
||||
simplifying the differentiation and processing of all transaction types.
|
||||
|
||||
**General**
|
||||
|
||||
- Increased the maximum price for paid media to 10000 Telegram Stars.
|
||||
- Increased the maximum price for a subscription period to 10000 Telegram Stars.
|
||||
- Added the class :class:`aiogram.types.paid_message_price_changed.PaidMessagePriceChanged`
|
||||
and the field :code:`paid_message_price_changed` to the class
|
||||
:class:`aiogram.types.message.Message`, describing a service message about a price change
|
||||
for paid messages sent to the chat.
|
||||
- Added the field :code:`paid_star_count` to the class :class:`aiogram.types.message.Message`,
|
||||
containing the number of Telegram Stars that were paid to send the message.
|
||||
Loading…
Add table
Add a link
Reference in a new issue