bump from imaplib2 v2.53 to v2.55

- 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>
This commit is contained in:
Nicolas Sebrecht 2016-06-11 11:08:02 +02:00
parent cdfa75f72d
commit 3a5becf6a7
3 changed files with 16 additions and 12 deletions

View File

@ -83,7 +83,7 @@ Bugs, issues and contributions can be requested to both the mailing list or the
* Python v2.7+
* Python v3.4+ ***(experimental)***
* six (required)
* imaplib2 >= 2.53 (optional)
* imaplib2 >= 2.55 (optional)
## Documentation

View File

@ -15,11 +15,12 @@ Public functions: Internaldate2Time
__all__ = ("IMAP4", "IMAP4_SSL", "IMAP4_stream",
"Internaldate2Time", "ParseFlags", "Time2Internaldate")
"Internaldate2Time", "ParseFlags", "Time2Internaldate",
"Mon2num", "MonthNames", "InternalDate")
__version__ = "2.53"
__version__ = "2.55"
__release__ = "2"
__revision__ = "53"
__revision__ = "55"
__credits__ = """
Authentication code contributed by Donn Cave <donn@u.washington.edu> June 1998.
String method conversion by ESR, February 2001.
@ -484,7 +485,7 @@ class IMAP4(object):
import ssl
TLS_MAP = {}
if hasattr(ssl, "PROTOCOL_TLSv1_2"): # py3
if hasattr(ssl, "PROTOCOL_TLSv1_2"):
TLS_MAP[TLS_SECURE] = {
"tls1_2": ssl.PROTOCOL_TLSv1_2,
"tls1_1": ssl.PROTOCOL_TLSv1_1,
@ -2293,6 +2294,9 @@ class _Authenticator(object):
# so when it gets to the end of the 8-bit input
# there's no partial 6-bit output.
#
if bytes != str:
oup = b''
else:
oup = ''
while inp:
if len(inp) > 48:

View File

@ -25,7 +25,7 @@ this virtual_imaplib2 or we might go into troubles.
DESC = None
_SUPPORTED_RELEASE = 2
_SUPPORTED_REVISION = 53
_SUPPORTED_REVISION = 55
try:
# Try any imaplib2 in PYTHONPATH first. This allows both maintainers of
@ -42,14 +42,14 @@ except (ImportError, NameError) as e:
try:
from offlineimap.bundled_imaplib2 import *
import offlineimap.bundled_imaplib2 as imaplib
DESC = "bundled"
except:
print("Error while trying to import system imaplib2: %s"% e)
raise
# We should really get those literals exposed by upstream. Same goes for
# __version__, __release__ and __revision__.
InternalDate = imaplib.InternalDate
Mon2num = imaplib.Mon2num
MonthNames = imaplib.MonthNames
# Upstream won't expose those literals to avoid erasing them with "import *" in
# case they exist.
__version__ = imaplib.__version__
__release__ = imaplib.__release__
__revision__ = imaplib.__revision__