Here's how I'm fixing this in Ubuntu 11.04[1]. I actually brought up the python-dev discussion referred to here. It's clear that __debug__ was always considered a reserved name, and it was a bug in Python < 2.7 that assignment to it was allowed. Python 2.7 tightened the restriction to its original intent[2], disallowing assignment to it even when it is used as an attribute. So the package definitely needs fixing.
A note about the patch: mgltools does not currently have a patch system, despite the commented out inclusion of simple-patchsys.mk in debian/rules. It's considered bad form to add a patch system, so instead of uncommenting the include and adding a patch, I modified the source directly. The Debian maintainer may of course elect to do it differently. -Barry [1] https://bugs.launchpad.net/ubuntu/+source/mgltools-viewerframework/+bug/685476 [2] http://bugs.python.org/issue9438 --- mgltools-viewerframework-1.5.4.cvs.20100912.orig/ViewerFramework/VF.py +++ mgltools-viewerframework-1.5.4.cvs.20100912/ViewerFramework/VF.py @@ -257,10 +257,8 @@ self.hasGui = gui - global __debug__ self.withShell = withShell self.trapExceptions = trapExceptions - self.__debug__ = 0 # create a socket communication object try: self.socketComm = Comm()
signature.asc
Description: PGP signature