summaryrefslogtreecommitdiff
path: root/alot/db/manager.py
Commit message (Collapse)AuthorAge
* db/manager: Append underscore to method named asyncJohannes Löthberg2018-08-01
| | | | | | | "async" is a reserved keyword in Python 3.7, so cannot be used for method names. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* db/manager: use threads instead of reactor.callInThreadDylan Baker2018-07-26
| | | | | This is the obvious thing to do, and it works, but it does introduce some latency into starting alot.
* add setter for (notmuch) configs to database managerPatrick Totzke2018-07-24
| | | | these can be used to define/remove new named query strings
* add getter for named queries to DB managerPatrick Totzke2018-07-24
|
* Remove old __future__ importsLucas Hoffmann2018-06-19
| | | | They are not needed for python >= 3.0.
* Extract a level of nested conditionals for tag command.Ben Finney2018-04-23
|
* fix tagging and untagging.Dylan Baker2018-03-01
|
* py3k: remove basestring and unicode.Dylan Baker2018-03-01
| | | | This probably isn't completely right, but it's a start.
* interpret exclude_tagsPatrick Totzke2017-10-01
| | | | | | | | | this adds exclude tags to every query object. Just as in notmuch (option search.exclude_tags), this will essentially render messages invisible if tagged with one of those tags, unless they explicitly appear in the query. See also man notmuch-config(1). closes #732
* Merge branch 'master' into fix/spellingPatrick Totzke2017-09-02
|\
| * pep8 fixesPatrick Totzke2017-09-01
| | | | | | | | | | This mostly shortens lines down to <=79 chars and fixes some other small things I found using the pep8 tool.
* | Fix some spelling mistakesLucas Hoffmann2017-09-02
|/
* py3k: Use build in next functionLucas Hoffmann2017-08-20
|
* settings: do not store SettingsManager instance in __init__.pyDylan Baker2017-08-03
| | | | | | | This can create circular imports in unittests, which causes difficult to debug errors. Fixes #1076
* Exclude search.exclude_tags from searchesJohannes Löthberg2017-06-08
| | | | | | Fixes #707 and #332. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* Use absolute_imports from __future__Lucas Hoffmann2017-01-18
|
* Replace unused arguments with _Dylan Baker2016-12-21
| | | | | | | | | | This patch replaces a large number (but not all) unused arguments with the standard ``_`` placeholder. This has the advantage of signaling that these values are unused. There are a number of places that I've chosen not to apply this, largely in methods that have publicly define signatures that they inherit (usually from urwid).
* Don't use dict.keys when not necessaryDylan Baker2016-12-21
| | | | | | | | | | | It's pretty easy to get caught up using dict.keys (or iterkeys) when one doesn't need to. This patch corrects two cases where it's not needed, the first is the case of inclusion. ``x in mydict.keys()`` is equivalent to ``x in mydict``, but without the need to generate a list and walk it. The second case is when calling set() on a dict, ``set(mydict)`` will create a set object of the dict's keys, without the need to create one in memory and is significantly faster than ``set(mydict.keys())`` or even ``set(mydict.iterkeys())``.
* Replace mutable keyword argumentsDylan Baker2016-12-13
| | | | | | | | | | | | | | | | | | | | | | | There are a number of cases of mutable keyword arguments (list and dict in this case). Mutable keyword arguments are rather dangerous, since any mutation of the default value is persistent, which will inevitably lead to bugs. For example, imagine this code: def func(def=[]): def.append('foo') return def >>> func() ['foo'] >>> func() ['foo', 'foo'] This is almost certainly not what was intended. This code generally uses the idiom of setting the default value to None, and then assigning with or `value = value or []` which will replace value with the empty list (or dict) when value is falsey, like None or another empty list.
* Clean up importsLucas Hoffmann2016-12-09
| | | | | | - use relative imports if possible - group imports into standard library, third party, and alot modules - sort imports alphabetically
* Use logging's native string interpolationLucas Hoffmann2016-12-09
|
* remove deprecated methodPatrick Totzke2015-11-24
| | | | see also issue #794
* just formating (pep8 etc.)Patrick Totzke2014-08-02
|
* adjust error messagePatrick Totzke2013-07-07
|
* move check to add_message directlyPatrick Totzke2013-07-07
|
* raise exception when adding msg no non-indexable pathPatrick Totzke2013-07-07
| | | | i.e., one not below that of notmuch's root path
* Add some comments to the db manager async codeJustus Winter2013-01-24
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* Replace workers std{out,err} by pipes and log anything written to themJustus Winter2013-01-24
| | | | | | | | This will help us identify problems in libnotmuch and reduces visual artifacts (unfortunately libnotmuch writes messages to stderr that used to clobber the curses interface). Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* Join worker processes and keep track of them in the logJustus Winter2013-01-22
| | | | | | | | | This also prevents a zombie from hanging around until the next worker is spawned by multiprocessing. Fixes 411. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* Ignore EINTR in workers when terminating due to SIGTERMJustus Winter2013-01-08
| | | | | | | | | | If the child process is killed using SIGTERM by the parent, send(2) can fail with EINTR. Install a signal handler for SIGTERM and ignore EINTR in this particular case. Fixes #325. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* add callback parameter for FlushCommandPatrick Totzke2012-09-23
|
* cleanup: move DBManager to its own filePatrick Totzke2012-08-10