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.

Author danielsh
Recipients Arfrever, danielsh, einarfd, eli.bendersky, ezio.melotti, flox, georg.brandl, jcea, larry, python-dev, santoso.wijaya, skrah
Date 2013-01-07.04:58:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Eli Bendersky wrote on Thu, Jan 03, 2013 at 14:44:02 +0000:
> If this change is required (even if we choose to name it
> "xml.etree.ElementTree.Element" for Py compatibility to fix the pickling
> regression, we may find ourselves in a need to change it between 3.3 and
> 3.3.1 and I'm not sure if that's valid. I hope my question on pydev will be
> resolved conclusively.
> Danial, could you investigate if such a change is absolutely required to
> make pickling/unickling of Element work?

There are a few options:

- Change c-Element's tp_name to "xml.etree.ElementTree.Element".

- Register a reduce function for c-Element's that serialises them by
  constructing an equivalent py-Element and returning the latter's
  .__dict__ via the third return value:

- Add an entry mapping "builtins.Element" to
  "xml.etree.ElementTree.Element" to _compat_pickle.IMPORT_MAPPING
  (which is used by Lib/

I haven't tried to implement either of these approaches.
Date User Action Args
2013-01-07 04:58:09danielshsetrecipients: + danielsh, georg.brandl, jcea, larry, ezio.melotti, Arfrever, eli.bendersky, skrah, flox, santoso.wijaya, python-dev, einarfd
2013-01-07 04:58:09danielshsetmessageid: <>
2013-01-07 04:58:09danielshlinkissue16076 messages
2013-01-07 04:58:08danielshcreate