[New-bugs-announce] [issue3728] imaplib module broken by str to unicode conversion

Dmitry Vasiliev report at bugs.python.org
Fri Aug 29 16:05:33 CEST 2008


New submission from Dmitry Vasiliev <dima at hlabs.spb.ru>:

Example:

>>> from imaplib import IMAP4
>>> m = IMAP4("localhost")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/py3k/Lib/imaplib.py", line 185, in __init__
    self.welcome = self._get_response()
  File "/py3k/Lib/imaplib.py", line 912, in _get_response
    if self._match(self.tagre, resp):
  File "/py3k/Lib/imaplib.py", line 1021, in _match
    self.mo = cre.match(s)
TypeError: can't use a string pattern on a bytes-like object
>>> m = IMAP4(b"localhost")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/py3k/Lib/imaplib.py", line 185, in __init__
    self.welcome = self._get_response()
  File "/py3k/Lib/imaplib.py", line 912, in _get_response
    if self._match(self.tagre, resp):
  File "/py3k/Lib/imaplib.py", line 1021, in _match
    self.mo = cre.match(s)
TypeError: can't use a string pattern on a bytes-like object

----------
components: Library (Lib)
messages: 72137
nosy: hdima
severity: normal
status: open
title: imaplib module broken by str to unicode conversion
type: crash
versions: Python 3.0

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3728>
_______________________________________


More information about the New-bugs-announce mailing list