[New-bugs-announce] [issue3727] poplib module broken by str to unicode conversion

Dmitry Vasiliev report at bugs.python.org
Fri Aug 29 15:59:50 CEST 2008


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

Example:

>>> from poplib import POP3
>>> p = POP3("localhost")
>>> p.user("user")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/py3k/Lib/poplib.py", line 179, in user
    return self._shortcmd('USER %s' % user)
  File "/py3k/Lib/poplib.py", line 151, in _shortcmd
    self._putcmd(line)
  File "/py3k/Lib/poplib.py", line 98, in _putcmd
    self._putline(line)
  File "/py3k/Lib/poplib.py", line 91, in _putline
    self.sock.sendall('%s%s' % (line, CRLF))
TypeError: sendall() argument 1 must be string or buffer, not str
>>> p.user(b"user")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/py3k/Lib/poplib.py", line 179, in user
    return self._shortcmd('USER %s' % user)
  File "/py3k/Lib/poplib.py", line 151, in _shortcmd
    self._putcmd(line)
  File "/py3k/Lib/poplib.py", line 98, in _putcmd
    self._putline(line)
  File "/py3k/Lib/poplib.py", line 91, in _putline
    self.sock.sendall('%s%s' % (line, CRLF))
TypeError: sendall() argument 1 must be string or buffer, not str

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

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


More information about the New-bugs-announce mailing list