Edgewall Software

Changeset 1245


Ignore:
Timestamp:
Feb 16, 2014, 6:29:31 PM (10 years ago)
Author:
hodgestar
Message:

Work around for Python 3.4 regression in pickle (http://bugs.python.org/issue16251).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/genshi/core.py

    r1166 r1245  
    665665    def __getitem__(self, name):
    666666        return QName(self.uri + '}' + name)
    667     __getattr__ = __getitem__
     667
     668    def __getattr__(self, name):
     669        # work around for pickle bug in Python 3.4
     670        # see http://bugs.python.org/issue16251
     671        if name == "__getnewargs_ex__":
     672            raise AttributeError("%r has no attribute %r" % (type(self), name))
     673        return self.__getitem__(name)
    668674
    669675    def __hash__(self):
Note: See TracChangeset for help on using the changeset viewer.