[New-bugs-announce] [issue1210] imaplib does not run under Python 3

Robert T McQuaid report at bugs.python.org
Thu Sep 27 07:49:34 CEST 2007


New submission from Robert T McQuaid:

imaplib does not run under Python 3.

The following two-line python program, named testimap.py,
works when run from a Windows XP system shell prompt
using Python 2.5.1, but fails with Python 3.0.  It
appears that the logic does not follow the distinction
between characters and bytes in Python 3.


import imaplib
mail=imaplib.IMAP4("mail.rtmq.infosathse.com")


e:\python25\python   testimap.py
e:\python30\python   testimap.py 2>f:syserr


The last line produced the trace:


Traceback (most recent call last):
  File "testimap.py", line 10, in <module>
    mail=imaplib.IMAP4("mail.rtmq.infosathse.com")
  File "e:\python30\lib\imaplib.py", line 184, in __init__
    self.welcome = self._get_response()
  File "e:\python30\lib\imaplib.py", line 962, in _get_response
    self._append_untagged(typ, dat)
  File "e:\python30\lib\imaplib.py", line 800, in _append_untagged
    if typ in ur:
TypeError: unhashable type: 'bytes'

----------
components: Library (Lib)
messages: 56154
nosy: rtmq
severity: normal
status: open
title: imaplib does not run under Python 3
type: crash
versions: Python 3.0

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1210>
__________________________________


More information about the New-bugs-announce mailing list