3ce514e92b
Previously, we instanciated an MappedImapFolder, and would cleverly (too cleverly?) invoke methods on it casting it to an IMAPFolder by calling methods such as: self._mb.cachemessages(self) where self._MB is the class IMAPFolder and self and instance of MappedImapFolder. If e.g. cachemessages() invokes a method uidexists() which exists for MappedImapFolder, but not directly in IMAPFolder, I am not sure if Python would at some point attempt to use the method of the wrong class. Also, this leads to some twisted thinking as our class would in same cases act as an IMAPFolder and in some cases as an MappedImapFOlder and it is not always clear if we mean REMOTE UID or LOCAL UID. This commit simplifies the class, by a)doing away with the complex Mixin construct and directly inheriting from IMAPFOlder (so we get all the IMAPFOlder methods that we can inherit). We instantiate self._mb as a new instance of IMAPFolder which represents the local IMAP using local UIDs, separating the MappedIMAPFolder construct logically from the IMAPFolder somewhat. In the long run, I would like to remove self._mb completely and simply override any method that needs overriding, but let us take small and understandable baby steps here. Reported-and-tested-by: Vincent Beffara <vbeffara@gmail.com> Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net> |
||
---|---|---|
.. | ||
__init__.py | ||
Base.py | ||
Gmail.py | ||
IMAP.py | ||
LocalStatus.py | ||
LocalStatusSQLite.py | ||
Maildir.py | ||
UIDMaps.py |