* Migrate from Black to Ruff and reformat code with enabling additional linter checks
* Add changelog for migration to Ruff as formatter and linter
* Add type ignores for specific attributes and replace tuple with set for chat type check
* Remove file from another changes
* Added full support of Telegram Bot API 9.3
* Fixed tests that fails
* Add tests for `GetChatGifts`, `GetUserGifts`, `RepostStory`, and `SendMessageDraft` methods
* Added changelog record
* Switch to using `uv` for dependency management and update related project workflows and scripts
* Expand contributing documentation with instructions for using `uv`, including dependency management, testing, linting, and docs workflows.
* Add changelog entry for migration to `uv` for dependency management and workflows
* migrated mongo storage from using deprecated motor to PyMongo
* added storages to __init__.py file to improve DX
* changelog file created
* Revert "added storages to __init__.py file to improve DX"
This reverts commit 5d0f6a9dfb.
* added optional dependency to pymongo to pyproject.toml
* Revert "migrated mongo storage from using deprecated motor to PyMongo"
This reverts commit 1c0207e1d1.
* added deprecation warning to mongo storage
* created pymongo storage
* added entry for PyMongoStorage to documentation in fsm.storages
* updated changelog to have information about how to migrate from MongoStorage to PyMongoStorage
* added test for pymongo storage (copied from mongo storage test)
* fixed formatting using black and isort
* fixed bug in close method of PyMongoStorage (client close method was not awaited)
* added test for PyMongoStorage that checks if storage could be properly closed
* pymongo package changed to be lower case in PyMongoStorage
* added fixture registration for pymongo storage
* test for pymongo is now using proper test fixtures
* removed redundant call to get_data, because we have checked this condition in the previous line
* added more tests to pymongo test, to check for all possible cases of using update_data method
* fixed PyMongoStorage update_data method implementation
* added pymongo tests to test_storages
* fixed pymongo tests, update_data method should not delete document when {} was passed
* Revert "fixed PyMongoStorage update_data method implementation"
This reverts commit 86170e1cb9.
* fixed linting issues in PyMongoStorage
* changed allowed versions of pymongo, to be compatible with motor
* pinned the upper version of pymongo to <4.11
* Added full support for the Bot API 9.2
* Mark butcher tool output files as linguist-generated in .gitattributes
* Switch `send_date` type from `int` to `DateTime` in suggested post models
* Add support for Telegram Bot API 9.1 features, including checklists, gifts, and new methods like `SendChecklist`, `EditMessageChecklist`, and `GetMyStarBalance`. Update changelog and improve `True` field descriptions.
* Bump API Version
* Refactor profile photo types to use `InputProfilePhotoType` enums instead of hardcoded literals
* Refactor imports and clean up redundant code across methods, types, and webhook server classes
* Update translation files with new creation dates.
This update includes newly added and corrected translation entries for various .po files in the Ukrainian locale. It ensures consistency with updated source files and aligns with the latest Telegram bot API changes.
* Update Ukrainian documentation translation
* Refactor: 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. Updates applied to affected classes, methods, and imports accordingly.
* Refactor unions into type aliases for better reusability
Replaced inline `Union` types with predefined aliases like `MediaUnion`, `ReplyMarkupUnion`, and `ChatIdUnion`. Simplifies type annotations, improves code readability, and reduces duplication. Added `media_union.py` for grouping related media types.
* Refactor type unions with ResultChatMemberUnion and ResultMenuButtonUnion
Replaced verbose type definitions of chat member and menu button unions with `ResultChatMemberUnion` and `ResultMenuButtonUnion` for improved readability and maintainability. Updated relevant methods, modules, and documentation to use the new type aliases consistently.
* Added changelog
* Add TypedDict support for middleware context data
Introduced `MiddlewareData` and associated TypedDicts to type-hint middleware context data. Updated documentation to include usage examples and guidelines for extending the default middleware data. Also adjusted coverage configuration to exclude the new data module.
* Added more docstrings
* Typo fixes
The warning previously stated that the Arch Linux package is outdated. It is now revised to indicate that the package may be outdated and recommends using the PyPI package for the latest version. This change ensures users are correctly informed about the potential version differences.
Moved warning for outdated package to the top of the Arch Linux section and removed redundant PyPI installation instructions for the development build. This enhances the clarity and accuracy of the installation documentation.
* feature: add aliases for InaccessibleMessage type
* add changelog
* fix changelog
* remove methods that may not be accessible for the InaccessibleMessage type, add tests
* apply black isort
* update docs with InaccessibleMessage aliases
* Bump to the latest schema
* Added full support ob Bot API 7.10
* Add support for purchased paid media events
Enhanced the router to include `purchased_paid_media` handling. Added corresponding test cases to verify the new functionality and updated middleware to return the appropriate `EventContext`.
* Added changelog
* Added full support of Bot API 7.8
* Added changelog
* Try to fix tests on Windows
* scope=session?
* Try another way
* Just try to set custom event loop policy manually
* Revert "Just try to set custom event loop policy manually"
This reverts commit 04ee60d878.
* Just try to set custom event loop policy manually
* Add serialization utilities and update documentation
Introduced utilities to deserialize Telegram objects to JSON-compliant Python objects and vice versa. These utilities manage both cases with and without files. The documentation has been updated to reflect these changes, including updates in migration recommendations and tutorials. A new unit test is added to verify the new functionality.
* Fixed Must-die implementation of the datetime serialization
* Fixed `TypeError: can't subtract offset-naive and offset-aware datetimes`
* Update upload_file.rst
who the fuck even wrote this
* Update docs/api/upload_file.rst
Co-authored-by: Yana Malenko <107151775+akchonya@users.noreply.github.com>
---------
Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
Co-authored-by: Yana Malenko <107151775+akchonya@users.noreply.github.com>
* 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>