Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

lxml.etree classes don't implement any methods related to pickling: __reduce__, 
__reduce_ex__, __getstate__, __setstate__, __getnewargs__, __getnewargs_ex__. 
But there are extension classes which contain the state invisible to Python. In 
this case they are pickled as empty classes that leads to unexpected error 
while unpickling. Python 3 detects such cases and raise exceptions while 
pickling. This change was not backported to 2.7 for compatibility reasons.

The only way to fix this issue in 2.7 is implementing pickle related methods 
(e.g. __getstate__ or __reduce__) in lxml.etree classes. They should either 
raise an exception, preventing pickling these objects, or implement support of 
pickling.

----------

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

Reply via email to