[Bug 809048] Re: bzr crashed with AttributeError in stopTest(): '_TypeEqualityDict' object has no attribute 'clear'

Andrew Bennetts andrew.bennetts at canonical.com
Wed Jul 13 00:20:25 UTC 2011


Martin [gz] wrote:
> Actually, it's not quite that easy as there's now a straight
> _TypeEqualityDict<->TestCase reference link. I'll see if I can get
> upstream to accept some kind of fix.

In the interim we could add some ugly code to handle both versions:

    tef_clear = getattr(type_equality_funcs, "clear", None):
    if tef_clear is None:
        tef_instance_dict = getattr(type_equality_funcs, "__dict__", None)
        if tef_instance_dict is not None:
	    tef_clear = tef_instance_dict.clear
    if tef_clear is not None:
        tef_clear()

Or perhaps we should just set the entire attribute to None, if it exists, and
rely on the assumption that by the time we do this self.assertEqual isn't going
to be invoked again:

    sentinel = object()
    if getattr(self, '_type_equality_funcs', sentinel) is not sentinel:
        self._type_equality_funcs = None

-Andrew.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bzr in Ubuntu.
https://bugs.launchpad.net/bugs/809048

Title:
  bzr crashed with AttributeError in stopTest(): '_TypeEqualityDict'
  object has no attribute 'clear'

Status in Bazaar Version Control System:
  Confirmed
Status in Python:
  Unknown
Status in “bzr” package in Ubuntu:
  Confirmed

Bug description:
  Getting this error when trying to compile cia-clients

  https://bugs.launchpad.net/bugs/808749

  ProblemType: Crash
  DistroRelease: Ubuntu 11.10
  Package: bzr 2.4.0~beta4-4ubuntu2
  ProcVersionSignature: Ubuntu 3.0.0-4.5-generic 3.0.0-rc6
  Uname: Linux 3.0.0-4-generic x86_64
  Architecture: amd64
  BzrDebugFlags: set()
  BzrVersion: 2.4b4
  CommandLine: ['/usr/bin/bzr', 'selftest', '-v', '-s', 'bp.cia']
  CrashDb: bzr
  Date: Tue Jul 12 00:29:07 2011
  ExecutablePath: /usr/bin/bzr
  FileSystemEncoding: UTF-8
  InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20110119)
  InterpreterPath: /usr/bin/python2.7
  Locale: nl_BE.UTF-8
  PackageArchitecture: all
  Platform: Linux-3.0.0-4-generic-x86_64-with-Ubuntu-11.10-oneiric
  ProcCmdline: /usr/bin/python /usr/bin/bzr selftest -v -s bp.cia
  ProcEnviron:
   SHELL=/bin/bash
   LC_MESSAGES=nl_BE.utf8
   LANG=nl_BE.UTF-8
   LANGUAGE=nl_BE:nl:en_GB:en
  PythonVersion: 2.7.2
  SourcePackage: bzr
  Title: bzr crashed with AttributeError in stopTest(): '_TypeEqualityDict' object has no attribute 'clear'
  UpgradeStatus: Upgraded to oneiric on 2011-06-18 (23 days ago)
  UserEncoding: UTF-8
  UserGroups: adm admin audio cdrom dialout fuse libvirtd lpadmin netdev plugdev sambashare sbuild video

To manage notifications about this bug go to:
https://bugs.launchpad.net/bzr/+bug/809048/+subscriptions




More information about the foundations-bugs mailing list