Serhiy Storchaka added the comment:

Implementing only .__get/setstate__() doesn't fix all problem. We have 
implement also __getnewargs_ex__(). But implemented __getnewargs_ex__() has 
priority over __getnewargs__() implemented in subclasses.

And may be there are problems with other optional special methods that are 
incorrectly delegated to the stream in codecs IO classes.

I think more reliable way is to disallow delegating all special (or may be even 
private) methods. Here is a patch.

----------
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
stage:  -> patch review
type: enhancement -> behavior
versions: +Python 3.5, Python 3.6 -Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6395>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to