This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author hdima
Recipients hdima
Date 2008-08-28.14:09:20
SpamBayes Score 7.694179e-12
Marked as misclassified No
Message-id <1219932621.55.0.439111476187.issue3714@psf.upfronthosting.co.za>
In-reply-to
Content
The following commands fail badly:

>>> from nntplib import NNTP
>>> s = NNTP("free-text.usenetserver.com")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/py3k/Lib/nntplib.py", line 116, in __init__
    self.welcome = self.getresp()
  File "/py3k/Lib/nntplib.py", line 215, in getresp
    resp = self.getline()
  File "/py3k/Lib/nntplib.py", line 209, in getline
    elif line[-1:] in CRLF: line = line[:-1]
TypeError: 'in <string>' requires string as left operand, not bytes

Actually there are many places in nntplib module which need to be
converted to bytes, or socket input/output values need to be converted
from/to str. I think API need to be updated to pass user defined
encoding at some stages. I can make a patch later if needed.
History
Date User Action Args
2008-08-28 14:10:21hdimasetrecipients: + hdima
2008-08-28 14:10:21hdimasetmessageid: <1219932621.55.0.439111476187.issue3714@psf.upfronthosting.co.za>
2008-08-28 14:09:21hdimalinkissue3714 messages
2008-08-28 14:09:20hdimacreate