diff --git a/CHANGES.rst b/CHANGES.rst index 394bfacd..c71d9aea 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -16,6 +16,88 @@ Changelog .. towncrier release notes start +3.21.0 (2025-07-05) +==================== + +Features +-------- + +- Refactor methods input types to calm down MyPy. #1682 + + `Dict[str, Any]` is replaced with `Mapping[str, Any]` in the following methods: + + - `FSMContext.set_data` + - `FSMContext.update_data` + - `BaseStorage.set_data` + - `BaseStorage.update_data` + - `BaseStorage's child methods` + - `SceneWizard.set_data` + - `SceneWizard.update_data` + `#1683 `_ +- Add support for `State` type in scenes methods like `goto`, `enter`, `get` + `#1685 `_ +- Added full support for the `Bot API 9.1 `_: + + **Checklists** + + - Added the class :class:`aiogram.types.checklist_task.ChecklistTask` representing a task in a checklist. + - Added the class :class:`aiogram.types.checklist.Checklist` representing a checklist. + - Added the class :class:`aiogram.types.input_checklist_task.InputChecklistTask` representing a task to add to a checklist. + - Added the class :class:`aiogram.types.input_checklist.InputChecklist` representing a checklist to create. + - Added the field :code:`checklist` to the classes :class:`aiogram.types.message.Message` and :class:`aiogram.types.external_reply_info.ExternalReplyInfo`, describing a checklist in a message. + - Added the class :class:`aiogram.types.checklist_tasks_done.ChecklistTasksDone` and the field :code:`checklist_tasks_done` to the class :class:`aiogram.types.message.Message`, describing a service message about status changes for tasks in a checklist (i.e., marked as done/not done). + - Added the class :class:`aiogram.types.checklist_tasks_added.ChecklistTasksAdded` and the field :code:`checklist_tasks_added` to the class :class:`aiogram.types.message.Message`, describing a service message about the addition of new tasks to a checklist. + - Added the method :class:`aiogram.methods.send_checklist.SendChecklist`, allowing bots to send a checklist on behalf of a business account. + - Added the method :class:`aiogram.methods.edit_message_checklist.EditMessageChecklist`, allowing bots to edit a checklist on behalf of a business account. + + **Gifts** + + - Added the field :code:`next_transfer_date` to the classes :class:`aiogram.types.owned_gift_unique.OwnedGiftUnique` and :class:`aiogram.types.unique_gift_info.UniqueGiftInfo`. + - Added the field :code:`last_resale_star_count` to the class :class:`aiogram.types.unique_gift_info.UniqueGiftInfo`. + - Added "resale" as the possible value of the field :code:`origin` in the class :class:`aiogram.types.unique_gift_info.UniqueGiftInfo`. + + **General** + + - Increased the maximum number of options in a poll to 12. + - Added the method :class:`aiogram.methods.get_my_star_balance.GetMyStarBalance`, allowing bots to get their current balance of Telegram Stars. + - Added the class :class:`aiogram.types.direct_message_price_changed.DirectMessagePriceChanged` and the field :code:`direct_message_price_changed` to the class :class:`aiogram.types.message.Message`, describing a service message about a price change for direct messages sent to the channel chat. + `#1704 `_ + + +Bugfixes +-------- + +- Fixed an issue where the scene entry handler (:code:`enter`) was not receiving data + passed to the context by middleware, which could result in a :code:`TypeError`. + + Also updated the documentation to clarify how to enter the scene. + `#1672 `_ +- Correctly pass error message in TelegramMigrateToChat. + `#1694 `_ + + +Improved Documentation +---------------------- + +- Added documentation for changing state of another user in FSM + `#1633 `_ + + +Misc +---- + +- Fixed MyPy [return-value] error in `InlineKeyboardBuilder().as_markup()`. + `as_markup` method now overloads parent class method and uses `super()`, to call parent's + `as_markup` method. + Also added correct type hint to `as_markup`'s return in `InlineKeyboardBuilder` and + `ReplyKeyboardBuilder` classes. + `#1677 `_ +- Changed Babel's pinned version from minor to major. + `#1681 `_ +- Increased max :code:`aiohttp` version support from “<3.12” to “<3.13” + `#1700 `_ + + 3.20.0 (2025-04-14) ==================== diff --git a/CHANGES/1633.doc.rst b/CHANGES/1633.doc.rst deleted file mode 100644 index c82fbab9..00000000 --- a/CHANGES/1633.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Added documentation for changing state of another user in FSM diff --git a/CHANGES/1672.bugfix.rst b/CHANGES/1672.bugfix.rst deleted file mode 100644 index f85860cb..00000000 --- a/CHANGES/1672.bugfix.rst +++ /dev/null @@ -1,4 +0,0 @@ -Fixed an issue where the scene entry handler (:code:`enter`) was not receiving data -passed to the context by middleware, which could result in a :code:`TypeError`. - -Also updated the documentation to clarify how to enter the scene. diff --git a/CHANGES/1677.misc.rst b/CHANGES/1677.misc.rst deleted file mode 100644 index ce0de8c1..00000000 --- a/CHANGES/1677.misc.rst +++ /dev/null @@ -1,5 +0,0 @@ -Fixed MyPy [return-value] error in `InlineKeyboardBuilder().as_markup()`. -`as_markup` method now overloads parent class method and uses `super()`, to call parent's -`as_markup` method. -Also added correct type hint to `as_markup`'s return in `InlineKeyboardBuilder` and -`ReplyKeyboardBuilder` classes. diff --git a/CHANGES/1681.misc.rst b/CHANGES/1681.misc.rst deleted file mode 100644 index b74f064b..00000000 --- a/CHANGES/1681.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Changed Babel's pinned version from minor to major. diff --git a/CHANGES/1683.feature.rst b/CHANGES/1683.feature.rst deleted file mode 100644 index 97a53e2e..00000000 --- a/CHANGES/1683.feature.rst +++ /dev/null @@ -1,11 +0,0 @@ -Refactor methods input types to calm down MyPy. #1682 - -`Dict[str, Any]` is replaced with `Mapping[str, Any]` in the following methods: - -- `FSMContext.set_data` -- `FSMContext.update_data` -- `BaseStorage.set_data` -- `BaseStorage.update_data` -- `BaseStorage's child methods` -- `SceneWizard.set_data` -- `SceneWizard.update_data` diff --git a/CHANGES/1685.feature.rst b/CHANGES/1685.feature.rst deleted file mode 100644 index e53cf5a4..00000000 --- a/CHANGES/1685.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Add support for `State` type in scenes methods like `goto`, `enter`, `get` diff --git a/CHANGES/1694.bugfix.rst b/CHANGES/1694.bugfix.rst deleted file mode 100644 index 62f39741..00000000 --- a/CHANGES/1694.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Correctly pass error message in TelegramMigrateToChat. diff --git a/CHANGES/1700.misc.rst b/CHANGES/1700.misc.rst deleted file mode 100644 index 31db8755..00000000 --- a/CHANGES/1700.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Increased max :code:`aiohttp` version support from “<3.12” to “<3.13” diff --git a/CHANGES/1704.feature.rst b/CHANGES/1704.feature.rst deleted file mode 100644 index e5b9e2dd..00000000 --- a/CHANGES/1704.feature.rst +++ /dev/null @@ -1,25 +0,0 @@ -Added full support for the `Bot API 9.1 `_: - -**Checklists** - -- Added the class :class:`aiogram.types.checklist_task.ChecklistTask` representing a task in a checklist. -- Added the class :class:`aiogram.types.checklist.Checklist` representing a checklist. -- Added the class :class:`aiogram.types.input_checklist_task.InputChecklistTask` representing a task to add to a checklist. -- Added the class :class:`aiogram.types.input_checklist.InputChecklist` representing a checklist to create. -- Added the field :code:`checklist` to the classes :class:`aiogram.types.message.Message` and :class:`aiogram.types.external_reply_info.ExternalReplyInfo`, describing a checklist in a message. -- Added the class :class:`aiogram.types.checklist_tasks_done.ChecklistTasksDone` and the field :code:`checklist_tasks_done` to the class :class:`aiogram.types.message.Message`, describing a service message about status changes for tasks in a checklist (i.e., marked as done/not done). -- Added the class :class:`aiogram.types.checklist_tasks_added.ChecklistTasksAdded` and the field :code:`checklist_tasks_added` to the class :class:`aiogram.types.message.Message`, describing a service message about the addition of new tasks to a checklist. -- Added the method :class:`aiogram.methods.send_checklist.SendChecklist`, allowing bots to send a checklist on behalf of a business account. -- Added the method :class:`aiogram.methods.edit_message_checklist.EditMessageChecklist`, allowing bots to edit a checklist on behalf of a business account. - -**Gifts** - -- Added the field :code:`next_transfer_date` to the classes :class:`aiogram.types.owned_gift_unique.OwnedGiftUnique` and :class:`aiogram.types.unique_gift_info.UniqueGiftInfo`. -- Added the field :code:`last_resale_star_count` to the class :class:`aiogram.types.unique_gift_info.UniqueGiftInfo`. -- Added "resale" as the possible value of the field :code:`origin` in the class :class:`aiogram.types.unique_gift_info.UniqueGiftInfo`. - -**General** - -- Increased the maximum number of options in a poll to 12. -- Added the method :class:`aiogram.methods.get_my_star_balance.GetMyStarBalance`, allowing bots to get their current balance of Telegram Stars. -- Added the class :class:`aiogram.types.direct_message_price_changed.DirectMessagePriceChanged` and the field :code:`direct_message_price_changed` to the class :class:`aiogram.types.message.Message`, describing a service message about a price change for direct messages sent to the channel chat. diff --git a/aiogram/__meta__.py b/aiogram/__meta__.py index 65d37b08..9583dd3d 100644 --- a/aiogram/__meta__.py +++ b/aiogram/__meta__.py @@ -1,2 +1,2 @@ -__version__ = "3.20.0.post0" +__version__ = "3.21.0" __api_version__ = "9.1"