[issue19770] NNTP.post broken
New submission from Szymon Sobik: post method fails because string methods have bytesrting arguments ie. line = line.rstrip(b"\r\n") + _CRLF -- components: Library (Lib) messages: 204331 nosy: sobczyk priority: normal severity: normal status: open title: NNTP.post broken type: behavior versions: Python 3.2, Python 3.3, Python 3.4 ___ Python tracker <http://bugs.python.org/issue19770> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19770] NNTP.post broken
Szymon Sobik added the comment: Traceback (most recent call last): File "./nntp_test.py", line 23, in s.post(msg) File "/usr/lib/python3.3/nntplib.py", line 909, in post return self._post('POST', data) File "/usr/lib/python3.3/nntplib.py", line 895, in _post if not line.endswith(_CRLF): TypeError: endswith first arg must be str or a tuple of str, not bytes -- Added file: http://bugs.python.org/file32836/nntp_test.py ___ Python tracker <http://bugs.python.org/issue19770> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19770] NNTP.post broken
Szymon Sobik added the comment: Ok I found this out too on my own. It might be better to add examples using the MIME* classes to nntplib documentation. -- ___ Python tracker <http://bugs.python.org/issue19770> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com