* Base implementation
* Small refactoring + added possibility to specify post-action on handlers
* Move scene properties to config object
* Revise aiogram/scenes with wizard-based design pattern
Modified files in aiogram/scenes to incorporate the Wizard design pattern. Files affected are _marker.py, _registry.py, _wizard.py and __init__.py. The changes introduced a SceneWizard Class and ScenesManager, both of which aid in controlling navigation between different scenes or states. This helps clarifying the codebase, streamline scene transitions and offer more control over the app flow.
* Added example
* Small optimizations
* Replace ValueError with SceneException in scenes. Added error safety in scene resolver.
* str
* Added possibility to reset context on scene entered and to handle callback query in any state
* Remove inline markup in example
* Small changes
* Docs + example
* Small refactoring
* Remove scene inclusion methods from router
The methods for including scenes as sub-routers have been removed from the router.py file. Instead, the SceneRegistry class is now set to register scenes by default upon initializing. This streamlines the scene management process by removing redundant routers and making registration automatic.
* Init tests
* Small fix in tests
* Add support for State instance in the scene
The aiogram FSM scene now allows the use of State instance as an argument, enabling more customization. Modified the 'as_handler' method to receive **kwargs arguments, allowing passing of attributes to the handler. An additional type check has been also added to ensure the 'scene' is either a subclass of Scene or a string.
* Fixed test
* Expand test coverage for test_fsm module
The commit enhances tests for the test_fsm module to improve code reliability. It includes additional unit tests for the ObserverDecorator and ActionContainer classes and introduces new tests for the SceneHandlerWrapper class. This ensures the correct functionality of the decorator methods, the action container execution, and the handler wrapper.
* Reformat code
* Fixed long line in the example
* Skip some tests on PyPy
* Change mock return_value
* Compatibility...
* Compatibility...
* Compatibility...
* Added base changes description
* Scenes Tests (#1369)
* ADD tests for `SceneRegistry`
* ADD tests for `ScenesManager`
* ADD Changelog
* Revert "ADD Changelog"
This reverts commit 6dd9301252.
* Remove `@pytest.mark.asyncio`, Reformat code
* Scenes Tests. Part 2 (#1371)
* ADD tests for `SceneWizard`
* ADD tests for `Scene`
* Refactor ObserverDecorator to use on.message syntax in test_scene.py
Cover `Scene::__init_subclass__::if isinstance(value, ObserverDecorator):`
* Refactor `HistoryManager` in `aiogram/fsm/scene.py`
Removed condition that checked if 'history' is empty before calling 'update_data' in 'Scene'.
* ADD tests for `HistoryManager`
* Small changes in the documentation
* Small changes in the documentation
* Small changes in the documentation
---------
Co-authored-by: Andrew <11490628+andrew000@users.noreply.github.com>
* Add additional API message methods to ChatJoinRequest class
ChatJoinRequest now includes additional message methods including SendAnimation, SendAudio, SendContact, and many more. The changes are useful for sending various types of messages during chat join requests.
* Added changelog
* Added full support of Bot API 6.5
* Shut up, linters (Fixed errors)
* Oops. Added lost files.
* Fixed tests
* Added changes description
* Update description from docs
* Fixed anchors
* Update Butcher
* Added danger zone to changelog
* Type
* Rewrite filters
* Update README.rst
* Fixed tests
* Small optimization of the Text filter (TY to @bomzheg)
* Remove dataclass slots argument in due to the only Python 3.10 has an slots argument
* Fixed mypy
* Update tests
* Disable Python 3.11
* Fixed#1013: Empty mention should be None instead of empty string.
* Added #990 to the changelog
* Added #942 to the changelog
* Fixed coverage
* Update poetry and dependencies
* Fixed mypy
* Remove deprecated code
* Added more tests, update pyproject.toml
* Partial update docs
* Added initial Docs translation files
* Added more changes
* Added log message when connection is established in polling process
* Fixed action
* Disable lint for PyPy
* Added changelog for docs translation
* Re-generate API
* Added new modules
* Added handling new event type and approve/decline aliases for ChatJoinRequest
* Fixed code-coverage
* Bump API version
* Added patch-notes
* Regenerate API
* Update code
* Fixed command filter for photos
* Fix tests so they are able to run
* Test new and renamed API methods
* Reformat files
* Fix outer_middleware resolution (#637) (#640)
* Fix outer_middleware resolution (#637)
* Reformat files
* Reorder routers when resolve middlewares
Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
* Added possibility to use empty callback data factory filter
* Rename KeyboardConstructor to KeyboardBuilder
* Fixed type
Co-authored-by: evgfilim1 <evgfilim1@yandex.ru>
Upgrade architecture + 5.0 Bot API (#469)
* Moved `methods`, `types` and `client` to root package
* Removed update handler from routers to dispatcher
* Reworked events propagation mechanism to handlers
* Reworked inner middlewares logic (very small change)
* Updated to Bot API 5.0
* Initial migration from MkDocs to Sphinx + config for readthedocs
* feat(proxy): proxy for aiohttp,base sessions
Add support for proxies in aiohttp session with aiohttp_socks library,
edit BaseSession class to support proxies for other sessions in future.
* fix(annotation): missing underscore before "private" typevar
* chore: remove redundant of proxy_url schema for socks version
* test: add missing test
Add missing test, remove BaseSession.cfg and switch to
implementing class' "private" traits, add aiohttp_socks in dependency list as
optional and extra.
* feat(session):
Implement asyncio session for requests [wip]
* feat(proxy chain): Chained proxy support in aiohttp session
Add ChainProxyConnector support, !pin pydantic to "1.4", add
documentation on aiohttp connector.
* style(mypy): apply linter changes
* tests(mock): remove await for magic mock
* fix dangling dependency
* refactor(generic):
get rid of generic behaviour for base session