Commit graph

86 commits

Author SHA1 Message Date
Alex Root Junior
18a93aab60
Disabled ContentTypesFilter by default (#668)
* Disabled ContentTypesFilter by default

* Rename file

* Update docs
2021-08-20 02:39:03 +03:00
Alex Root Junior
9238533e93
Feature/rework middlewares chain (#664)
* Reworked middlewares chain

* Added description for router name

* Added patch-notes

* Fixed type hints
2021-08-17 00:43:27 +03:00
darksidecat
04bbc8211c
add stategroup filter (#659) 2021-08-17 00:09:11 +03:00
Oleg A
f2f276b8cf
refactor: remove redundant pytest marks (#654) 2021-08-03 23:40:14 +03:00
Alex Root Junior
c3844bb18f Added detection of API Errors and fixed coverage 2021-08-01 00:34:50 +03:00
Alex Root Junior
4f2cc75951
Global filters for router (#644)
* Bump version

* Added more comments

* Cover registering global filters

* Reformat code

* Add more tests

* Rework event propagation to routers mechanism. Fixed compatibility with Python 3.10 syntax (match keyword)

* Fixed tests

* Fixed coverage

Co-authored-by: evgfilim1 <evgfilim1@yandex.ru>
2021-07-31 23:34:09 +03:00
Alex Root Junior
ac2b0bb198
[3.x] Bot API 5.3 + Improvements (#618)
* Regenerate API

* Update code

* Fixed command filter for photos

* Fix tests so they are able to run

* Test new and renamed API methods

* Reformat files

* Fix outer_middleware resolution (#637) (#640)

* Fix outer_middleware resolution (#637)

* Reformat files

* Reorder routers when resolve middlewares

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

* Added possibility to use empty callback data factory filter

* Rename KeyboardConstructor to KeyboardBuilder

* Fixed type

Co-authored-by: evgfilim1 <evgfilim1@yandex.ru>
2021-07-29 00:40:50 +03:00
evgfilim1
4599913e18
Fix not all args are passed to handler function invocation (#633) 2021-07-18 14:10:51 +03:00
Forevka
125fc22ff9
Added ability to specify which update bot need to receive and process while using polling mode (#617)
* provide allowed_updates in polling mode
2021-07-05 01:41:27 +03:00
Alex Root Junior
5296724a0f Small changes in tests 2021-06-15 02:01:57 +03:00
Alex Root Junior
83d6ab48c5
Backport and improvements (#601)
* Backport RedisStorage, deep-linking
* Allow prereleases for aioredis
* Bump dependencies
* Correctly skip Redis tests on Windows
* Reformat tests code and bump Makefile
2021-06-15 01:45:31 +03:00
Alex Root Junior
79f21416c8 Added lost files 2021-05-25 01:00:58 +03:00
Alex Root Junior
9cf189ffd2 Cover 100% 2021-05-13 22:04:10 +03:00
Alex Root Junior
03ccebd8be Cover base and memory storage 2021-05-13 01:54:07 +03:00
Alex Root Junior
7dd80d281f Added lost files 2021-05-12 23:56:03 +03:00
Alex Root Junior
74db2c47e6 Small changes in documentation 2021-05-12 23:00:12 +03:00
Alex Root Junior
0e72d8e65b
[3.0] Bot API 5.1 + FSM + Utils (#525)
* Regenerate corresponding to Bot API 5.1

* Added base of FSM. Markup constructor and small refactoring

* Fix dependencies

* Fix mypy windows error

* Move StatesGroup.get_root() from meta to class

* Fixed chat and user constraints

* Update pipeline

* Remove docs pipeline

* Added GLOBAL_USER FSM strategy

* Reformat code

* Fixed Dispatcher._process_update

* Bump Bot API 5.2. Added integration with MagicFilter

* Coverage
2021-05-11 23:04:32 +03:00
Alex Root Junior
d189853737 Increase timeout for MacOS pipelines. 2021-02-07 19:20:37 +02:00
Alex Root Junior
4008a3114d
Upgrade architecture + 5.0 Bot API (#469)
Upgrade architecture + 5.0 Bot API (#469)
* Moved `methods`, `types` and `client` to root package
* Removed update handler from routers to dispatcher
* Reworked events propagation mechanism to handlers
* Reworked inner middlewares logic (very small change)
* Updated to Bot API 5.0
* Initial migration from MkDocs to Sphinx + config for readthedocs
2021-01-26 21:20:52 +02:00
sabbyX
7ba153c7b1
HandlerObject: Unwrap handler before awaitable check (#435)
* Unwrap handler before awaitable check

* Remove unused 'type:ignore' comment

* Add wrapped handler tests
2020-10-04 18:26:34 +03:00
Alex Root Junior
b69bd74d0c Rename update_processing_context.py to user_context.py 2020-05-26 22:00:51 +03:00
Alex Root Junior
7f26ec9935 Implement new middlewares 2020-05-26 00:23:35 +03:00
mpa
9f4b76dabc tests(deprecated): quick fix add assert 2020-05-13 17:39:36 +04:00
mpa
c083fcd99a tests(deprecated):
add new check_deprecated context manager for version check, use mark.parametrize from pytest for observer deprecation tests
2020-05-12 16:07:16 +04:00
mpa
6cbf9cdde6 tests(deprecated-observer): clean code
remove empty possible func. add new condition for version major
2020-05-10 13:21:05 +04:00
mpa
4124770b0e refactor(handler): rename observers
Rename observers but with backward compatibility, relevant documentation
2020-05-10 03:02:31 +04:00
Alex Root Junior
01c6303d67 Add extensions for class-based error handler 2020-04-12 23:29:10 +03:00
Alex Root Junior
0fbd2819f9 Add filters and class based handler for errors 2020-04-12 23:20:44 +03:00
Alex Root Junior
9e673998f0 Errors handler 2020-04-12 22:13:25 +03:00
Alex Root Junior
5b6ec599b1 Add middlewares (API + Docs + Tests) 2020-04-12 20:27:32 +03:00
Alex Root Junior
82f89b9c1d Optimize events propagation by routers 2020-04-11 22:59:37 +03:00
Boger
a823e275a7 Merge BaseBot to Bot class 2020-03-25 15:36:19 +03:00
Alex Root Junior
0bd7fc2c7e Fix async test for py3.7 2020-02-22 23:12:42 +02:00
Alex Root Junior
eea75b8e9a Fix typing 2020-02-22 01:28:46 +02:00
Alex Root Junior
3f5c51e805 Add webhook feed method to Dispatcher 2020-02-22 00:59:10 +02:00
Alex Root Junior
3dd5530241 Propagate update to context in router 2020-01-26 02:34:32 +02:00
Alex Root Junior
4caa8faab8 Update tests 2020-01-25 18:26:30 +02:00
Alex Root Junior
ae55497842 Supports Bot API 4.6 (Broken tests) 2020-01-24 01:07:22 +02:00
jrootjunior
cfd869b797 Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x 2020-01-22 12:38:38 +02:00
Alex Root Junior
895b727ddf More class based handlers 2020-01-21 23:33:44 +02:00
jrootjunior
e43bc5b2fe More tests for commands filter 2020-01-21 17:32:36 +02:00
Alex Root Junior
b144332287 Allow to use regular values as the same with another sequences in filters 2020-01-15 23:34:33 +02:00
Alex Root Junior
42faee0178 Update filters typing and cover ContentTypesFilter 2020-01-13 21:17:53 +02:00
Alex Root Junior
9907eada32 Refactor EventObserver & TelegramEventObserver 2020-01-13 21:17:28 +02:00
Alex Root Junior
690223f4e0 Try prevent to attr-defined mypy error 2020-01-11 21:33:45 +02:00
Alex Root Junior
8e5cb067df Use AsyncMock with python 3.8 instead of asynctest 2020-01-11 21:15:46 +02:00
Alex Root Junior
e12aca9046 Move prepare_<field> to single module and add tests for default parse_mode 2019-12-26 01:35:21 +02:00
Alex Root Junior
a2cb637ed9 Make Dispatcher._run_polling public 2019-12-26 00:00:53 +02:00
Alex Root Junior
2529f6cf59 Reformat code 2019-12-15 22:01:53 +02:00
Alex Root Junior
9c2a3d1324 Move router validation to Router.parent_router 2019-12-15 22:01:13 +02:00