link2xt
ef4d2a7ed0
api!(python): use dc_contact_get_verifier_id()
...
get_verifier() returns a Contact rather than an address now
dc_contact_get_verifier_addr() is unused.
2023-09-30 15:49:22 +00:00
link2xt
d727d85f6d
chore(python): fix ruff 0.0.286 warnings
2023-08-25 20:57:44 +00:00
link2xt
81a7af10c7
chore(python): fix lint errors
2023-08-25 01:14:24 +00:00
link2xt
fbd2fc8ead
test: add test_webxdc_download_on_demand
...
The test checks that if webxdc update is too large to
download with the current `download_limit`,
it is applied afterwards when the user manually downloads the update message.
2023-07-21 21:23:44 +00:00
link2xt
740f43a2d6
fix: do not resync IMAP after initial configuration
...
If there was no previous `configured_addr`,
then there is no need to run IMAP resync.
2023-07-17 16:38:09 +00:00
link2xt
88759c815b
refactor(python): flatten the API of deltachat module
2023-07-03 16:19:31 +00:00
link2xt
437f8c48c4
api(python): make Contact.is_verified() return bool
2023-06-07 19:50:42 +00:00
link2xt
b2993242e4
docs(python): document pytest fixtures
...
These docstrings are displayed by `pytest --fixtures`
when `deltachat` package is installed from PyPI.
2023-06-05 18:34:27 +00:00
link2xt
fa87d2e225
New APIs for message processing loops
...
This patch adds new C APIs
dc_get_next_msgs() and dc_wait_next_msgs(),
and their JSON-RPC counterparts
get_next_msgs() and wait_next_msgs().
New configuration "last_msg_id"
tracks the last message ID processed by the bot.
get_next_msgs() returns message IDs above
the "last_msg_id".
wait_next_msgs() waits for new message notification
and calls get_next_msgs().
wait_next_msgs() can be used to build
a separate message processing loop
independent of the event loop.
Async Python API get_fresh_messages_in_arrival_order()
is deprecated in favor of get_next_messages().
Introduced Python APIs:
- Account.wait_next_incoming_message()
- Message.is_from_self()
- Message.is_from_device()
Introduced Rust APIs:
- Context.set_config_u32()
- Context.get_config_u32()
2023-04-15 21:27:45 +00:00
iequidoo
0a2200c2c8
python: Wait for initial Resync in the bot tests
2023-03-31 17:15:02 -03:00
link2xt
5db867cd1b
Add IMAP_INBOX_IDLE event
2023-03-22 20:20:37 +00:00
link2xt
7e5a8714a0
Add scripts/codespell.sh and spellcheck
2023-03-03 18:40:36 +00:00
link2xt
d1d43e889a
python: add more type annotations
2023-02-27 13:07:35 +00:00
link2xt
7bdf79dee5
python: do not shadow variables to fix pyright warnings
2023-02-27 13:07:35 +00:00
Robert Schütz
d3f4654d4b
python: replace pkg_resources with importlib.metadata
...
Use of pkg_resources is discouraged in favor of importlib.resources,
importlib.metadata, and their backports.
2023-02-21 21:32:12 -08:00
link2xt
48fee4fc92
python: replace "while 1" with "while True"
...
This makes pyright recognize that the function never returns implicitly.
2023-02-18 11:31:07 +00:00
link2xt
6ee165fddc
python: type annotations for testplugin.py
2023-02-16 17:48:29 +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
cd3f1fe874
python: autoformat with black
2023-02-15 17:15:43 +00:00
link2xt
4f68e94fb3
python: use f-strings instead of percent-encoding
2023-02-15 16:33:05 +00:00
link2xt
01653a881a
python: do not import print function
2023-02-15 16:28:16 +00:00
link2xt
e021a59b87
python: do not inherit from object
2023-02-15 16:27:34 +00:00
Asiel Díaz Benítez
48f098482e
Merge pull request #4023 from deltachat/adb/issue-2266
...
capture unexpected exceptions in EventThread
2023-02-11 22:00:02 -05:00
link2xt
6a30c0a997
Fix code style with black
2023-02-11 09:21:25 +00:00
link2xt
151b34ea79
python: handle NULL value returned from dc_get_msg
...
Returning None in this case and checked with mypy that callers can handle it.
2023-02-10 23:17:42 +00:00
adbenitez
3e8687e464
capture unexpected exceptions in EventThread
2023-02-10 14:43:32 -05:00
link2xt
817760a6ef
python: upgrade from .format() to f-strings
...
They are supported since Python 3.5.
2023-02-08 15:44:34 +00:00
link2xt
315e944b69
python: cut text in Message representation to 100 characters
2023-02-08 12:49:18 +00:00
missytake
e83fa8840b
python bindings account setup: remove deviation from default config
2023-01-30 17:46:13 +01: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
3b9a48ff5f
python: remove "data1=0" from INFO/WARNING/ERROR events display
2023-01-12 18:12:05 +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
Sebastian Klähn
c562d17925
Add verifier information ( #3839 )
...
* add verifier information
* cleanup
Co-authored-by: bjoern <r10s@b44t.com >
* finish name change
* simple improvements & new ffi
* fixs
Co-authored-by: bjoern <r10s@b44t.com >
Co-authored-by: septias <xxsebastian.kleahnxx@gmail.com >
2022-12-27 10:41:15 +00:00
holger krekel
bfddd3fc69
fix typo
2022-12-07 09:44:54 +01:00
link2xt
35cd81a75f
python: do not pass NULL to ffi.gc if the context can't be created
2022-12-07 09:44:54 +01:00
iequidoo
0b44886b62
Add a test for bug "Partially downloaded messages are received out of order" ( #3688 )
...
+ add Message.download_state property.
2022-11-23 23:51:50 +04:00
iequidoo
36991b5c8a
Add Python API to send reactions ( #3762 )
2022-11-23 23:51:50 +04:00
Hocuri
ffd57772e9
Add DC_EVENT_INCOMING_MSG_BUNCH event ( #3643 )
...
* Add DC_EVENT_INCOMING_MSG event
* Fix lots of compile errors
* Docs
* Changelog
* Fix python tests
Adding DC_EVENT_INCOMING_MSG_BUNCH made the python tests fail because they use `get_matching("DC_EVENT_INCOMING_MSG")`, which also matches DC_EVENT_INCOMING_MSG_BUNCH, so the tests got confused.
This fixes `get_matching()` to only match whole event names.
* Also fix test_ac_setup_message_twice()
The built regex was ^EVENT_NAME1|EVENT_NAME2$, which becomes parsed as
"^EVENT_NAME1" OR "EVENT_NAME2$". Introduce a group (parentheses) to fix
this.
* desktop will use DC_EVENT_INCOMING_MSG_BUNCH,
so I would not call it experimental anymore
* add generated node constants
* msg_ids in the event as Vec<u32>
number[] in js land
this is way more convinient than a json encoded string.
* Apply suggestions from code review
Co-authored-by: bjoern <r10s@b44t.com >
Co-authored-by: Simon Laux <mobile.info@simonlaux.de >
Co-authored-by: Simon Laux <Simon-Laux@users.noreply.github.com >
Co-authored-by: bjoern <r10s@b44t.com >
2022-11-06 17:17:48 +00:00
link2xt
5b518e588f
Remove StockMessage.action_by_contact() ( #3518 )
...
Use separate strings for "... by me" and "... by contact"
to make them easier to translate.
2022-09-11 20:38:34 +02:00
link2xt
40dc182295
python: move get_dc_event_name() to events
2022-09-10 21:22:38 +00:00
link2xt
839021f9eb
python: enable certificate checks in cloned accounts
2022-08-15 14:40:33 +00:00
missytake
9707f13a42
deprecated check whether account can be reconfigured
2022-08-15 01:07:42 +02:00
missytake
82d36e604c
don't raise an error if addr changes
2022-08-15 01:07:42 +02:00
missytake
64515786be
apparently lint likes long lines more than me
2022-07-25 21:56:14 +02:00
missytake
52a8ec48b7
move account initialization to separate function
2022-07-25 21:56:14 +02:00
link2xt
b88042a902
python: display configuration failure error
...
When configure fails, display error comment in pytest failure message.
2022-06-20 12:39:39 +00:00
adbenitez
a96a4362cd
add missing Message API
2022-06-10 07:57:17 -04:00
adbenitez
521d14a6e0
avoid exceptions when messages/contacts/chats are compared with None
2022-06-09 05:00:02 -04:00
Asiel Díaz Benítez
4f02c811a3
update python API ( #3394 )
2022-06-04 18:12:38 +02:00
adbenitez
17aab01eaa
apply black with new line-length == 120
2022-05-31 23:05:20 -04:00