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 hupp
Recipients hupp
Date 2007-11-03.18:06:41
SpamBayes Score 0.0045391275
Marked as misclassified No
Message-id <1194113202.87.0.167615791843.issue1380@psf.upfronthosting.co.za>
In-reply-to
Content
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.
Files
File name Uploaded
pep3137-asynfix.patch hupp, 2007-11-03.18:06:41
History
Date User Action Args
2007-11-03 18:06:43huppsetspambayes_score: 0.00453913 -> 0.0045391275
recipients: + hupp
2007-11-03 18:06:42huppsetspambayes_score: 0.00453913 -> 0.00453913
messageid: <1194113202.87.0.167615791843.issue1380@psf.upfronthosting.co.za>
2007-11-03 18:06:42hupplinkissue1380 messages
2007-11-03 18:06:41huppcreate