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
Alex Root Junior
b78f1cdb17
Merge branch 'dev-3.x-unset_parse_mode' of https://github.com/b0g3r/aiogram into b0g3r-dev-3.x-unset_parse_mode
...
# Conflicts:
# aiogram/api/methods/base.py
# aiogram/api/methods/edit_message_caption.py
# aiogram/api/methods/edit_message_text.py
# aiogram/api/methods/send_animation.py
# aiogram/api/methods/send_audio.py
# aiogram/api/methods/send_document.py
# aiogram/api/methods/send_message.py
# aiogram/api/methods/send_photo.py
# aiogram/api/methods/send_video.py
# aiogram/api/methods/send_voice.py
# aiogram/api/types/__init__.py
# aiogram/api/types/inline_query_result_audio.py
# aiogram/api/types/inline_query_result_cached_audio.py
# aiogram/api/types/inline_query_result_cached_document.py
# aiogram/api/types/inline_query_result_cached_gif.py
# aiogram/api/types/inline_query_result_cached_mpeg4_gif.py
# aiogram/api/types/inline_query_result_cached_photo.py
# aiogram/api/types/inline_query_result_cached_video.py
# aiogram/api/types/inline_query_result_cached_voice.py
# aiogram/api/types/inline_query_result_document.py
# aiogram/api/types/inline_query_result_gif.py
# aiogram/api/types/inline_query_result_mpeg4_gif.py
# aiogram/api/types/inline_query_result_photo.py
# aiogram/api/types/inline_query_result_video.py
# aiogram/api/types/inline_query_result_voice.py
# aiogram/api/types/input_media_animation.py
# aiogram/api/types/input_media_audio.py
# aiogram/api/types/input_media_document.py
# aiogram/api/types/input_media_photo.py
# aiogram/api/types/input_media_video.py
# aiogram/api/types/input_text_message_content.py
2020-06-14 16:27:39 +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
lyteloli
9f11afda5b
Added fields to ChatMember ( #340 )
...
* Added fields to ChatMember
* Added ChatMemberStatus helper
2020-05-29 22:28:12 +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
Alex Root Junior
7f26ec9935
Implement new middlewares
2020-05-26 00:23:35 +03:00
Gabben
b04a14072e
Improving test_pre_checkout_query
2020-05-17 17:05:30 +05:00
Gabben
a6f83599c8
Improving test_inline_query
2020-05-17 17:03:35 +05:00
Gabben
66ecc6996d
Improving test_callback_query
2020-05-17 17:01:06 +05:00
Gabben
56df3f0ba8
Update test_shipping_query.py
2020-05-17 17:00:25 +05:00
Gabben
c5e0742337
Improving test_shipping_query
2020-05-17 16:58:15 +05:00
Gabben
83730276bc
Add ShippingQuery.answer
2020-05-17 16:50:49 +05:00
Gabben
cf12da0c4a
Add PreCheckoutQuery.answer
2020-05-17 16:40:26 +05:00
Gabben
65002b9280
Add InlineQuery.answer
2020-05-17 16:24:42 +05:00
Gabben
6bba2da814
Add CallbackQuery.answer
2020-05-17 15:42:04 +05:00
mpa
9bd981726f
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x-deprecate-handlers
2020-05-10 03:12:42 +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
05dd42712d
Merge pull request #318 from aiogram/dev-3.x-refactor-sessions
...
Dev 3.x refactor sessions
2020-05-09 23:49:54 +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
Alex Root Junior
6be0b36305
Dev 3.x api 4.8 ( #317 )
...
* AIOG-T-20 Bot API 4.8
* AIOG-T-20 Update aliases
* AIOG-T-20 Add parse mode passing in sendPoll method
* AIOG-T-20 Small changes in docs
* AIOG-T-20 Revert overriding remove keyboard default value and add tests
* AIOG-T-20 Bot API 4.8
2020-05-02 23:01:32 +03: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
Alex Root Junior
5b6ec599b1
Add middlewares (API + Docs + Tests)
2020-04-12 20:27:32 +03:00
Dima Boger
023245c76b
✨ Add sentinel value for parse_mode which can be None itself
...
Resolves #302 . We decided to use sentinel pattern (https://python-patterns.guide/python/sentinel-object/ ) as a solution, but got a few problems with plain `object()`, so instead we use unittest.mock.sentinel and we hope it won't cause side effects.
Most of work done via tg-codegen (https://github.com/aiogram/tg-codegen/pull/1 ), so it's good to review only implementation of sentinel, processing sentinel in `prepare_parse_mode`, changes in base method model and little test fixes.
2020-04-12 19:37:01 +03:00
Alex Root Junior
33003f2026
Add support of Bot API 4.7. Bump version
2020-04-11 20:15:03 +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
Alex Root Junior
a41bccddf9
Merge remote-tracking branch 'origin/dev-3.x-download' into dev-3.x
2020-02-02 22:53:55 +02:00
Alex Root Junior
3e99cb7e5d
Add aliases to Message object (No docs)
2020-01-26 02:34:57 +02:00
Alex Root Junior
4caa8faab8
Update tests
2020-01-25 18:26:30 +02: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
d2d4f337fb
Update tests
2020-01-11 19:56:38 +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
6ee05fb901
Add tests for content types
2019-12-11 21:31:31 +02:00
Alex Root Junior
db397e3a05
Rework polling and start covering
2019-12-10 01:14:58 +02:00
jrootjunior
9d78e82f8c
Cover Command filter
2019-12-04 18:04:29 +02:00
jrootjunior
aa7c5796dd
Add default parse mode
2019-12-03 13:10:09 +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