| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
email.mime is a part of the old API, which does not mix well with the
new one (i.e. when email.policy.SMTP is used), specifically when
non-ASCII headers are used.
Additionally, clean the APIs that accept either EmailMessage or a str to
only expect EmailMessage. Supporting both just adds confusion and
complexity.
|
|
|
|
|
|
|
| |
It does not actually save any code. The new code also uses a shell as is
documented.
Remove call_cmd_async(), as it no longer has any callers.
|
| |
|
| |
|
|
|
|
|
| |
In addition, remove hardcoded default values from `account.py` and use
defaults from `alot.rc.spec`
|
|
|
|
|
|
| |
Python3 only supports "new-style" classes (those extending object),
and we don't need to explicitly inherit from this root class any more.
See http://pylint-messages.wikidot.com/messages:c1001
|
|
|
|
|
| |
... since accounts' addresses can overlap and get_account_by_address
promises too much. Also remove now-obsolete get_addresses.
|
|
|
|
| |
fixes #1230, fixes an unfiled bug in clear_my_address()
|
| |
|
| |
|
| |
|
|
|
|
| |
They are not needed for python >= 3.0.
|
| |
|
|
|
|
|
|
| |
We don't want to be comparing bytes anyway, the decode would use utf-8,
and that isn't right. Instead make the caller convert to a str of
Address first.
|
|\
| |
| |
| |
| | |
This requires regenerating the accounts_table docs, as they've changed
for python 3.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
maildir knows R and P flags which denote messages that have been replied
to resp. passed on (fowarded, bounced). They correspond to IMAP flags
\Replied and $Forwarded which are used by many clients and by
synchronisation software. E.g., mbsync syncs \Replied to R, a patch for
P is pending.
Implement replied_tags and passed_tags for alot which work similar to
sent_tags: sent_tags tags the sent message; replied_tags (resp.
passed_tags) tags the message being replied to (resp. being fowarded).
Basically, setting the replied_tags config to `replied` and replying to
a message has the same effect as doing `tag replied; reply`, but the
latter would tag even sending the reply is aborted or fails. The
implementation in this patch makes sure that the tagging is done only if
and when the reply resp. forward has been sent successfully.
|
|/ |
|
| |
|
|
|
|
|
|
|
|
| |
Add account configuration variable 'encrypt_to_self' that if true when
encrypting a message it will also be encrypted with the key defined for
this account.
Fixes #1140
|
|
|
|
|
|
|
|
|
|
|
| |
This uses a try/except because comparing an address to an empty string
should be a fairly uncommon event and try/except will be faster than
`if '@' not in other` in the case where '@' is in other.
This stops alot from crashing if there is no 'From' header in the
email. Outlook generates drafts without a 'From' header.
Fixes #1050
|
|\ |
|
| |
| |
| |
| |
| | |
This mostly shortens lines down to <=79 chars and fixes some other small
things I found using the pep8 tool.
|
| |
| |
| |
| |
| |
| |
| | |
This just wries the new Address class into alot for use, and fixes up a
few places where such fixups are needed.
Fixes #1107
|
| |
| |
| |
| |
| | |
This class will encapsulate the logic of comparing email addresses and
the rules of handling when capitalization is allowed and when it's not.
|
|/ |
|
|
|
|
|
|
| |
instead of assuming that it already receives a string. The new
behaviour is in sync with the type documented for the superclass
`Account`.
|
|
|
|
|
|
| |
Currently this code works because alot always populates aliases so it's
not None, but if for some reason it doesn't then get_addresses will
assert.
|
|\
| |
| | |
Use absolute_imports from __future__
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Completer class is abastract, and it's complete method is also
abstract. Using ABCMeta achieve two thing, first it will cause an error
if a developer doesn't overwrite the method in a subclass. And second
that it tells the static analysis tools to ignore the unused arguments
in the signature, since this is the definition of a signature, not an
actual function.
By the same logic addressbook.AddressBook, and account.Account have been
extended to use ABCMeta as their metaclass and have had their abstract
methods decorated with the abstract method attribute.
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
- use relative imports if possible
- group imports into standard library, third party, and alot modules
- sort imports alphabetically
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
closes #589
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
be more error concious when storing mails to a maildir
and propagate Maildir errors to error notifications in the UI.
cf issue #502
|
| |
|
|
|
|
|
| |
This actually is a workaround for a Python bug as mentioned in
alot/crypto.py
|