From fdfdd847a01ac5636833a1e69786569126cc8a32 Mon Sep 17 00:00:00 2001 From: JRoot Junior Date: Sun, 17 Aug 2025 19:18:42 +0300 Subject: [PATCH] Bump version to 3.22.0 and update changelog --- .apiversion | 2 +- CHANGES.rst | 64 ++++++++++++++++++++++++++++++++++++++++ CHANGES/1705.misc.rst | 1 - CHANGES/1709.bugfix.rst | 1 - CHANGES/1715.feature.rst | 1 - CHANGES/1720.feature.rst | 39 ------------------------ README.rst | 2 +- aiogram/__meta__.py | 4 +-- 8 files changed, 68 insertions(+), 46 deletions(-) delete mode 100644 CHANGES/1705.misc.rst delete mode 100644 CHANGES/1709.bugfix.rst delete mode 100644 CHANGES/1715.feature.rst delete mode 100644 CHANGES/1720.feature.rst diff --git a/.apiversion b/.apiversion index 28a21864..1a2c3557 100644 --- a/.apiversion +++ b/.apiversion @@ -1 +1 @@ -9.1 +9.2 diff --git a/CHANGES.rst b/CHANGES.rst index c71d9aea..2c4edcb9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -16,6 +16,70 @@ Changelog .. towncrier release notes start +3.22.0 (2025-08-17) +==================== + +Features +-------- + +- Support validating init data using only bot id. + `#1715 `_ +- Added full support for the `Bot API 9.2 `_: + + **Direct Messages in Channels** + + - Added the field :code:`is_direct_messages` to the classes :class:`aiogram.types.chat.Chat` and :class:`aiogram.types.chat_full_info.ChatFullInfo`, indicating whether the chat is a direct messages chat. + - Added the field :code:`parent_chat` to the class :class:`aiogram.types.chat_full_info.ChatFullInfo`, describing the parent channel for direct messages chats. + - Added the class :class:`aiogram.types.direct_messages_topic.DirectMessagesTopic` representing a direct messages topic. + - Added the field :code:`direct_messages_topic` to the class :class:`aiogram.types.message.Message`, describing the direct messages topic associated with a message. + - Added the parameter :code:`direct_messages_topic_id` to multiple sending methods for directing messages to specific direct message topics. + + **Suggested Posts** + + - Added the class :class:`aiogram.types.suggested_post_parameters.SuggestedPostParameters` representing parameters for suggested posts. + - Added the parameter :code:`suggested_post_parameters` to various sending methods, allowing bots to create suggested posts for channel approval. + - Added the method :class:`aiogram.methods.approve_suggested_post.ApproveSuggestedPost`, allowing bots to approve suggested posts in direct messages chats. + - Added the method :class:`aiogram.methods.decline_suggested_post.DeclineSuggestedPost`, allowing bots to decline suggested posts in direct messages chats. + - Added the field :code:`can_manage_direct_messages` to administrator-related classes :class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` and :class:`aiogram.types.chat_member_administrator.ChatMemberAdministrator`. + - Added the class :class:`aiogram.types.suggested_post_info.SuggestedPostInfo` representing information about a suggested post. + - Added the class :class:`aiogram.types.suggested_post_price.SuggestedPostPrice` representing the price for a suggested post. + - Added service message classes for suggested post events: + + - :class:`aiogram.types.suggested_post_approved.SuggestedPostApproved` and the field :code:`suggested_post_approved` to :class:`aiogram.types.message.Message` + - :class:`aiogram.types.suggested_post_approval_failed.SuggestedPostApprovalFailed` and the field :code:`suggested_post_approval_failed` to :class:`aiogram.types.message.Message` + - :class:`aiogram.types.suggested_post_declined.SuggestedPostDeclined` and the field :code:`suggested_post_declined` to :class:`aiogram.types.message.Message` + - :class:`aiogram.types.suggested_post_paid.SuggestedPostPaid` and the field :code:`suggested_post_paid` to :class:`aiogram.types.message.Message` + - :class:`aiogram.types.suggested_post_refunded.SuggestedPostRefunded` and the field :code:`suggested_post_refunded` to :class:`aiogram.types.message.Message` + + **Enhanced Checklists** + + - Added the field :code:`checklist_task_id` to the class :class:`aiogram.types.reply_parameters.ReplyParameters`, allowing replies to specific checklist tasks. + - Added the field :code:`reply_to_checklist_task_id` to the class :class:`aiogram.types.message.Message`, indicating which checklist task a message is replying to. + + **Gifts Improvements** + + - Added the field :code:`publisher_chat` to the classes :class:`aiogram.types.gift.Gift` and :class:`aiogram.types.unique_gift.UniqueGift`, describing the chat that published the gift. + + **Additional Features** + + - Added the field :code:`is_paid_post` to the class :class:`aiogram.types.message.Message`, indicating whether a message is a paid post. + `#1720 `_ + + +Bugfixes +-------- + +- Use `hmac.compare_digest` for validating WebApp data to prevent timing attacks. + `#1709 `_ + + +Misc +---- + +- Migrated `MongoStorage` from relying on deprecated `motor` package to using new async `PyMongo`. To use mongo storage with new async `PyMongo`, you need to install the `PyMongo` package instead of `motor` and just substitute deprecated `MongoStorage` with `PyMongoStorage` class, no other action needed. + `#1705 `_ + + 3.21.0 (2025-07-05) ==================== diff --git a/CHANGES/1705.misc.rst b/CHANGES/1705.misc.rst deleted file mode 100644 index 0173044e..00000000 --- a/CHANGES/1705.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Migrated `MongoStorage` from relying on deprecated `motor` package to using new async `PyMongo`. To use mongo storage with new async `PyMongo`, you need to install the `PyMongo` package instead of `motor` and just substitute deprecated `MongoStorage` with `PyMongoStorage` class, no other action needed. diff --git a/CHANGES/1709.bugfix.rst b/CHANGES/1709.bugfix.rst deleted file mode 100644 index 7413a2df..00000000 --- a/CHANGES/1709.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Use `hmac.compare_digest` for validating WebApp data to prevent timing attacks. diff --git a/CHANGES/1715.feature.rst b/CHANGES/1715.feature.rst deleted file mode 100644 index a14da10f..00000000 --- a/CHANGES/1715.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Support validating init data using only bot id. \ No newline at end of file diff --git a/CHANGES/1720.feature.rst b/CHANGES/1720.feature.rst deleted file mode 100644 index ee63bc65..00000000 --- a/CHANGES/1720.feature.rst +++ /dev/null @@ -1,39 +0,0 @@ -Added full support for the `Bot API 9.2 `_: - -**Direct Messages in Channels** - -- Added the field :code:`is_direct_messages` to the classes :class:`aiogram.types.chat.Chat` and :class:`aiogram.types.chat_full_info.ChatFullInfo`, indicating whether the chat is a direct messages chat. -- Added the field :code:`parent_chat` to the class :class:`aiogram.types.chat_full_info.ChatFullInfo`, describing the parent channel for direct messages chats. -- Added the class :class:`aiogram.types.direct_messages_topic.DirectMessagesTopic` representing a direct messages topic. -- Added the field :code:`direct_messages_topic` to the class :class:`aiogram.types.message.Message`, describing the direct messages topic associated with a message. -- Added the parameter :code:`direct_messages_topic_id` to multiple sending methods for directing messages to specific direct message topics. - -**Suggested Posts** - -- Added the class :class:`aiogram.types.suggested_post_parameters.SuggestedPostParameters` representing parameters for suggested posts. -- Added the parameter :code:`suggested_post_parameters` to various sending methods, allowing bots to create suggested posts for channel approval. -- Added the method :class:`aiogram.methods.approve_suggested_post.ApproveSuggestedPost`, allowing bots to approve suggested posts in direct messages chats. -- Added the method :class:`aiogram.methods.decline_suggested_post.DeclineSuggestedPost`, allowing bots to decline suggested posts in direct messages chats. -- Added the field :code:`can_manage_direct_messages` to administrator-related classes :class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` and :class:`aiogram.types.chat_member_administrator.ChatMemberAdministrator`. -- Added the class :class:`aiogram.types.suggested_post_info.SuggestedPostInfo` representing information about a suggested post. -- Added the class :class:`aiogram.types.suggested_post_price.SuggestedPostPrice` representing the price for a suggested post. -- Added service message classes for suggested post events: - - - :class:`aiogram.types.suggested_post_approved.SuggestedPostApproved` and the field :code:`suggested_post_approved` to :class:`aiogram.types.message.Message` - - :class:`aiogram.types.suggested_post_approval_failed.SuggestedPostApprovalFailed` and the field :code:`suggested_post_approval_failed` to :class:`aiogram.types.message.Message` - - :class:`aiogram.types.suggested_post_declined.SuggestedPostDeclined` and the field :code:`suggested_post_declined` to :class:`aiogram.types.message.Message` - - :class:`aiogram.types.suggested_post_paid.SuggestedPostPaid` and the field :code:`suggested_post_paid` to :class:`aiogram.types.message.Message` - - :class:`aiogram.types.suggested_post_refunded.SuggestedPostRefunded` and the field :code:`suggested_post_refunded` to :class:`aiogram.types.message.Message` - -**Enhanced Checklists** - -- Added the field :code:`checklist_task_id` to the class :class:`aiogram.types.reply_parameters.ReplyParameters`, allowing replies to specific checklist tasks. -- Added the field :code:`reply_to_checklist_task_id` to the class :class:`aiogram.types.message.Message`, indicating which checklist task a message is replying to. - -**Gifts Improvements** - -- Added the field :code:`publisher_chat` to the classes :class:`aiogram.types.gift.Gift` and :class:`aiogram.types.unique_gift.UniqueGift`, describing the chat that published the gift. - -**Additional Features** - -- Added the field :code:`is_paid_post` to the class :class:`aiogram.types.message.Message`, indicating whether a message is a paid post. diff --git a/README.rst b/README.rst index 6f01d92d..7e55cfc4 100644 --- a/README.rst +++ b/README.rst @@ -52,7 +52,7 @@ Features - Asynchronous (`asyncio docs `_, :pep:`492`) - Has type hints (:pep:`484`) and can be used with `mypy `_ - Supports `PyPy `_ -- Supports `Telegram Bot API 9.1 `_ and gets fast updates to the latest versions of the Bot API +- Supports `Telegram Bot API 9.2 `_ and gets fast updates to the latest versions of the Bot API - Telegram Bot API integration code was `autogenerated `_ and can be easily re-generated when API gets updated - Updates router (Blueprints) - Has Finite State Machine diff --git a/aiogram/__meta__.py b/aiogram/__meta__.py index 9583dd3d..876a79dd 100644 --- a/aiogram/__meta__.py +++ b/aiogram/__meta__.py @@ -1,2 +1,2 @@ -__version__ = "3.21.0" -__api_version__ = "9.1" +__version__ = "3.22.0" +__api_version__ = "9.2"