New submission from Adam Hupp: The attached patch resolves test failues in test_asynchat and test_asyncore.
The asynchat failure was due to interpolating a byte string into a unicode string using %s. This resulted in a b'' byte representation in the final string. The fix is to use string constants instead of byte constants. The result is encoded to bytes later on. The asyncore failure was due to an explicit isinstance(data, bytes) check on the result of recv. The actual type in this case was buffer. I've removed the check since the next line calls data.replace(b'\n', b'') This all should fail for anything thats not a buffer or bytes. ---------- components: Library (Lib), Tests files: pep3137-asynfix.patch messages: 57086 nosy: hupp severity: normal status: open title: fix for test_asynchat and test_asyncore on pep3137 branch type: behavior versions: Python 3.0 Added file: http://bugs.python.org/file8684/pep3137-asynfix.patch __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1380> __________________________________
pep3137-asynfix.patch
Description: Binary data
_______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com