link2xt
40d32f2d0c
Do not use IDLE in test_fetch_existing_msgs_group_and_single
...
Makes the test less flaky,
as Dovecot sometimes sends only the EXISTS response,
but not the FETCH response for flags.
2023-03-24 16:09:28 +00:00
link2xt
c9ec087cd8
python: do not use IDLE in test_markseen_message_and_mdn test
...
Make the test less flaky in case Dovecot notifies only about EXISTS
but not flag updates.
2023-03-24 16:09:15 +00:00
link2xt
84d79e1479
Do not use IDLE in test_mdn_asymmetric
...
Fixes test flakyness.
2023-03-24 16:08:58 +00:00
link2xt
ded1634b7d
python: look for "Marked messages ... as seen." by regexp
...
Tests reuse accounts, so UIDs may start from the number other than 1.
2023-03-24 09:43:59 +00:00
link2xt
635c73ffc6
python: use locally installed auditwheel
...
`auditwheel` is a part of manylinux images,
there is no need to create a virtual environment
and install it again.
2023-03-23 23:00:46 +00:00
link2xt
fcc1fe73be
Do not use .wait_for_seen() in test_one_account_send_bcc_setting
...
.wait_for_seen() is unreliable, because sometimes Dovecot
sends only EXISTS to the IDLE connection, but not the FETCH.
Dovecot sends updates like FETCH only if some
connection has already observed the message in previous state
without the \Seen flag.
To avoid this race condition, wait until the core sets the flag,
then FETCH the message manually and check that the flag is set.
2023-03-23 22:57:35 +00:00
link2xt
fb88f2e6ab
Reintroduce pytest-rerunfailures
...
Tests on GitHub Actions are very flaky recently.
2023-03-22 20:39:35 +00:00
link2xt
5db867cd1b
Add IMAP_INBOX_IDLE event
2023-03-22 20:20:37 +00:00
link2xt
e04efdbd94
tox: quiet noisy message from black
2023-03-20 17:57:38 +00:00
link2xt
6fbcf67190
python: revert ruff C4 -> C40 change
...
It is an error in ruff 0.0.255, will be fixed in the next version:
a8c1915e2e
2023-03-14 09:37:03 +00:00
link2xt
90d2333818
python: update for latest ruff 0.0.255
2023-03-13 22:31:50 +00:00
link2xt
5805f99acd
Test calling dc_context_unref() during dc_configure()
...
dc_configure() spawns a background configuration process.
It should increase the number of context references
so even if we unref the context, it is not dropped
until the end of the configuration process.
Currently running the test
with `pytest tests/test_1_online.py::test_configure_unref`
results in segmentation fault.
2023-03-13 16:17:40 +00:00
link2xt
7e5a8714a0
Add scripts/codespell.sh and spellcheck
2023-03-03 18:40:36 +00:00
iequidoo
b149df1993
test_{delete,trash}_multiple_messages: Continue waiting for events if not all messages disappeared
2023-02-28 15:05:47 -03: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
link2xt
c8ce4ce5aa
Switch to "vX.Y.Z" tagging scheme
...
Previously we used tags like "1.109.0" and "py-1.109.0".
Since Python bindings are always released
at the same time as the core,
it is easier to use a single tag for them.
"v" prefix is added to make matching by "v*" easier
in CI and scripts.
2023-02-24 16:48:37 +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
iequidoo
604c4fcb71
Delete messages to the Trash folder for Gmail by default ( #3957 )
...
Gmail archives messages marked as `\Deleted` by default if those messages aren't in the Trash. But
if move them to the Trash instead, they will be auto-deleted in 30 days.
2023-02-20 14:09:27 -03:00
link2xt
42a7e91f05
python: stop using pytest-rerunfailures
2023-02-19 21:55:28 +00: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
7a6bfae93b
Fix typo
2023-02-16 11:42:59 +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
b3ecbbc8b3
python: do not import print function in tests
2023-02-15 16:32:19 +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
d1702e3081
python: display the diff on black failures
2023-02-11 09:13:42 +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
link2xt
f2f5bfd17c
Fix python file code style
...
New version of `black` complains otherwise.
2023-02-01 16:10:08 +00:00
missytake
e83fa8840b
python bindings account setup: remove deviation from default config
2023-01-30 17:46:13 +01:00
iequidoo
4c5ed3df2c
Add a test for verified groups with multiple devices on a joining side ( #3836 )
...
There was the following bug:
- Bob has two devices, the second is offline.
- Alice creates a verified group and sends a QR invitation to Bob.
- Bob joins the group.
- Bob's second devices goes online, but sees a contact request instead of the verified group.
- The "member added" message is not a system message but a plain text message.
- Sending a message fails as the key is missing -- message info says "proper enc-key for <Alice>
missing, cannot encrypt".
2023-01-25 20:28:49 -03: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
iequidoo
3cf78749df
Emit DC_EVENT_MSGS_CHANGED for DC_CHAT_ID_ARCHIVED_LINK when the number of archived chats with
...
unread messages increases (#3940 )
2023-01-16 16:05:47 -03:00
iequidoo
5f883a4445
Prepare to remove "vc-contact-confirm-received", "vg-member-added-received" messages from Securejoin
...
protocol
2023-01-12 15:13:30 -03:00
iequidoo
57d7df530b
Add a test that a new verified member is seen on the second device going online ( #3836 )
...
- Alice has two devices, the second is offline.
- Alice creates a verified group and sends a QR invitation to Bob.
- Bob joins the group and sends a message there. Alice sees it.
- Alice's second devices goes online, but doesn't see Bob in the group.
2023-01-12 15:13:30 -03:00
link2xt
3b9a48ff5f
python: remove "data1=0" from INFO/WARNING/ERROR events display
2023-01-12 18:12:05 +00:00
link2xt
e215b4d919
Return Option from Contact::add_or_lookup()
...
This allows to distinguish exceptions,
such as database errors, from invalid user input.
For example, if the From: field of the message
does not look like an email address, the mail
should be ignored. But if there is a database
failure while writing a new contact for the address,
this error should be bubbled up.
2023-01-10 20:43:20 +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
Rafael Diniz
4e943d52e4
Add mappings for some file types to Viewtype / MIME type
...
Namely: ppt, pptx, xls, heif, heic, avif, txt.
But use Viewtype::File for medias without uniform support on all platforms.
2022-12-29 08:37:31 -03: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
link2xt
6d2b2ac5f9
python: pass DC_RS_DEV and DC_RS_TARGET into auditwheels env
...
Otherwise python binding wheels fail to build with tox 4.0.
2022-12-23 17:28:14 +00:00
link2xt
585a6f15a6
python: do not use isort 5.11.0
2022-12-12 20:43:28 +00:00