Movatterモバイル変換


[0]ホーム

URL:


homepage

Message216549

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Authorgiampaolo.rodola
RecipientsGryllida, giampaolo.rodola, jcao219, math_foo, pitrou
Date2014-04-16.18:42:27
SpamBayes Score-1.0
Marked as misclassifiedYes
Message-id<1397673748.09.0.0535724564712.issue12523@psf.upfronthosting.co.za>
In-reply-to
Content
The part of the code where that is more likely to happen is the push() method.One might also submit a producer (push_with_producer()) erroneously returning strings on more() though; how to properly fix this one is not clear to me because of the bad asynchat design. I'd be for simply raising an exception in push() as in:diff --git a/Lib/asynchat.py b/Lib/asynchat.py--- a/Lib/asynchat.py+++ b/Lib/asynchat.py@@ -181,6 +181,8 @@         self.close()      def push (self, data):+        if not isinstance(data, bytes):+            raise TypeError("data must be a bytes object")         sabs = self.ac_out_buffer_size         if len(data) > sabs:             for i in range(0, len(data), sabs):
History
DateUserActionArgs
2014-04-16 18:42:28giampaolo.rodolasetrecipients: +giampaolo.rodola,pitrou,Gryllida,jcao219,math_foo
2014-04-16 18:42:28giampaolo.rodolasetmessageid: <1397673748.09.0.0535724564712.issue12523@psf.upfronthosting.co.za>
2014-04-16 18:42:28giampaolo.rodolalinkissue12523 messages
2014-04-16 18:42:27giampaolo.rodolacreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp