Update deep linking documentation and bump version to 3.19.0
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled

This commit is contained in:
JRoot Junior 2025-03-19 21:04:48 +02:00
parent 658f1fc082
commit 78748d36fd
No known key found for this signature in database
GPG key ID: 738964250D5FF6E2
11 changed files with 76 additions and 42 deletions

View file

@ -16,6 +16,69 @@ Changelog
.. towncrier release notes start
3.19.0 (2025-03-19)
====================
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 (2025-02-16)
====================

View file

@ -1 +0,0 @@
Fix handling of default empty string ("") in CallbackData filter

View file

@ -1,5 +0,0 @@
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.

View file

@ -1,4 +0,0 @@
Add 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.

View file

@ -1,20 +0,0 @@
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.

View file

@ -1,2 +0,0 @@
Added new method to utils/deep_linking.py module to creating "startapp" deep links, see also
https://core.telegram.org/api/links#main-mini-app-links

View file

@ -1 +0,0 @@
Updated 🇺🇦Ukrainian docs translation

View file

@ -1,2 +0,0 @@
Updated "create_startapp_link" method, added app_name param for support direct mini app links, see
also https://core.telegram.org/api/links#direct-mini-app-links

View file

@ -1,2 +1,2 @@
__version__ = "3.18.0"
__version__ = "3.19.0"
__api_version__ = "8.3"

View file

@ -31,8 +31,7 @@ async def create_start_link(
"""
Create 'start' deep link with your payload.
If you need to encode payload or pass special characters -
set encode as True
If you need to encode payload or pass special characters - set encode as True
:param bot: bot instance
:param payload: args passed with /start
@ -59,8 +58,7 @@ async def create_startgroup_link(
"""
Create 'startgroup' deep link with your payload.
If you need to encode payload or pass special characters -
set encode as True
If you need to encode payload or pass special characters - set encode as True
:param bot: bot instance
:param payload: args passed with /start
@ -88,8 +86,12 @@ async def create_startapp_link(
"""
Create 'startapp' deep link with your payload.
If you need to encode payload or pass special characters -
set encode as True
If you need to encode payload or pass special characters - set encode as True
**Read more**:
- `Main Mini App links <https://core.telegram.org/api/links#main-mini-app-links>`_
- `Direct mini app links <https://core.telegram.org/api/links#direct-mini-app-links>`_
:param bot: bot instance
:param payload: args passed with /start

View file

@ -57,4 +57,8 @@ References
.. autofunction:: aiogram.utils.deep_linking.create_start_link
.. autofunction:: aiogram.utils.deep_linking.create_startgroup_link
.. autofunction:: aiogram.utils.deep_linking.create_startapp_link
.. autofunction:: aiogram.utils.deep_linking.decode_payload