Commit graph

283 commits

Author SHA1 Message Date
Alex Root Junior
d8b9ce1be9
Added full support for the Bot API 8.3 (#1638)
* Added full support for the Bot API 8.3

* Added changelog

* Ignore typing for aiohttp_socks
2025-02-16 22:37:18 +02:00
OneHandedPirate
25833b830e
Update scene.rst (#1640)
* Update scene.rst

* Create 1640.bugfix.rst
2025-02-16 22:14:06 +02:00
monosans
6e81294685
fix: change the Downloadable protocol to be non-writable to shut up type checking that checks code that uses the bot.download(...) method (#1628)
* fix: don't require Downloadable.file_id to be writable

* docs: add changelog

* Update CHANGES/1628.bugfix.rst

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2025-01-19 03:35:44 +02:00
AmirSoroush
bbdc43b737
Fix BAD_PATTERN regex in deeplinking process. (#1630)
* add test payload in `test_deep_linking` to demonstrate the bug

* fix the `BAD_PATTERN` regex

* add changes file
2025-01-17 01:35:23 +02:00
Anton Trotsenko
a516b7f03f
Bump redis max version to <5.3.0 (#1631)
* Bump redis max version to <5.3.0

* Describe changes
2025-01-17 01:29:50 +02:00
Oleg A.
44bd8fe103
Remove path to string convertion (#1612)
* Remove path to string conversion

* docs: changelog added
2025-01-04 10:37:26 +02:00
JRoot Junior
b376949647
Bump version 2025-01-02 02:44:02 +02:00
Alex Root Junior
afccd8a38f
Added full support of Bot API 8.2 (#1623)
* Added full support of Bot API 8.2

* Added changelog

* Try to add port

* Add port to the `test_reset_connector`
2025-01-02 02:38:18 +02:00
JRoot Junior
1d5405ab43
Bump version 2024-12-21 23:50:49 +02:00
qvvonk
f2e305e92a
Added __call__ method to TelegramMethod class. (#1616)
* Added __call__ method to TelegramMethod class.

* Added rst.

* Moved rst.

* Deleted __call__, changed exception text.

* Changed pull request desc text
2024-12-15 16:00:21 +02:00
Dmitriy
494e07a75a
Increased aiohttp version (#1615)
* Increased aiohttp version

* Added changes file

* Update CHANGES/1615.misc.rst

---------

Co-authored-by: Долгалев Дмитрий Игоревич <didolgalev@domclick.ru>
Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2024-12-14 19:32:21 +02:00
Alex Root Junior
782796c217
Added full support of Bot API 8.1 (#1617)
* Added full support of Bot API 8.1

* Remove  artifacts from types and methods (model_* methods)
2024-12-14 19:30:12 +02:00
Suren Khorenyan
6520b9fba2
[misc] fix tg-emoji closing tag: use constant (#1608)
* fix tg-emoji closing tag: use constant

* add changelog for tg-emoji closing tag fix

* Update CHANGES/1608.misc.rst

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2024-11-25 22:08:05 +02:00
kewldan
141a550ab2
misc(deps): Bump pydantic version to <2.11 (#1607)
* Bump pydantic max version to <2.11

* CHANGES file

* Update CHANGES/1607.misc.rst

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2024-11-23 17:54:49 +02:00
JRoot Junior
754535a2aa
Bump version 2024-11-17 23:20:34 +02:00
Alex Root Junior
dfc88fc907
Added full support for Bot API 8.0 (#1606)
* Added full support of Bot API 8.0

* Added tests

* Reformat code

* Added changelog

* Bump API version
2024-11-17 23:18:42 +02:00
JRoot Junior
f2916ca03f
Bump version 2024-11-02 17:02:47 +02:00
Alex Root Junior
a2af73ad78
Added business_connection_id to the Message API methods shortcuts (#1586)
* 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
2024-11-02 16:55:15 +02:00
Arthur Khachaturov
592267dd99
Add function get_value to BaseStorage (#1594)
* 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
2024-11-02 16:48:01 +02:00
Alex Root Junior
fd014d2026
Fixed UUID (and other types) serialization in the CallbackData factory. (#1602)
From now UUID will have 32 bytes length instead of 36 bytes.
2024-11-02 16:37:31 +02:00
Alex Root Junior
405bbcc36f
Added full support of Bot API 7.11 (#1601)
* Added full support of Bot API 7.11

* Small fixes

* Added changelog
2024-11-02 16:13:45 +02:00
chiri
4531c3628c
[docs] fix typo (#1599) 2024-10-27 20:03:21 +02:00
Alex Root Junior
51beb48257
Enabled tests on Python 3.13, disabled on Python 3.8 (#1589)
* 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
2024-10-19 14:55:38 +03:00
Alex Root Junior
1dbdcf0516
Improved Scene handler and action inheritance mechanism (#1585)
* #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
2024-10-06 16:37:18 +03:00
Carl Smedstad
080878be86
Fix pytest-asyncio deprecation warning in test (#1584)
Introduced in pytest-asyncio in:
https://github.com/pytest-dev/pytest-asyncio/pull/648
2024-09-28 01:33:14 +03:00
JRoot Junior
718910f5b5
Release version 3.13.1
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.
2024-09-18 22:55:32 +03:00
Alex Root Junior
f9f847f603
#1579 Fixed Default object annotation resolution in pydantic models. (#1580)
* #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
2024-09-18 22:45:19 +03:00
monosans
a76fb42ba0
Bump aiofiles version upper bound to <24.2 (#1577)
* Bump aiofiles version upper bound to <24.2

* Add changelog
2024-09-10 23:40:07 +03:00
Andrew
7297ffa16e
Increase pydantic max version (<2.9 -> <2.10) (#1576)
* Increase `pydantic` max version (2.10)

* Add changes file
2024-09-09 20:05:01 +03:00
JRoot Junior
d9419ba690
Bump version 2024-09-08 14:06:45 +03:00
Kostiantyn Kriuchkov
386fc44a98
Feature/aliases inaccessible message (#1575)
* 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
2024-09-08 14:00:07 +03:00
Alex Root Junior
e8fc890809
Bot API 7.10 (#1570)
* 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
2024-09-08 04:01:18 +03:00
Alex Root Junior
627ee09928
Fixed link preview options to use global defaults in some types and methods (#1563)
* #1543 Fixed link preview options to use global defaults

Refactor various classes to use global defaults for `link_preview_options`. This change ensures consistency and enhances flexibility in handling link preview options across different components.

* Added changelog
2024-08-17 16:41:52 +03:00
JRoot Junior
6aba60155c
Bump version 2024-08-16 00:46:41 +03:00
Alex Root Junior
c3a08664d3
Added full support of Bot API 7.9 (#1560)
* Added full support of Bot API 7.9

* Added changelog

* Try to fix towncrier

* Fixed towncrier check
2024-08-16 00:44:40 +03:00
Desiders
1c323ecc97
Add getting user from chat_boost (#1474)
* Add getting user from `chat_boost`

* Update import

* Add changelog

* Add test for `resolve_event_context`

* Lint changes

* Parametrize test
2024-08-14 02:12:39 +03:00
Robotvasya
e2e1bc5573
Added message_thread_id to url of chats with topics for message.get_u… (#1469)
* Added message_thread_id to url of chats with topics for message.get_url() (#1451)

* Added tests for message.get_url()

* Added tests for message.get_url()

* Changed tests for message.get_url()
2024-08-14 02:11:58 +03:00
Oleg A.
9b0b6a68ed
Precalculate StateGroup values (#1507)
* Precalculate StateGroup values

* Changelog added

* Remove redundant overrides

* Refactor children preparing

* Refactor mcs fn visibility

* Refactor mcs fn visibility (fix)
2024-08-14 02:10:31 +03:00
JRoot Junior
60f93b3b46
Bump version 2024-08-09 20:16:28 +03:00
Alex Root Junior
cf3a6c3d59
Added full support of Bot API 7.8 (#1551)
* 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
2024-08-09 19:10:39 +03:00
Oleg A.
3ba724e2fa
Added aiohttp 3.10 support (#1548)
* added aiohttp 3.10 support

* added changelog
2024-08-01 01:37:24 +03:00
Bogdan
2516f32168
Fix web_app example (#1546)
* Fix url in button

* Fixed URL path in the "Open" button at the `demo/sendMessage` endpoint

* Fix web_app example

* Add changelog

* Restore old changelog
2024-07-27 16:21:45 +03:00
Alex Root Junior
ac96f0d233
Added 'as_reply_parameters' method & integrate with message reply methods (#1539)
* Added 'as_reply_parameters' method & integrate with message reply methods

The 'as_reply_parameters' method is added to generate reply parameters in a message. This method was used in reply methods.

* Added changelog
2024-07-13 04:03:49 +03:00
JRoot Junior
7807981252
Bump version 2024-07-07 15:55:14 +03:00
Alex Root Junior
4ddc320e21
Added full support of Bot API 7.7 (#1536)
* Added full support of Bot API 7.7

* Added changes description
2024-07-07 15:46:17 +03:00
JRoot Junior
ad28ce9689
Bump version 2024-07-06 20:54:30 +03:00
Alex Root Junior
7f47609585
#1520 Fixed event context resolving for the callback query (#1521)
* #1520 Fixed event context resolving for the callback query that is coming from the business account

* Simplify some conditions

* Added changelog

* Fixed AttributeError
2024-07-06 20:46:45 +03:00
Oleg A
46e033e6da
Add chat member tools (#1527)
* feat: add ChatMemberAdapter

* chore: apply formatter

* docs: added changelog

* docs: rm redundant import

* feat: add pre-defined groups
2024-07-06 20:34:07 +03:00
Alex Root Junior
11efa8e186
Added full support of Bot API 7.6 (#1533)
* Added full support of Bot API 7.6

* Fixed imports

* fix tests (#1534)

* Fixed coverage

* Override InputPaidMedia media type to `str | InputFile`

* Added shortcut

* Fixed PaidMediaType enum

* Added changelog

---------

Co-authored-by: Oleg A <t0rr@mail.ru>
2024-07-06 20:31:49 +03:00
request3301
3baa7383c1
Corrected typo (#1519)
* typo in scene.rst

* Create 1519.doc.rst
2024-06-19 21:07:58 +03:00