This patch removes these lintian warnings:
Warning R0205: Class 'X' inherits from object,
can be safely removed from bases in python3 (useless-object-inheritance)
This patch gets the month number using datetime library.
I removed the function Mon2num. The list is not used now, it is removed
too.
I need change the regex in the compile to get the fields. Now is str,
not binary, so I remored the 'b'.
On some architectures, using threading.TIMEOUT_MAX for the timeout
parameter can overflow causing Condition.wait() to return immediately.
Instead of relying on TIMEOUT_MAX, remove it and wait forever.
Signed-off-by: Ilias Tsitsimpis <iliastsi@debian.org>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
While trying to see why I couldn't get my emails from an Exchange server
I found this:
[imap]: 41:31.42 someserver.com handler _put_response(IOMC1 OK)
[imap]: 41:31.42 someserver.com handler unexpected response: 'IOMC1 OK'
And shortly after that the connection was closed. IOMC1 is just the
unique tag for the session.
The pattern looks for the tag, a number, a word like "OK" or something,
*then a space*, then optionally some data.
If the data aren't there it shouldn't be expecting a space.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
- Expose more literals.
- Fix a type to bytes.
- Fix comment.
Changes submitted upstream by Łukasz and me.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
The virtual imaplib2 first try to import imaplib2 when provided by the system.
If not provided or if the version is not supported, fallback on the bundled
imaplib2 version.
Distribution maintainers can now easily remove the bundled imaplib2 version if
they want to get it packaged outside of offlineimap.
We still want to provide imaplib2 by default because:
- this library is neither in Python core nor packaged by a lot of distributions;
- users expect to be able to run offlineimap by just downloading the tarball or
after a git clone.
In order to avoid unexpected (too old) versions of imaplib2, we restrict the
supported versions of this librabry.
Reviewed-by: Łukasz Żarnowiecki <dolohow@outlook.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>