* Add MongoDB dependency to ReadTheDocs configuration
An update has been made to the ReadTheDocs configuration file to include MongoDB as an additional dependency on installation. This change addresses issues with the MongoStorage section in the documentation.
* Rename changelog file
* Remove deprecated attributes from Bot class
The deprecated attributes `parse_mode`, `disable_web_page_preview`, and `protect_content` have been removed from the Bot class. Additionally, the associated warnings and test cases have been deleted. These attributes should now be passed using the `default=DefaultBotProperties(...)` syntax instead.
* Added docs and changelog
* Mongo storage included to storages test
* Added few additional checks in storages test
* Added MongoStorage for FSM
* Added changes description
* Fixed error message syntax
Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
* Resolved mypy check error
* IF/ELSE statement simplified
* Fix ruff linter error: RET505 Unnecessary `elif` after `return` statement
* Fix ruff linter error: E501 Line too long (100 > 99)
* Added mongo storage testing in CI
* Refactoring while review
* Refactoring while review
* Storing FSM state and data together in MongoDB-storage
* Fix CI - MongoDB container action is only supported on Linux
* Refactoring while review
* Enable Macos in pypy-tests section of CI
* Refactoring while review
* Makefile updated
* redis and mongo storages tests do not run in pypy-tests job of CI
* Fix docstring of DefaultKeyBuilder
---------
Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
* Add context manager support for bot client
The bot client now supports the context manager protocol, providing automatic resource management. This enhancement helps to automatically close the session when leaving the context, which cleans up resources better. The documentation and tests have been updated accordingly to illustrate this new feature. Moreover, an example of usage without a dispatcher has been provided to clarify its use in simple cases.
* Added changelog
* Added base support of Bot API 7.2
* Added base support of Bot API 7.2
* Fixing tests and content types for Telegram Bot API 7.2 update (#1453)
* Fixing tests and content types for Telegram Bot API 7.2
* Adding changelog for 1453 PR
* Fixes + coverage
* Replace `BusinessConnection.date` type
* Reformat code
* Refactor UserContextMiddleware to use EventContext class
This update significantly refactors UserContextMiddleware to leverage a new class, EventContext. Instead of resolving event context as a tuple, it now produces an instance of EventContext. Additional adjustments include supporting a business connection ID for event context identification and facilitating backwards compatibility. Tests and other files were also updated accordingly for these changes.
* Cover FSM key builder (business_connection_id
* Added changelog
---------
Co-authored-by: RoLOQ <roman.fedunn@gmail.com>
* Add voter_chat to poll_answer event handling
The change ensures that when a poll_answer event is processed, the user context middleware now also returns the chat where the vote took place. Previously, only the user who cast the vote was returned.
* Added changelog
* Fixed tests
* Bump Python version in test
* Add missing Telegram WebApp API classes and fields (#1424)
* Implemented `WebAppChat` class with fields `id`, `type`, `title`, `username`, and `photo_url` as per Telegram documentation.
* Modified `WebAppUser` class by adding `is_premium`, `added_to_attachment_menu`, and `allows_write_to_pm` fields.
* Modified `WebAppInitData` class to include `chat`, `chat_type`, `chat_instance` fields for full API support.
* fix changelog file name
* fix line too long
Three properties of the Bot class - parse_mode, disable_web_page_preview, and protect_content - have been marked as deprecated with proper warning messages. The associated tests have also been added to confirm the working of these deprecation warnings. Users are advised to use the updated alternatives specified in the warning messages.
* Add KeyboardButtonPollTypeType enum
A new enum, KeyboardButtonPollType, has been added and documented. This enum holds types of polls that can be created and sent when the corresponding button is pressed. It is now imported and included in the aiogram enums documentation.
* Added changelog