| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
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
|
|
|
|
| |
fixes #1230, fixes an unfiled bug in clear_my_address()
|
|
|
|
| |
They are not needed for python >= 3.0.
|
|
|
|
|
|
|
| |
in python3 dict.{keys,items,values} return views, which are similar to
iterators without some of the caveats about modifying the underlying
object. The iter* and view* methods have been removed, instead one warps
dict.x in iter or list to get those types.
|
| |
|
|
|
|
|
|
|
| |
This can create circular imports in unittests, which causes difficult to
debug errors.
Fixes #1076
|
| |
|
|
|
|
|
|
|
|
| |
This patch replaces a number of uses of dict.items, dict.values, and
dict.keys with their iterative siblings. The advantage of using the
iterator version is that they don't copy the keys, values, or items, but
simply return references. This reduces memory usage and may speed up the
these operations a bit.
|
| |
|
|
|
|
|
|
| |
This patch removes the need to create an intermediate dictionary while
calculating the authors of a thread, it does so by working directly with
the _authors list.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently this function takes a list, splits into two lists based on
whether or not a function returns None, sorts the list that isn't None,
and then appends the list of None to the end. This creates 4 new
concrete lists on each method call, requires the use of 3 filter +
lambda pairs, and calls list.sort(). Pretty complicated and inefficient.
This patch replaces that with a single sorted() function call with a kay
function that replaces None with a value that is guaranteed to sort less
than what Message.get_date() will return, but will not cause a
comparison to None (which is an error in Python 3.x). This is all based
on iterators and avoids the need for filter or list concatenation. This
should result in only one new list being created.
|
| |
|
|
|
|
| |
This is needed by unittest that mock Thread.refresh.
|
|
|
|
|
|
|
| |
Instead of using set([l for l in list]) use {l for l in list} (which
shouldn't be confused with a dict comprehension which requires the ':'
in the first value}. This avoids creating a list before reducing it to a
set. This feature is new in 2.7 and 3.3.
|
|
|
|
|
|
| |
- use relative imports if possible
- group imports into standard library, third party, and alot modules
- sort imports alphabetically
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Default value 'first_message' lists authors in the order they joined the
conversation. Value 'latest_message' order authors by their latest
message, which makes it easier to see which authors who wrote the most
recent messages.
Note that authors with duplicate emails were previously filtered. We now
keep all authors where name + email is unique. This is behavior is
desired for some email notification services. For example, Jira will
set the From header to "Joe User <jira@company.com>" meaning you will
only see one author if you only keep unique email addresses.
|
| |
|
| |
|
|
|
|
|
| |
only sort messages with not-None date header,
append the rest
|
|
|
|
| |
cf issue #472
|
|
|
|
| |
this fixes a few broken links and duplicate module defs in the sphinx docs
|
| |
|
| |
|
|
this moves messages into the new submodule alot.db
which from now on also contains Threads in a separate file
|