holger krekel
83346722fd
- simplify and clarify dc_msg caching for Message object
...
- merge state class into Message object proper -- one less intermediate object to worry about for callers
2019-07-26 08:57:31 +02:00
holger krekel
9836e73683
- properly support prepare-msg API and implement get_message_info()
...
- remove usage of "attr.s" across the code
- make msg.set_file() copy a file into blobdir if it isn't already
- regroup tests
- add set_draft/get_draft API
2019-07-26 08:57:31 +02:00
Alexander Krotov
c7ebf6de09
cargo fmt
2019-07-25 23:32:17 +02:00
Alexander Krotov
2f204fd2aa
Simplify dc_simplify_t implementation
...
- Replace dc_simplify_new and dc_simplify_unref with ::new()
- Move dc_simplify_simplify and dc_simplify_simplify_plain_text into impl
2019-07-25 23:32:17 +02:00
holger krekel
63ed5c4009
re-enable devpi uploads
2019-07-25 22:46:27 +02:00
Alexander Krotov
9f75a5049e
dc_location: store marker as Option<String> instead of C string
2019-07-25 22:41:33 +02:00
Alexander Krotov
ec6cc5c355
Allocate dc_kml_t in a rusty way
2019-07-25 22:41:33 +02:00
Alexander Krotov
b0ef825e67
Implement dc_location::new() and dc_kml_t::new()
2019-07-25 22:41:33 +02:00
Alexander Krotov
a791f76e4b
Rename _dc_location into dc_location
2019-07-25 22:41:33 +02:00
holger krekel
2cf227571a
pure cargo fmt
2019-07-25 21:51:39 +02:00
holger krekel
9a9b49f8f0
- remove current_block logic from dc_chat.rs with the "OK_TO_CONTINUE"
...
pattern -- re-indentation will come after this commit with a pure application of "cargo fmt"
- bring back comment from C code
- make some path helpers return bool
2019-07-25 21:51:39 +02:00
holger krekel
9d87f2f10b
carefully replace msg state and type numbers with DC_MSG_* and DC_STATE_* constants and also declare them as i32 to avoid tons of casts
2019-07-25 09:45:04 +02:00
holger krekel
5de7c35622
disable upload to devpi as it's currently down and unncessarily braks PR testing
2019-07-24 14:10:29 +02:00
Dmitry Bogatov
004cdf6491
Improve punctuation of message, printed by "repl" program
...
This patch changes output of following command (from README.md)
$ cargo run --example repl -- /tmp/main.db
from
First time init: creating tables in ""/tmp/main.db""
[...]
Opened ""/tmp/main.db"".
to
First time init: creating tables in "/tmp/main.db"
[...]
Opened "/tmp/main.db".
Note lack of double quotation mark, which was confusing and could have been
interpreted as part of file name.
2019-07-24 11:36:51 +02:00
Dmitry Bogatov
72ad8b5199
Improve error handling in dc_send_text_msg()
...
Previously, dc_send_text_msg() silently returned 0 in case of incorrect
input. This way "send" command in repl reported "Sending failed" without
any clue what exactly went wrong.
2019-07-24 09:52:17 +02:00
Alexander Krotov
cb75ac3842
Remove dc_location_t
...
dc_location_t is an incomplete copy of _dc_location
The difference is that it lacks `int independent` field.
As a result, calloc did not allocate memory for this field.
deltachat-core (C version) has only one dc_location_t, that includes the last field.
2019-07-24 09:37:04 +02:00
Alexander Krotov
a5553f98af
dc_location.rs: rewrite is_marker in safe Rust
2019-07-24 09:16:44 +02:00
Alexander Krotov
648d3d78aa
Remove dc_arr_to_string function that was used only once
2019-07-23 10:09:52 +02:00
holger krekel
afcf48f833
add test, fix and high level python api for dc_delete_contact
...
the rust-logic was inverted -- you can not delete a contact that still has messages with it.
2019-07-23 09:37:21 +02:00
holger krekel
6f79800824
fix last two warnings
2019-07-22 11:45:41 +02:00
holger krekel
7a19963879
properly fix the QueryReturnedNoRows warning and rustfmt
2019-07-22 11:18:30 +02:00
holger krekel
cd7630360f
fix fmt
2019-07-22 02:33:08 +02:00
holger krekel
4a633169e1
Merge branch 'master' into flub-nowarn
2019-07-22 01:40:56 +02:00
Floris Bruynooghe
ea8d6e8ff0
Write a deltachat.pc file at build time
...
This is writes pkg-config/deltachat.pc file in the target directory,
using the PREFIX environment variable at build time. If this is
undefined at build time /usr/local is used.
2019-07-22 01:16:34 +02:00
holger krekel
065124b93b
Merge branch 'master' into flub-param-names
2019-07-22 01:11:47 +02:00
holger krekel
86d290832b
Merge branch 'master' into flub-py-glue-fixes
2019-07-22 01:09:58 +02:00
Alexander Krotov
56f8717a40
Show AutocryptSetupMessage independently of show-emails settings
...
Fixes #161
2019-07-22 00:45:17 +02:00
Alexander Krotov
4a0b2e68c8
Add DC_CMD_* constants
2019-07-22 00:45:17 +02:00
holger krekel
2576b78126
Merge branch 'master' into flub-py-glue-fixes
2019-07-22 00:39:47 +02:00
holger krekel
6a956b6008
Merge branch 'master' into flub-param-names
2019-07-22 00:36:52 +02:00
Alexander Krotov
33575e7aa3
dc_get_abs_path cleanup
2019-07-21 23:40:29 +02:00
holger krekel
8089559958
Squashed commit of the following:
...
commit 6bc5d1b90e
Author: holger krekel <holger@merlinux.eu >
Date: Sun Jul 21 22:56:37 2019 +0200
fix fmt
commit 197d94ad9d
Merge: 7ce337c 686678c
Author: holger krekel <holger@merlinux.eu >
Date: Sun Jul 21 22:51:16 2019 +0200
Merge remote-tracking branch 'origin/master' into eventlogging
commit 7ce337c6d0
Author: holger krekel <holger@merlinux.eu >
Date: Sun Jul 21 22:44:27 2019 +0200
left-over error logging
commit 10148d2e43
Author: holger krekel <holger@merlinux.eu >
Date: Sun Jul 21 22:03:17 2019 +0200
ignore non-utf8 parts of header fields (add comment why it shouldn't happen)
don't throw error if no sql rows are returned
commit 69dc237ee3
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Sun Jul 21 12:56:04 2019 +0200
fix(receive_imf): remove recursive sql call
commit df5464ea80
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Sat Jul 20 17:05:24 2019 +0200
fix: blocked is an optional value
commit e4bf9956a5
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Sat Jul 20 16:50:56 2019 +0200
fix(msg): handle optional in_reply_to
commit d353d9d9d8
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Sat Jul 20 16:17:25 2019 +0200
fix(chat): remove recursive sql usage
commit 1ad45ed4d6
Author: holger krekel <holger@merlinux.eu >
Date: Sat Jul 20 15:14:11 2019 +0200
fix rust fmt
commit 496e980a17
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Sat Jul 20 14:34:20 2019 +0200
use forked rusqlite
commit fa09e46ed9
Author: holger krekel <holger@merlinux.eu >
Date: Sat Jul 20 12:37:51 2019 +0200
another pace where we might (and in my case did) get invalid utf8
commit d6de420b9a
Author: holger krekel <holger@merlinux.eu >
Date: Sat Jul 20 12:30:48 2019 +0200
fix some string issues, introduce to_string_lossy such that to_string() continues to panic on non-utf8
commit 38eb708db8
Author: holger krekel <holger@merlinux.eu >
Date: Sat Jul 20 01:17:53 2019 +0200
for now make to_string() less strict as we often don't want to crash the whole app just because some non-proper utf8 came in (through a message we can't neccesarily congtrol)
commit 7a59da5f8f
Author: holger krekel <holger@merlinux.eu >
Date: Fri Jul 19 22:48:39 2019 +0200
fix linting
commit f13a1d4a2f
Author: holger krekel <holger@merlinux.eu >
Date: Fri Jul 19 22:46:58 2019 +0200
fix some test flakyness
commit 7b3a450918
Author: holger krekel <holger@merlinux.eu >
Date: Fri Jul 19 22:35:07 2019 +0200
- fix saved_mime test which broke to improper conversion of
imf_raw_not_terminated
- some cargo.toml updates no clue where they come from
- log Message-ID for received messages
commit 169923b102
Author: holger krekel <holger@merlinux.eu >
Date: Fri Jul 19 12:31:22 2019 +0200
formatting
commit 42688a0622
Author: holger krekel <holger@merlinux.eu >
Date: Fri Jul 19 12:24:56 2019 +0200
remove some print statements
commit 35f3c0edd1
Merge: e7a2362 f58b1d6
Author: holger krekel <holger@merlinux.eu >
Date: Fri Jul 19 10:25:21 2019 +0200
Merge branch 'master' into eventlogging
commit e7a236264a
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Thu Jul 18 23:20:20 2019 +0200
print invalid strings
commit aaa5b820d9
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Thu Jul 18 23:12:35 2019 +0200
cleanup
commit e7f0745010
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Thu Jul 18 23:03:57 2019 +0200
reduce direc usage of CString
commit c68e7ae14e
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Thu Jul 18 22:47:47 2019 +0200
audit use of to_cstring and fix ub
commit 618087e5a7
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Thu Jul 18 21:38:52 2019 +0200
fix(imap): body ptr lifetime
commit 245abb8384
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Thu Jul 18 19:44:10 2019 +0200
remove debug
commit a3e1042001
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Thu Jul 18 18:30:54 2019 +0200
fix some things, add more debugging statements
commit 7b7ce9348f
Author: holger krekel <holger@merlinux.eu >
Date: Thu Jul 18 15:11:57 2019 +0200
fix python lint issues
commit 7a4808ba0d
Author: holger krekel <holger@merlinux.eu >
Date: Thu Jul 18 14:35:54 2019 +0200
cargofmt
commit 8f240f7153
Author: holger krekel <holger@merlinux.eu >
Date: Thu Jul 18 14:03:57 2019 +0200
(dig,hpk) pull out job collection from sql query/lock logic
commit 7d0b5d8abb
Author: holger krekel <holger@merlinux.eu >
Date: Thu Jul 18 12:52:02 2019 +0200
remove print statements and fix a crash
commit ee317cb1b5
Author: holger krekel <holger@merlinux.eu >
Date: Thu Jul 18 11:38:10 2019 +0200
fix some merge issues
commit 7b736fe635
Author: holger krekel <holger@merlinux.eu >
Date: Thu Jul 18 11:16:38 2019 +0200
(dig,hpk) add test and fix for wrong dbs
commit c7db15352a
Merge: 0b37167 0c5015d
Author: holger krekel <holger@merlinux.eu >
Date: Thu Jul 18 09:59:44 2019 +0200
Merge branch 'master' into eventlogging
commit 0b37167be8
Author: holger krekel <holger@merlinux.eu >
Date: Thu Jul 18 00:06:05 2019 +0200
address @dignifiedquire comments
commit 5cac4b5076
Author: holger krekel <holger@merlinux.eu >
Date: Wed Jul 17 12:47:22 2019 +0200
remove spurious print
commit 475a41beb3
Author: holger krekel <holger@merlinux.eu >
Date: Wed Jul 17 12:31:12 2019 +0200
address @dignifiedquire rustyness comment and fix changelog
commit ad4be80b4e
Author: holger krekel <holger@merlinux.eu >
Date: Wed Jul 17 10:25:25 2019 +0200
make smtp/imap connect() return bool instead of c-int
commit 8737c1d142
Author: holger krekel <holger@merlinux.eu >
Date: Wed Jul 17 09:26:33 2019 +0200
cleanup some parts, add comments
commit 964fe466cc
Author: holger krekel <holger@merlinux.eu >
Date: Tue Jul 16 20:05:41 2019 +0200
wip-commit which passes all tests with proper finalization
commit 43936e7db7
Author: holger krekel <holger@merlinux.eu >
Date: Tue Jul 16 16:17:42 2019 +0200
snapshot of my current debugging state
commit 0e80ce9c39
Author: holger krekel <holger@merlinux.eu >
Date: Tue Jul 16 12:57:19 2019 +0200
more aggressively skip perform API when threads are closing
commit c652bae68a
Author: holger krekel <holger@merlinux.eu >
Date: Tue Jul 16 12:06:05 2019 +0200
intermediate wip commit
commit bc904a495d
Author: holger krekel <holger@merlinux.eu >
Date: Tue Jul 16 11:18:56 2019 +0200
add some logging, and a more precise teardown for online python tests
commit 8d99444c6a
Author: holger krekel <holger@merlinux.eu >
Date: Tue Jul 16 00:22:12 2019 +0200
fix std
commit 9dab53e0af
Author: holger krekel <holger@merlinux.eu >
Date: Tue Jul 16 00:20:54 2019 +0200
rustfmt
commit 360089ac74
Author: holger krekel <holger@merlinux.eu >
Date: Tue Jul 16 00:03:49 2019 +0200
remove some debugging
commit e892c5cf4d
Author: holger krekel <holger@merlinux.eu >
Date: Mon Jul 15 23:31:30 2019 +0200
fix test for events
commit 9ad4c9a6fe
Author: holger krekel <holger@merlinux.eu >
Date: Mon Jul 15 22:51:57 2019 +0200
wip try test that we see INFO events from the core
2019-07-21 23:31:14 +02:00
Alexander Krotov
686678c96c
Spellcheck
2019-07-21 21:40:19 +02:00
Alexander Krotov
c116d6f73f
Use Rust for instead of C while in dc_array test
2019-07-21 21:27:49 +02:00
Alexander Krotov
a7c8ebc089
Replace DC_ARRAY_MAGIC #define with a constant
2019-07-21 21:26:27 +02:00
Floris Bruynooghe
7774052911
Use DC_PARAM_* constants everywhere
...
Also document each type they store. This makes existing code a little
more readable and gives some hints towards refactoring this.
2019-07-21 20:25:52 +02:00
Floris Bruynooghe
68888f6d1f
Also silence warnings in test code
...
We can be a bit more liberal with .unwrap() here.
2019-07-21 12:03:04 +02:00
Alexander Krotov
3dfd623db7
Use constants instead of hardcoded values in dc_mimefactory.rs
2019-07-21 00:37:58 +02:00
Floris Bruynooghe
31d2bc7401
Silence warnings from ignored Result values
...
For a few of the locations where error handling is done correctly this
does the right thing. For most other places it gracefully ignores any
issues which is what the original code did as well. Errors are
already logged by the called functions in those cases.
2019-07-21 00:32:33 +02:00
Floris Bruynooghe
5ee8f8cb59
Several fixes to the intergration tests
...
- Pass extra_link_args when using an installed libdeltachat
- Allow setting the liveconfig by envvar
- Show lifeconfig path in the pytest summary line
- Pass required envvars through tox
- Fix broken liveconfig passing in run-integration-test.sh
2019-07-20 23:28:23 +02:00
Floris Bruynooghe
d1825956b2
Merge pull request #198 from link2xt/top_evil_rs_shebang
...
src/top_evil_rs.py: fix shebang to always use Python 3 and make it executable
2019-07-20 19:17:44 +02:00
Alexander Krotov
30ca377586
src/top_evil_rs.py: fix shebang to always use Python 3 and make it executable
...
PEP-0394 (https://www.python.org/dev/peps/pep-0394/ ) recommends to use more specific shebangs.
For example, Debian allows /usr/bin/python to be configured to python2 via `update-alternatives python`, but the script does not work with Python 2.
2019-07-20 19:43:05 +03:00
holger krekel
f58b1d66c2
add a little script to compute rust-evilness
2019-07-19 10:15:04 +02:00
dignifiedquire
0c5015d92b
chore: release v1.0.0-alpha.3
1.0.0-alpha.3
2019-07-18 00:34:46 +02:00
dignifiedquire
ab2d2e7583
chore: prepare for using cargo-release
2019-07-18 00:33:07 +02:00
dignifiedquire
c11ac46dce
chore: add Cargo.lock
...
Closes #145
2019-07-18 00:29:01 +02:00
Friedel Ziegelmayer
8a0fc609e6
The big sqlite refactor
...
* refactor: safe sql access
* Clean up the worst rebase mistakes
* Some more progress on the rebase fallout and this branch
* upgrade and compile again
* cleanup from rebase
* example of how to prepare now
* rebase fixes
* add sql.query_map
* less preparation
* more improvements in sql code
* fix string truncation
* more prepare conversions
* most prep done
* fix tests
* fix ffi
* fix last prepares
* fix segfaults and some queries
* use r2d2 pool
* fix dc_job sql call, to reduce contention
* try newer rust
* No more vararg printing (drop dc_log_)
* ignore expected errors
* fix: uses exists instead of execute where needed
* fix: get_contacts logic was broken
* fix: contact creation
* test on 32bit linux
* ci: try running 32bit without cross
* undo 32bit tests
* refactor: rename dc_sqlite3 to sql
* fix: safer string conversions
* more string fixes
* try fixing appveyor build to 64bit
* chore(ci): hardcode target
* chore(ci): appveyor
* some cleanup work
* try fix darwin
* fix and improve sql escaping
* fix various bugs
* fix chat deletion
* refactor: cleanup config values and move to their own file
* refactor: move more methods onto the sql struct
* dont panic on failed state loading
* first round of cr
* one more cr fix
* stop using strange defaults
* remove unused escapes
2019-07-18 00:24:45 +02:00
holger krekel
3e3403d3d7
try using setuptools_scm for automatic versioning based on py-* tags ( #187 )
...
* try using setuptools_scm for automatic versioning based on py-* tags
* circument problem with pip-wheel isolation and setuptoosl_scm
* always provide version, address @flub comment
2019-07-14 09:58:51 +02:00
holger krekel
46c64b2511
Merge pull request #189 from deltachat/fixosx
...
try fix darwin
2019-07-14 09:57:52 +02:00
holger krekel
aa82644392
fix py27
2019-07-14 09:16:51 +02:00