# HG changeset patch # User hodgestar # Date 1392571771 0 # Node ID ad96321e4d2bf3e552dc7e444d91fdc0f3c589dc # Parent 38565f2ab970499289a2a88f530222147f425476 Work around for Python 3.4 regression in pickle (http://bugs.python.org/issue16251). diff --git a/genshi/core.py b/genshi/core.py --- a/genshi/core.py +++ b/genshi/core.py @@ -664,7 +664,13 @@ def __getitem__(self, name): return QName(self.uri + '}' + name) - __getattr__ = __getitem__ + + def __getattr__(self, name): + # work around for pickle bug in Python 3.4 + # see http://bugs.python.org/issue16251 + if name == "__getnewargs_ex__": + raise AttributeError("%r has no attribute %r" % (type(self), name)) + return self.__getitem__(name) def __hash__(self): return hash(self.uri)