Alex Root Junior
2620a6547c
Rework session DI and files path wrapper
2021-12-12 18:15:36 +02:00
darksidecat
99c99cec78
Add middleware for logging outgoing requests ( #716 )
...
* add middleware for logging outgoing requests
* add middleware description
* fix RequestMiddlewareType callable signature
* undo `fix`, update signatures in tests
* remove repeating code
* accept proposed changes
Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
* update tests
* add patchnote
Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2021-10-06 00:57:26 +03:00
Alex Root Junior
e4046095d7
Dev 3.x i18n & improvements ( #696 )
...
* Added base code and make code improvements
* Auto-exclude coverage for `if TYPE_CHECKING:`
* Fixed current coverage
* Cover I18n module
* Update pipeline
* Fixed annotations
* Added docs
* Move exceptions
* Added tests for KeyboardBuilder and initial docs
* Remove help generator (removed from sources tree, requires rewrite)
* Added patch-notes #698 , #699 , #700 , #701 , #702 , #703
2021-09-22 00:52:38 +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
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
f022b4441c
Added more aliases, refactor CallbackData factory, added base exceptions classification mechanism
2021-05-25 00:56:44 +03:00
Alex Root Junior
322a98bc1b
More docs
2021-02-07 18:43:43 +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
Martin Winks
566b7ff282
fix(aiohttp-session): respect UNSET sentinel ( #387 )
...
* fix(aiohttp-session): respect UNSET sentinel
check if value is `UNSET` while building http request.
* Cover UNSET by tests
Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2021-01-25 01:00:06 +02:00
Alex Root Junior
f5684aef07
Update default parse_mode propagation.
2020-06-14 18:18:29 +03:00
Alex Root Junior
7844a663a9
Bump Telegram Bot API version
...
Change request timeout mechanism
Bump package version
2020-06-14 17:14:10 +03:00
Martin Winks
aed3642385
feat(helpers): implement new descriptor with default value getter ( #336 )
...
* feat(helpers): implement new descriptor with default value getter
* perf(descriptor): use weakref
refuse weak reference to a value in WeakRefDict instead of polluting instance namespace
* chore(descriptor): rename descriptor class
rename `DefaultProperty` to `Default`
* style(fmt): lint code
2020-05-31 18:01:28 +03:00
Gabben
de3c5c1a8d
Download feature and URLInputFile ( #332 )
...
* Fix How to upload docs
* Rename BaseBot to Bot
* Add download_file method
* Add download method
* Add URLInputFile
* Add Downloadable to __init__ and __all__
* Fix ImportError for Python 3.7
* Related pages
* Improving docs
* Some speed
* staticmethod to classmethod
2020-05-27 01:25:13 +03:00
mpa
df4ba87dfc
feat(timeout):
...
implement (class-bound, instance-bound, request-bound) session timeout
for requests. fix docs config, fix aiohttp session docs links.
2020-05-06 02:42:54 +04:00
mpa
2adc19724d
refactor(props):
...
simplify some descriptors with tests for them, remove silly "nocovers"
2020-05-06 00:04:50 +04:00
mpa
ea6a02bf97
refactor(sessions):
...
remove BaseSession's initializer, add timeout ommitable field to base
method model
2020-05-03 00:53:25 +04:00
Martin Winks
15bcc0ba9f
feat(proxy): proxy for aiohttp,base sessions ( #284 )
...
* feat(proxy): proxy for aiohttp,base sessions
Add support for proxies in aiohttp session with aiohttp_socks library,
edit BaseSession class to support proxies for other sessions in future.
* fix(annotation): missing underscore before "private" typevar
* chore: remove redundant of proxy_url schema for socks version
* test: add missing test
Add missing test, remove BaseSession.cfg and switch to
implementing class' "private" traits, add aiohttp_socks in dependency list as
optional and extra.
* feat(session):
Implement asyncio session for requests [wip]
* feat(proxy chain): Chained proxy support in aiohttp session
Add ChainProxyConnector support, !pin pydantic to "1.4", add
documentation on aiohttp connector.
* style(mypy): apply linter changes
* tests(mock): remove await for magic mock
* fix dangling dependency
* refactor(generic):
get rid of generic behaviour for base session
2020-05-02 16:12:53 +03:00
Boger
23c632b37b
Fix style errors
2020-03-25 15:57:25 +03:00
Boger
a823e275a7
Merge BaseBot to Bot class
2020-03-25 15:36:19 +03:00
Boger
fac69e52b7
💩 First iteration
2020-03-18 18:15:49 +03:00
gabbhack
26708154b0
Implement stream_content in AiohttpSession and add tests
2020-01-22 22:55:34 +05:00
gabbhack
7ab0db7991
Add stream_content to BaseSession and add tests
2020-01-22 22:54:29 +05:00
Alex Root Junior
d37a7f0a0d
Cleanup
2020-01-13 21:34:50 +02:00
Alex Root Junior
b61cc04e9a
Remove kwargs copy in TelegramEventObserver.trigger and remove __deepcopy__ method from AiohttpSession
2020-01-13 21:30:06 +02:00
Alex Root Junior
3b2df194a9
Reformat code and docs
2020-01-11 22:59:14 +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
db397e3a05
Rework polling and start covering
2019-12-10 01:14:58 +02:00
Alex Root Junior
e37395b161
Maximum coverage
2019-11-28 23:52:02 +02:00
Alex Root Junior
c674b5547b
Add token validation util, fix deepcopy of sessions and make bot hashable and comparable
2019-11-28 23:12:44 +02:00
jrootjunior
cd12b54ec2
Cover BaseBot context manager
2019-11-26 11:13:48 +02:00
Alex Root Junior
0acdb24c3c
No cover if TYPE_CHECKING
2019-11-23 17:03:14 +02:00
Alex Root Junior
7d1c4dcca8
Fix tests for base session with different timezones
2019-11-17 23:47:52 +02:00
Alex Root Junior
3a43ffc570
Add tests for BaseBot
2019-11-17 23:37:24 +02:00
Alex Root Junior
a46cd6d001
Small refactoring of telegram api server
2019-11-17 22:20:29 +02:00
Alex Root Junior
0e35b6f55e
More tests for session
2019-11-17 01:12:39 +02:00
Alex Root Junior
7dc2a0ddaf
Update tests and small refactoring
2019-11-16 22:32:26 +02:00
Alex Root Junior
a24708d589
Add tests for BaseSession and TelegramAPIServer
2019-11-16 00:52:18 +02:00