➜

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.

作者 badouxn
收信人 badouxn, serhiy.storchaka, yselivanov
日期 2017-11-15.17:32:49
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1510767169.78.0.213398074469.issue32034@psf.upfronthosting.co.za>
In-reply-to
内容
My first fix was indeed wrong. 
Upon looking further into it, it seems to me that the problem come from the fact that the call to super is not done with the right argument. 
Upon unpickling, the argument that will be passed to the __init__ is the string representation built on line 33-34.
That's why, when leaving expected as optional the number returned is 44, the length of the string. 

I went looking for similar Exception class in the code base and found the MaybeEncodingError in multiprocessing/pool.py 

By replacing the Error content with this one I don't have any error anymore. The message is kept identical. 
'''
     def __init__(self, partial, expected):
         super().__init__(partial, expected)
         self.partial = partial
         self.expected = expected
     def __str__(self):
         return ("%d bytes read on a total of %r expected bytes" % (len(partial), expected))
'''

Does such a fix looks correct to you ?
历史
日期 用户 动作 参数
2017-11-15 17:32:49badouxn修改recipients: + badouxn, serhiy.storchaka, yselivanov
2017-11-15 17:32:49badouxn修改messageid: <1510767169.78.0.213398074469.issue32034@psf.upfronthosting.co.za>
2017-11-15 17:32:49badouxn链接issue32034 messages
2017-11-15 17:32:49badouxn创建