STINNER Victor <victor.stin...@haypocalc.com> added the comment:

Codecs are inconsistents: utf-32 has working getstate() / setstate() methods, 
whereas utf-8-sig and utf-16 don't (getstate() always return 0, setstate() does 
nothing).

> Simply moving py3ks getstate/setstate implementation 
> over to 2.x might do the trick.

That's what my patch does :-) It just a copy/paste of Python3 code. It does fix 
#5006 tests (which are re-enabled by the patch). Using the patch, it's possible 
to save/restore utf-8-sig and utf-16 codecs state.

----------
keywords: +patch
nosy: +haypo
Added file: http://bugs.python.org/file18170/utf_8_16.patch

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

Reply via email to