Aiogram

Latest version: v3.19.0

Safety actively analyzes 720896 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 15

3.19.0

====================

Features
--------

- Added TypedDict definitions for middleware context data to the dispatcher dependency injection docs.

So, now you can use :class:`aiogram.dispatcher.middleware.data.MiddlewareData` directly or
extend it with your own data in the middlewares.
`1637 <https://github.com/aiogram/aiogram/issues/1637>`_
- Added new method :func:`aiogram.utils.deep_linking.create_startapp_link` to deep-linking module
for creating "startapp" deep links.
See also https://core.telegram.org/api/links#main-mini-app-links and https://core.telegram.org/api/links#direct-mini-app-links
`1648 <https://github.com/aiogram/aiogram/issues/1648>`_, `#1651 <https://github.com/aiogram/aiogram/issues/1651>`_


Bugfixes
--------

- Fixed handling of default empty string ("") in CallbackData filter
`1493 <https://github.com/aiogram/aiogram/issues/1493>`_
- Resolved incorrect ordering of registered handlers in the :class:`aiogram.fsm.scene.Scene`
object caused by :code:`inspect.getmembers` returning sorted members.
Handlers are now registered in the order of their definition within the class,
ensuring proper execution sequence, especially when handling filters with different
levels of specificity.

For backward compatibility, the old behavior can be restored by setting the
:code:`attrs_resolver=inspect_members_resolver` parameter in the :class:`aiogram.fsm.scene.Scene`:

.. code-block:: python

from aiogram.utils.class_attrs_resolver import inspect_members_resolver


class MyScene(Scene, attrs_resolver=inspect_members_resolver):

In this case, the handlers will be registered in the order returned by :code:`inspect.getmembers`.

By default, the :code:`attrs_resolver` parameter is set to :code:`get_sorted_mro_attrs_resolver` now,
so you **don't need** to specify it explicitly.
`1641 <https://github.com/aiogram/aiogram/issues/1641>`_


Improved Documentation
----------------------

- Updated πŸ‡ΊπŸ‡¦Ukrainian docs translation
`1650 <https://github.com/aiogram/aiogram/issues/1650>`_


Misc
----

- Introduce Union types for streamlined type handling.

Implemented Union types across various modules to consolidate and simplify type annotations.
This change replaces repetitive union declarations with reusable Union aliases,
improving code readability and maintainability.
`1592 <https://github.com/aiogram/aiogram/issues/1592>`_

3.18.0

====================

Features
--------

- Added full support for the `Bot API 8.3 <https://core.telegram.org/bots/api-changelog#february-12-2025>`_:

- Added the parameter :code:`chat_id` to the method :class:`aiogram.methods.send_gift.SendGift`, allowing bots to send gifts to channel chats.
- Added the field :code:`can_send_gift` to the class :class:`aiogram.types.chat_full_info.ChatFullInfo`.
- Added the class :class:`aiogram.types.transaction_partner_chat.TransactionPartnerChat` describing transactions with chats.
- Added the fields :code:`cover` and :code:`start_timestamp` to the class :class:`aiogram.types.video.Video`, containing a message-specific cover and a start timestamp for the video.
- Added the parameters :code:`cover` and :code:`start_timestamp` to the method :class:`aiogram.methods.send_video.SendVideo`, allowing bots to specify a cover and a start timestamp for the videos they send.
- Added the fields :code:`cover` and :code:`start_timestamp` to the classes :class:`aiogram.types.input_media_video.InputMediaVideo` and :class:`aiogram.types.input_paid_media_video.InputPaidMediaVideo`, allowing bots to edit video covers and start timestamps, and specify them for videos in albums and paid media.
- Added the parameter :code:`video_start_timestamp` to the methods :class:`aiogram.methods.forward_message.ForwardMessage` and :class:`aiogram.methods.copy_message.CopyMessage`, allowing bots to change the start timestamp for forwarded and copied videos.
- Allowed adding reactions to most types of service messages.
`1638 <https://github.com/aiogram/aiogram/issues/1638>`_


Bugfixes
--------

- Fixed endless loop while adding buttons to the :code:`KeyboardBuilder`.
`1595 <https://github.com/aiogram/aiogram/issues/1595>`_
- Change the :code:`Downloadable` protocol to be non-writable to shut up type checking that checks code that uses the :code:`bot.download(...)` method
`1628 <https://github.com/aiogram/aiogram/issues/1628>`_
- Fix the regex pattern that finds the "bad characters" for deeplink payload.
`1630 <https://github.com/aiogram/aiogram/issues/1630>`_


Improved Documentation
----------------------

- Update :code:`data: Dict[Any, str]` to :code:`data: Dict[str, Any]`
`1634 <https://github.com/aiogram/aiogram/issues/1634>`_
- Fix small typo in the Scenes documentation
`1640 <https://github.com/aiogram/aiogram/issues/1640>`_

Misc
----

- Removed redundant :code:`Path` to :code:`str` convertion on file download.
`1612 <https://github.com/aiogram/aiogram/issues/1612>`_
- Increased max :code:`redis` version support from β€œ<5.1.0” to β€œ<5.3.0”
`1631 <https://github.com/aiogram/aiogram/issues/1631>`_

3.17.0

====================

Features
--------

- Added full support of the `Bot API 8.2 <https://core.telegram.org/bots/api-changelog#january-1-2025>`_

- Added the methods :class:`aiogram.methods.verify_user.VerifyUser`, :class:`aiogram.methods.verify_chat.VerifyChat`, :class:`aiogram.methods.remove_user_verification.RemoveUserVerification` and :class:`aiogram.methods.remove_chat_verification.RemoveChatVerification`, allowing bots to manage verifications on behalf of an organization.
- Added the field :code:`upgrade_star_count` to the class :class:`aiogram.types.gift.Gift`.
- Added the parameter :code:`pay_for_upgrade` to the method :class:`aiogram.methods.send_gift.SendGift`.
- Removed the field :code:`hide_url` from the class :class:`aiogram.types.inline_query_result_article.InlineQueryResultArticle`. Pass an empty string as :code:`url` instead.
`1623 <https://github.com/aiogram/aiogram/issues/1623>`_

3.16.0

====================

Features
--------

- Added full support of `Bot API 8.1 <https://core.telegram.org/bots/api-changelog#december-4-2024>`_:

- Added the field :code:`nanostar_amount` to the class :class:`aiogram.types.star_transaction.StarTransaction`.
- Added the class :class:`aiogram.types.transaction_partner_affiliate_program.TransactionPartnerAffiliateProgram` for transactions pertaining to incoming affiliate commissions.
- Added the class :class:`aiogram.types.affiliate_info.AffiliateInfo` and the field :code:`affiliate` to the class :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`, allowing bots to identify the relevant affiliate in transactions with an affiliate commission.
`1617 <https://github.com/aiogram/aiogram/issues/1617>`_


Bugfixes
--------

- Corrected the exception text of `aiogram.methods.base.TelegramMethod.__await__` method.
`1616 <https://github.com/aiogram/aiogram/issues/1616>`_


Misc
----

- Increased max :code:`pydantic` version support from β€œ<2.10” to β€œ<2.11”
`1607 <https://github.com/aiogram/aiogram/issues/1607>`_
- Fixed closing tag for :code:`tg-emoji` in the :class:`aiogram.utils.text_decoration.HtmlDecoration`: use the same constant as for tag opening
`1608 <https://github.com/aiogram/aiogram/issues/1608>`_
- Increased max :code:`aiohttp` version support from β€œ<3.11” to β€œ<3.12”
`1615 <https://github.com/aiogram/aiogram/issues/1615>`_

3.15.0

====================

Features
--------

- Added full support for `Bot API 8.0 <https://core.telegram.org/bots/api-changelog#november-17-2024>`_

- Added the parameter :code:`subscription_period` to the method
:class:`aiogram.methods.create_invoice_link.CreateInvoiceLink`
to support the creation of links that are billed periodically.
- Added the parameter :code:`business_connection_id` to the method
:class:`aiogram.methods.create_invoice_link.CreateInvoiceLink`
to support the creation of invoice links on behalf of business accounts.
- Added the fields :code:`subscription_expiration_date`,
:code:`is_recurring` and :code:`is_first_recurring` to the class
:class:`aiogram.types.successful_payment.SuccessfulPayment`.
- Added the method :class:`aiogram.methods.edit_user_star_subscription.EditUserStarSubscription`.
- Added the field :code:`subscription_period` to the class
:class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`.
- Added the method :class:`aiogram.methods.set_user_emoji_status.SetUserEmojiStatus`.
The user must allow the bot to manage their emoji status.
- Added the class :class:`aiogram.types.prepared_inline_message.PreparedInlineMessage`
and the method :class:`aiogram.methods.save_prepared_inline_message.SavePreparedInlineMessage`,
allowing bots to suggest users send a specific message from a Mini App via the method
:class:`aiogram.methods.share_message.ShareMessage`.
- Added the classes :class:`aiogram.types.gift.Gift` and :class:`aiogram.types.gifts.Gifts`
and the method :class:`aiogram.methods.get_available_gifts.GetAvailableGifts`,
allowing bots to get all gifts available for sending.
- Added the field :code:`gift` to the class
:class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`.
`1606 <https://github.com/aiogram/aiogram/issues/1606>`_

3.14.0

====================

Misc
----

- Checked compatibility with Python 3.13 (added to the CI/CD processes),
so now aiogram is totally compatible with it.

Dropped compatibility with Python 3.8 due to this version being `EOL <https://devguide.python.org/versions/>`_.

.. warning::

In some cases you will need to have the installed compiler (Rust or C++)
to install some of the dependencies to compile packages from source on `pip install` command.

- If you are using Windows, you will need to have the `Visual Studio <https://visualstudio.microsoft.com/visual-cpp-build-tools/>`_ installed.
- If you are using Linux, you will need to have the `build-essential` package installed.
- If you are using macOS, you will need to have the `Xcode <https://developer.apple.com/xcode/>`_ installed.

When developers of this dependencies will release new versions with precompiled wheels for Windows, Linux and macOS,
this action will not be necessary anymore until the next version of the Python interpreter.
`1589 <https://github.com/aiogram/aiogram/issues/1589>`_
- Added business_connection_id to the :class:`aiogram.types.message.Message` API methods shortcuts.

Integrated the :code:`business_connection_id` attribute into various message manipulation methods,
ensuring consistent data handling. This update eliminates the need to pass the
:code:`business_connection_id` as a parameter,
instead directly accessing it from the instance attributes.
`1586 <https://github.com/aiogram/aiogram/issues/1586>`_

Features
--------

- Add function ``get_value`` to all built-in storage implementations, ``FSMContext`` and ``SceneWizard``
`1431 <https://github.com/aiogram/aiogram/issues/1431>`_
- Enhanced the inheritance of handlers and actions in :ref:`Scenes <Scenes>`.
Refactored to eliminate the copying of previously connected handlers and actions from parent scenes.
Now, handlers are dynamically rebuilt based on the current class, properly utilizing class inheritance and enabling handler overrides.

That's mean that you can now override handlers and actions in the child scene, instead of copying and duplicating them.
`1583 <https://github.com/aiogram/aiogram/issues/1583>`_
- Added full support of `Bot API 7.11 <https://core.telegram.org/bots/api-changelog#october-31-2024>`_

- Added the class :class:`aiogram.types.copy_text_button.CopyTextButton`
and the field :code:`copy_text` in the class
:class:`aiogram.types.inline_keyboard_button.InlineKeyboardButton`,
allowing bots to send and receive inline buttons that copy arbitrary text.
- Added the parameter :code:`allow_paid_broadcast` to the methods
:class:`aiogram.methods.send_message.SendMessage`,
:class:`aiogram.methods.send_photo.SendPhoto`,
:class:`aiogram.methods.send_video.SendVideo`,
:class:`aiogram.methods.send_animation.SendAnimation`,
:class:`aiogram.methods.send_audio.SendAudio`,
:class:`aiogram.methods.send_document.SendDocument`,
:class:`aiogram.methods.send_paid_media.SendPaidMedia`,
:class:`aiogram.methods.send_sticker.SendSticker`,
:class:`aiogram.methods.send_video_note.SendVideoNote`,
:class:`aiogram.methods.send_voice.SendVoice`,
:class:`aiogram.methods.send_location.SendLocation`,
:class:`aiogram.methods.send_venue.SendVenue`,
:class:`aiogram.methods.send_contact.SendContact`,
:class:`aiogram.methods.send_poll.SendPoll`,
:class:`aiogram.methods.send_dice.SendDice`,
:class:`aiogram.methods.send_invoice.SendInvoice`,
:class:`aiogram.methods.send_game.SendGame`,
:class:`aiogram.methods.send_media_group.SendMediaGroup`
and :class:`aiogram.methods.copy_message.CopyMessage`.
- Added the class
:class:`aiogram.types.transaction_partner_telegram_api.TransactionPartnerTelegramApi`
for transactions related to paid broadcasted messages.
- Introduced the ability to add media to existing text messages using the method
:class:`aiogram.methods.edit_message_media.EditMessageMedia`.
- Added support for hashtag and cashtag entities with a specified chat username
that opens a search for the relevant tag within the specified chat.
`1601 <https://github.com/aiogram/aiogram/issues/1601>`_


Bugfixes
--------

- Fix PytestDeprecationWarning thrown by pytest-asyncio when running the tests
`1584 <https://github.com/aiogram/aiogram/issues/1584>`_
- Fixed customized serialization in the :class:`aiogram.filters.callback_data.CallbackData` factory.

From now UUID will have 32 bytes length instead of 36 bytes (with no `-` separators) in the callback data representation.
`1602 <https://github.com/aiogram/aiogram/issues/1602>`_


Improved Documentation
----------------------

- Add missing closing tag for bold.
`1599 <https://github.com/aiogram/aiogram/issues/1599>`_

Page 1 of 15

Β© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.