link2xt
7e5a8714a0
Add scripts/codespell.sh and spellcheck
2023-03-03 18:40:36 +00:00
adbenitez
f0a2ca7815
send_msg(): return only msg_id
2023-02-26 22:50:24 -05:00
Asiel Díaz Benítez
ad3c7136ec
Merge branch 'master' into adb/add-send-msg
2023-02-26 05:14:12 -05:00
adbenitez
79026f93b6
add more advanced API to send a message
2023-02-26 05:13:20 -05:00
link2xt
ee81d61988
Fix ruff warnings
2023-02-23 01:31:09 +00:00
link2xt
42a18d4d0d
Unpin ruff version
...
False positive is fixed in the latest version.
2023-02-22 11:27:37 +00:00
link2xt
c01a2f2c24
Fix missing imports in deltachat_rpc_client
2023-02-21 12:21:17 +00:00
link2xt
05a274a5f3
Enable more ruff checks in deltachat-rpc-client
2023-02-21 11:17:10 +00:00
link2xt
f07206bd6c
Pin ruff version in deltachat-rpc-client
...
Latest versions 0.0.248 and 0.0.249 report false positive:
src/deltachat_rpc_client/client.py:105:9: RET503 [*] Missing explicit `return` at the end of function able to return
2023-02-20 19:57:54 +00:00
link2xt
032da4fb1a
python: add py.typed file
...
It marks the package as supporting typing according to PEP 561 <https://peps.python.org/pep-0561/ >
Also remove zip-safe option from setuptools configuration for deltachat-rpc-client.
It is deprecated in setuptools and not used for wheel package format according to <https://setuptools.pypa.io/en/latest/deprecated/zip_safe.html >
2023-02-15 18:56:34 +00:00
link2xt
243f28f8a5
python: use dataclasses to reduce boilerplate
2023-02-15 12:35:52 +00:00
link2xt
78577594d0
deltachat-rpc-server: spawn request handlers
2023-02-15 12:19:03 +00:00
link2xt
6c8368fa23
jsonrpc: add API to check if the message is sent by a bot
...
Co-Authored-By: Asiel Díaz Benítez <asieldbenitez@gmail.com >
2023-02-12 18:53:26 +00:00
link2xt
1c875209f7
python: create test accounts in parallel
2023-02-12 18:50:01 +00:00
link2xt
af5a3235fd
python: save references to asyncio tasks to avoid GC
...
Otherwise the task may be garbage collected
and cancelled.
See <https://docs.python.org/3/library/asyncio-task.html#asyncio.create_task > for reference.
2023-02-12 15:13:54 +00:00
link2xt
07c510c178
Remove bitflags from get_chat_msgs() interface
...
get_chat_msgs() function is split into new get_chat_msgs() without flags
and get_chat_msgs_ex() which accepts booleans instead of bitflags.
FFI call dc_get_chat_msgs() is still using bitflags for compatibility.
JSON-RPC calls get_message_ids() and get_message_list_items()
accept booleans instead of bitflags now.
2023-02-12 15:11:04 +00:00
link2xt
d1702e3081
python: display the diff on black failures
2023-02-11 09:13:42 +00:00
link2xt
cd293e6f49
Update async-smtp to 0.8
2023-02-03 11:36:58 +00:00
link2xt
fac7b064b4
Refine Python CI
...
Add lint environment to `deltachat-rpc-client/`
and set line length to 120, same as in `python/`.
Switch from flake8 to ruff.
Fix ruff warnings.
2023-01-20 16:53:21 +00:00
link2xt
f4c674fa98
python: set reasonable timeouts for account requests
...
`requests` library does not have a timeout at all by default.
2023-01-06 11:43:55 +00:00
link2xt
5b3596987b
Test that STARTTLS connection works
2023-01-02 22:11:09 +00:00
adbenitez
cf1d6919bf
allow to pass string as update for objects that don't support default json.dump() conversion
2022-12-26 18:34:55 -05:00
adbenitez
4b15f960e1
make get_contact_by_id non-async
2022-12-26 18:26:14 -05:00
link2xt
f92b8dcec0
deltachat_rpc_client: add webxdc API
2022-12-26 22:34:19 +00:00
link2xt
9734552da5
deltachat_rpc_client: make get_{chat,message}_by_id non-async
2022-12-26 22:24:45 +00:00
adbenitez
adf754ad32
add more high-level event filters
2022-12-21 13:26:59 -05:00
adbenitez
2ebd3f54e6
add Client.run_until()
2022-12-21 13:26:59 -05:00
adbenitez
be63e18ebf
improve hook filters
2022-12-21 13:26:58 -05:00
link2xt
5922fb38da
Store relative accounts path in accounts.toml
...
This makes it possible to move accounts dir, especially useful for bots.
2022-12-20 12:26:20 +00:00
link2xt
2a2db4f526
Remove unused pytest-async plugin
...
We use pytest-asyncio instead
2022-12-13 17:13:19 +00:00
adbenitez
9645101de2
add SystemMessageType and ViewType
2022-12-10 13:44:42 -05:00
adbenitez
c1bbd6e766
fix tests
2022-12-10 13:44:21 -05:00
adbenitez
0a4c8a40ba
solve review comments
2022-12-09 12:52:01 -05:00
adbenitez
c49743d38c
add more tests
2022-12-09 12:52:01 -05:00
adbenitez
a9afc1e6ba
add more high-level methods and event hooking
2022-12-09 12:52:01 -05:00
link2xt
f5cb56fd86
Fix deltachat-rpc-server tests for tox 4
2022-12-09 17:23:20 +00:00
link2xt
5502bff986
Make _args and _kwargs private in Rpc
2022-12-04 14:03:59 +00:00
link2xt
ee19789cac
Make _rpc private
2022-12-04 14:03:43 +00:00
link2xt
3cdbe213a3
python: rename Deltachat class into DeltaChat
2022-12-04 13:56:53 +00:00
link2xt
2ccf39800d
Remove start_rpc_server() and make Rpc a context manager
...
Rpc now has a start() method.
This way it is possible to use Rpc from IPython without calling __aenter__()
2022-12-04 00:02:32 +00:00
link2xt
5a3065344e
Properly terminate Rpc and remove sleep() hack
2022-12-03 23:30:50 +00:00
link2xt
98b6b5e3f6
Update instructions on using ipython
2022-12-03 18:37:02 +00:00
adbenitez
29a4404257
enably type-checking in tests
2022-12-01 20:33:05 -05:00
adbenitez
24db29f526
Merge remote-tracking branch 'upstream/link2xt/async-jsonrpc-client' into adb/async-jsonrpc-client
2022-12-01 20:32:36 -05:00
link2xt
85b4746516
Turn start_rpc_server into a context manager
2022-12-01 16:36:36 +00:00
adbenitez
d17ac9c83c
add start_rpc_server() doc string
2022-12-01 03:34:43 -05:00
adbenitez
e6ff513aac
add support for PEP 561
2022-12-01 03:15:25 -05:00
adbenitez
ffbfeab977
add pytest plugin
2022-12-01 03:09:23 -05:00
adbenitez
09db062958
fix bug in Rpc.__getattr__()
2022-12-01 02:36:55 -05:00
adbenitez
ab7732d9ae
fix type hint in rpc.py
2022-12-01 02:26:50 -05:00