Aiogram

Latest version: v3.8.0

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

Scan your dependencies

Page 1 of 13

3.8.0

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

Features
--------

- Added utility to safely deserialize any Telegram object or method to a JSON-compatible object (dict).
(:ref:`>> Read more <serialization-tool>`)
`1450 <https://github.com/aiogram/aiogram/issues/1450>`_
- Added full support of `Bot API 7.5 <https://core.telegram.org/bots/api-changelog#june-18-2024>`_

- Added the classes :class:`aiogram.types.star_transactions.StarTransactions`,
:class:`aiogram.types.star_transaction.StarTransaction`,
:class:`aiogram.types.transaction_partner.TransactionPartner`
and :class:`aiogram.types.revenue_withdrawal_state.RevenueWithdrawalState`,
containing information about Telegram Star transactions involving the bot.
- Added the method :class:`aiogram.methods.get_star_transactions.GetStarTransactions`
that can be used to get the list of all Telegram Star transactions for the bot.
- Added support for callback buttons in
:class:`aiogram.types.inline_keyboard_markup.InlineKeyboardMarkup`
for messages sent on behalf of a business account.
- Added support for callback queries originating from a message sent
on behalf of a business account.
- Added the parameter :code:`business_connection_id` to the methods
:class:`aiogram.methods.edit_message_text.EditMessageText`,
:class:`aiogram.methods.edit_message_media.EditMessageMedia`,
:class:`aiogram.methods.edit_message_caption.EditMessageCaption`,
:class:`aiogram.methods.edit_message_live_location.EditMessageLiveLocation`,
:class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation`
and :class:`aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup`,
allowing the bot to edit business messages.
- Added the parameter :code:`business_connection_id` to the method
:class:`aiogram.methods.stop_poll.StopPoll`,
allowing the bot to stop polls it sent on behalf of a business account.
`1518 <https://github.com/aiogram/aiogram/issues/1518>`_


Bugfixes
--------

- Increased DNS cache ttl setting to aiohttp session as a workaround for DNS resolution issues in aiohttp.
`1500 <https://github.com/aiogram/aiogram/issues/1500>`_


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

- Fixed MongoStorage section in the documentation by adding extra dependency to ReadTheDocs configuration.
`1501 <https://github.com/aiogram/aiogram/issues/1501>`_
- Added information about dependency changes to the :code:`2.x --> 3.x` migration guide.
`1504 <https://github.com/aiogram/aiogram/issues/1504>`_


Misc
----

- [Only for contributors] Fail redis and mongo tests if incorrect URI provided + some storages tests refactoring

If incorrect URIs provided to "--redis" and/or "--mongo" options tests should fail with errors instead of skipping.
Otherwise the next scenario is possible:
1) developer breaks RedisStorage and/or MongoStorage code
2) tests are run with incorrect redis and/or mongo URIsprovided by "--redis" and "--mongo" options (for example, wrong port specified)
3) tests pass because skipping doesn't fail tests run
4) developer or reviewer doesn't notice that redis and/or mongo tests were skipped
5) broken code gets in codebase

Also some refactorings done (related with storages and storages tests).
`1510 <https://github.com/aiogram/aiogram/issues/1510>`_

3.7.0

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

Features
--------

- Added new storage :code:`aiogram.fsm.storage.MongoStorage` for Finite State Machine based on Mongo DB (using :code:`motor` library)
`1434 <https://github.com/aiogram/aiogram/issues/1434>`_
- Added full support of `Bot API 7.4 <https://core.telegram.org/bots/api-changelog#may-28-2024>`_
`1498 <https://github.com/aiogram/aiogram/issues/1498>`_


Bugfixes
--------

- Fixed wrong :code:`MarkdownV2` custom emoji parsing in :code:`aiogram.utils.text_decorations`
`1496 <https://github.com/aiogram/aiogram/issues/1496>`_


Deprecations and Removals
-------------------------

- Removed deprecated arguments from Bot class
:code:`parse_mode`, :code:`disable_web_page_preview`, :code:`protect_content` as previously announced in v3.4.0.
`1494 <https://github.com/aiogram/aiogram/issues/1494>`_


Misc
----

- Improved code consistency and readability in code examples by refactoring imports, adjusting the base webhook URL, modifying bot instance initialization to utilize DefaultBotProperties, and updating router message handlers.
`1482 <https://github.com/aiogram/aiogram/issues/1482>`_

3.6.0

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

Features
--------

- Added full support of `Bot API 7.3 <https://core.telegram.org/bots/api-changelog#may-6-2024>`_
`1480 <https://github.com/aiogram/aiogram/issues/1480>`_


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

- Added telegram objects transformation block in 2.x -> 3.x migration guide
`1412 <https://github.com/aiogram/aiogram/issues/1412>`_

3.5.0

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

Features
--------

- Added **message_thread_id** parameter to **ChatActionSender** class methods.
`1437 <https://github.com/aiogram/aiogram/issues/1437>`_
- Added context manager interface to Bot instance, from now you can use:

.. code-block:: python

async with Bot(...) as bot:
...

instead of

.. code-block:: python

async with Bot(...).context() as bot:
...
`1468 <https://github.com/aiogram/aiogram/issues/1468>`_


Bugfixes
--------

- - **WebAppUser Class Fields**: Added missing `is_premium`, `added_to_attachment_menu`, and `allows_write_to_pm` fields to `WebAppUser` class to align with the Telegram API.

- **WebAppChat Class Implementation**: Introduced the `WebAppChat` class with all its fields (`id`, `type`, `title`, `username`, and `photo_url`) as specified in the Telegram API, which was previously missing from the library.

- **WebAppInitData Class Fields**: Included previously omitted fields in the `WebAppInitData` class: `chat`, `chat_type`, `chat_instance`, to match the official documentation for a complete Telegram Web Apps support.
`1424 <https://github.com/aiogram/aiogram/issues/1424>`_
- Fixed poll answer FSM context by handling :code:`voter_chat` for :code:`poll_answer` event
`1436 <https://github.com/aiogram/aiogram/issues/1436>`_
- Added missing error handling to :code:`_background_feed_update` (when in :code:`handle_in_background=True` webhook mode)
`1458 <https://github.com/aiogram/aiogram/issues/1458>`_


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

- Added WebAppChat class to WebApp docs, updated uk_UA localisation of WebApp docs.
`1433 <https://github.com/aiogram/aiogram/issues/1433>`_


Misc
----

- Added full support of `Bot API 7.2 <https://core.telegram.org/bots/api-changelog#march-31-2024>`_
`1444 <https://github.com/aiogram/aiogram/issues/1444>`_
- Loosened pydantic version upper restriction from ``<2.7`` to ``<2.8``
`1460 <https://github.com/aiogram/aiogram/issues/1460>`_

3.4.1

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

Bugfixes
--------

- Fixed JSON serialization of the :code:`LinkPreviewOptions` class while it is passed
as bot-wide default options.
`1418 <https://github.com/aiogram/aiogram/issues/1418>`_

3.4.0

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

Features
--------

- Reworked bot-wide globals like :code:`parse_mode`, :code:`disable_web_page_preview`, and others to be more flexible.

.. warning::

Note that the old way of setting these global bot properties is now deprecated and will be removed in the next major release.
`1392 <https://github.com/aiogram/aiogram/issues/1392>`_
- A new enum :code:`KeyboardButtonPollTypeType` for :code:`KeyboardButtonPollTypeType.type` field has bed added.
`1398 <https://github.com/aiogram/aiogram/issues/1398>`_
- Added full support of `Bot API 7.1 <https://core.telegram.org/bots/api-changelog#february-16-2024>`_

- Added support for the administrator rights :code:`can_post_stories`, :code:`can_edit_stories`, :code:`can_delete_stories` in supergroups.
- Added the class :code:`ChatBoostAdded` and the field :code:`boost_added` to the class :code:`Message` for service messages about a user boosting a chat.
- Added the field :code:`sender_boost_count` to the class :code:`Message`.
- Added the field :code:`reply_to_story` to the class :code:`Message`.
- Added the fields :code:`chat` and :code:`id` to the class :code:`Story`.
- Added the field :code:`unrestrict_boost_count` to the class :code:`Chat`.
- Added the field :code:`custom_emoji_sticker_set_name` to the class :code:`Chat`.
`1417 <https://github.com/aiogram/aiogram/issues/1417>`_


Bugfixes
--------

- Update KeyboardBuilder utility, fixed type-hints for button method, adjusted limits of the different markup types to real world values.
`1399 <https://github.com/aiogram/aiogram/issues/1399>`_
- Added new :code:`reply_parameters` param to :code:`message.send_copy` because it hasn't been added there
`1403 <https://github.com/aiogram/aiogram/issues/1403>`_


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

- Add notion "Working with plural forms" in documentation Utils -> Translation
`1395 <https://github.com/aiogram/aiogram/issues/1395>`_

Page 1 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.