Commit graph

2036 commits

Author SHA1 Message Date
Rishat Fayzullin
04ae6dcd7a Merge branch 'dev-3.x' into mongo_storage
Conflicts resolved
2024-04-30 23:34:07 +03:00
Alexey Leshchenko
849482da1f
Update command.rst (#1470)
Fix rendition of the backslash in regular expressions
2024-04-24 22:38:26 +03:00
JRoot Junior
6ad287c329
Bump changelog 2024-04-24 22:14:34 +03:00
unintended
f1c9fc50f0
Fix missing error logging (#1458)
* Fix missing error logging 

No error logging when handle_in_background=True

* add CHANGES
2024-04-23 13:59:13 +03:00
Alex Root Junior
4729978c60
Add context manager support for bot client (#1468)
* 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
2024-04-22 23:42:47 +03:00
Joren Hammudoglu
9756dac877
loosened pydantic upper bound to <2.8 (#1460)
* bump pydantic to 2.8

* add changelog entry for #1460
2024-04-22 13:49:34 +03:00
Alex Root Junior
057478621b
Added full support of Bot API 7.2 (#1444)
* 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>
2024-04-22 13:48:49 +03:00
Oleg A
5f157beb26
Bump actions versions (#1459)
* chore: bump actions versions

* chore: add pypy310
2024-04-17 14:09:19 +03:00
Yana Malenko
b49939aaff
add default bot properties and clean imports (#1447) 2024-04-09 01:27:29 +03:00
Rishat Fayzullin
dfecdeee9a redis and mongo storages tests do not run in pypy-tests job of CI 2024-03-17 10:22:35 +03:00
avoidaway
acf52f468c
chore: remove repetitive words (#1438)
Signed-off-by: avoidaway <cmoman@126.com>
2024-03-17 02:20:29 +02:00
Rishat Fayzullin
e910e04755 Makefile updated 2024-03-15 17:49:16 +03:00
Rishat Fayzullin
90b55e39dd Refactoring while review 2024-03-14 18:49:10 +03:00
Rishat Fayzullin
13bd7f2b98 Enable Macos in pypy-tests section of CI 2024-03-14 09:20:57 +03:00
Rishat Fayzullin
8567496b77 Refactoring while review 2024-03-13 22:39:07 +03:00
Rishat Fayzullin
a24327455a Fix CI - MongoDB container action is only supported on Linux 2024-03-13 21:56:15 +03:00
Rishat Fayzullin
ce48b825e8 Storing FSM state and data together in MongoDB-storage 2024-03-13 21:36:57 +03:00
Rishat Fayzullin
7c18c87b95 Refactoring while review 2024-03-12 17:35:15 +03:00
Rishat Fayzullin
5a2cb9704b Refactoring while review 2024-03-12 17:27:52 +03:00
Rishat Fayzullin
90949596a0 Added mongo storage testing in CI 2024-03-12 13:01:19 +03:00
Rishat Fayzullin
0fce314c83 Fix ruff linter error: E501 Line too long (100 > 99) 2024-03-12 11:53:27 +03:00
Rishat Fayzullin
89305e5587 Fix ruff linter error: RET505 Unnecessary elif after return statement 2024-03-12 11:50:10 +03:00
Maxim
506dacc0ff
Added message_thread_id parameter to ChatActionSender class methods (#1437)
* Added message_thread_id parameter to ChatActionSender class methods

* Added changelog

* rename chagelog file
2024-03-11 21:53:17 +02:00
Rishat Fayzullin
4118ce6015 IF/ELSE statement simplified 2024-03-11 09:51:17 +03:00
Rishat Fayzullin
9cbeb28f06 Resolved mypy check error 2024-03-11 09:45:35 +03:00
Rishat-F
9731c86a90
Fixed error message syntax
Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2024-03-10 21:49:51 +03:00
Alex Root Junior
0c9eeda8a7
Fixed poll answer FSM context (#1436)
* 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
2024-03-10 16:18:41 +02:00
JRoot Junior
30cee817f4
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x 2024-03-09 00:40:59 +02:00
JRoot Junior
bc08d90ce5
More tests for defaults 2024-03-09 00:40:46 +02:00
JRoot Junior
ee71117807
Bump pydantic version 2024-03-09 00:38:37 +02:00
Rishat Fayzullin
8cd091b792 Added changes description 2024-03-06 23:08:27 +03:00
Rishat Fayzullin
a5ccf28498 Added MongoStorage for FSM 2024-03-06 22:45:09 +03:00
Rishat Fayzullin
329c7f4c97 Added few additional checks in storages test 2024-03-06 16:53:56 +03:00
Leroy-bit
a2e75e5345
doc updated for WebApp (#1433)
Added WebAppChat class to WebApp docs, updated uk_UA localisation of WebApp docs.
2024-03-06 01:37:37 +02:00
Rishat Fayzullin
2790c77e59 Mongo storage included to storages test 2024-03-05 12:18:13 +03:00
Kostiantyn Kriuchkov
a585fb08de
Add missing Telegram WebApp API classes and fields (#1424) (#1425)
* 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
2024-02-26 02:13:32 +02:00
JRoot Junior
a37deff396
Fixed typo in the changelog 2024-02-17 10:46:50 +02:00
JRoot Junior
27dddff7f5
Update changelog + version 2024-02-17 10:21:41 +02:00
Alex Root Junior
53849b01a7
Fixed default LinkPreviewOptions JSON serialization (#1419)
* Fixed default link preview options serialization

* Added changelog
2024-02-17 10:10:50 +02:00
JRoot Junior
eef50a2edb
Bump API version in the docs 2024-02-16 23:48:54 +02:00
JRoot Junior
eaa56623ff
Render changelog 2024-02-16 23:47:06 +02:00
Alex Root Junior
75323ac8c3
Added full support of Bot API 7.1 (#1417)
* Added full support of Bot API 7.1

* Added changelog
2024-02-16 23:44:35 +02:00
JRoot Junior
e5176b4434
Update docs translation files 2024-02-16 01:17:09 +02:00
JRoot Junior
18b32f065d
Update changelog 2024-02-16 01:15:12 +02:00
JRoot Junior
0cf5afeb99
Add deprecation warnings to Bot properties
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.
2024-02-16 01:13:51 +02:00
JRoot Junior
e6e2601d4b
Fixed typehints in keyboard builder 2024-02-13 22:09:48 +02:00
Robotvasya
298e9821a4
Add notion Working with plural forms in documentation (#1409) 2024-02-09 21:30:02 +02:00
JRoot Junior
091b82e13f
Change magic filter examples 2024-02-09 21:27:21 +02:00
JRoot Junior
f7af9e7f4a
Fixed deep linking URL 2024-02-04 01:49:39 +02:00
Egor
bff483b8a7
Update message.send_copy: add missing reply_parameters param (#1403)
* Update message.send_copy: add missing reply_parameters param

* added changes file

* update changes file

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

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2024-02-03 19:25:14 +02:00