* Update callback_data.py
Allows using a default value in the class which is equal to an empty string ("").
Example:
class MyCallbackData(CallbackData, prefix="MyCallbackData"):
input1: str
input2: str = ""
* Create 1493.bugfix.rst
* Update callback_data.py
Fixed an issue that prevented unpacking None values.
* Added tests for CallbackData
* Update tests/test_filters/test_callback_data.py
Co-authored-by: Oleg A. <t0rr@mail.ru>
* Update test_callback_data.py
* Update callback_data.py
* Update 1493.bugfix.rst
---------
Co-authored-by: Oleg A. <t0rr@mail.ru>
* Added "startapp" deep link support
* Remove link_type param, added create_startapp_link method
* Write tests for create_startapp_link method
* Refactor with black & isort
* Added CHANGELOG
* Added support of direct mini app links
* Added CHANGELOG
* 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
* Added "startapp" deep link support
* Remove link_type param, added create_startapp_link method
* Write tests for create_startapp_link method
* Refactor with black & isort
* Added CHANGELOG
* 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
* Fix handler registration order in `Scene`
Previously, `Scene` handlers were registered based on the sorted output of `inspect.getmembers`, causing incorrect execution order. Now, handlers are registered in the order they are defined in the class, ensuring reliable behavior and proper sequence when handling filters with varying specificity. Added test cases to validate the correct handler ordering.
* Add dynamic dataclass and class attribute resolvers
Introduced `dataclass_kwargs` to ensure compatibility with different Python versions and modular attribute handling. Added utilities for resolving class attributes dynamically, enhancing flexibility with MRO-based resolvers. Updated tests to verify new features and ensure proper functionality across various scenarios.
* Update changelog
* Add business_connection_id to message API methods
Integrated the business_connection_id attribute into various message manipulation methods, ensuring consistent data handling. This update eliminates the need to pass the business_connection_id as a parameter, instead directly accessing it from the instance attributes.
* Added changelog
* Add function `get_value` to all built-in storage implementations, `FSMContext` and `SceneWizard` (#1431)
* Fix type hints
* Split up return statements in `get_value` functions
* Implement `get_value` method in `BaseStorage` and remove redundant implementations
* Try to enable tests on Python 3.13
* Remove support for Python 3.8 and PyPy 3.8
Dropped Python 3.8 and PyPy 3.8 from the CI workflow and updated the minimum required Python version to 3.9 in pyproject.toml. Also updated dependencies and tools to align with the new minimum Python version.
* Added changelog
* Reformat code
* Bump mypy python version
* #1583 Improved Scene handler and action inheritance mechanism
Enhanced the inheritance of handlers and actions in scenes. Refactored to eliminate the copying of previously connected handlers and actions from parent scenes. Now, handlers are dynamically rebuilt based on the current class, properly utilizing class inheritance and enabling handler overrides.
* Added more tests
* Added more tests for non-function handlers
Add new version details to CHANGES.rst and update __meta__.py. Removed individual CHANGES/* feature and bugfix files, merging their content into the main CHANGES.rst.
* #1579 Fixed `Default` object annotation resolution in `pydantic` models. Reformat code.
* Bump mongo and Redis dependencies
* Update pydantic version constraints based on Python version
Adjusted the version constraints for the pydantic library in `pyproject.toml` to ensure compatibility with different Python versions. This helps maintain stability and compatibility across various development environments.
* Adjust version
* Fixed typo
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.