Public bug reported: Binary package hint: python-apt
Upgrading to the just-released python-apt 0.7.4ubuntu7.3 introduces inconsistent use of tabs and spaces that completely breaks use of sys.excepthook with the python -tt option (issue errors for inconsistent use of tabs and spaces). I have appended a typescript with reproduction steps below, using raw python (with the -tt option). (I find it exceedingly odd, in general, that use of sys.excepthook with absolutely no other calls or packages involved somehow ends up calling into an apt packaging library.) Because this breaks a completely normal part of the Python API (sys.excepthook) when used with a recommended option used by Python projects to enforce consistent use of tabs and spaces, I view this as a pretty severe bug. [Note that I cluelessly already reported this upstream at bugs.debian.org, so there may be duplication there if this is, in fact, an upstream bug.] System and package info: $ lsb_release -rd Description: Ubuntu 8.04.1 Release: 8.04 $ apt-cache policy python-apt python-apt: Installed: 0.7.4ubuntu7.3 Candidate: 0.7.4ubuntu7.3 Version table: *** 0.7.4ubuntu7.3 0 500 http://us.archive.ubuntu.com hardy-updates/main Packages 100 /var/lib/dpkg/status 0.7.4ubuntu7 0 500 http://us.archive.ubuntu.com hardy/main Packages Reproduction steps: Script started on Wed Nov 12 04:37:31 2008 $ python -tt Python 2.5.2 (r252:60911, Jul 31 2008, 17:31:22) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> apply(sys.excepthook, sys.exc_info()) None Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line 38, in apport_excepthook from apport.packaging_impl import impl as packaging File "/usr/lib/python2.5/site-packages/apport/__init__.py", line 1, in <module> from apport.report import Report File "/usr/lib/python2.5/site-packages/apport/report.py", line 21, in <module> import fileutils File "/usr/lib/python2.5/site-packages/apport/fileutils.py", line 16, in <module> from packaging_impl import impl as packaging File "/usr/lib/python2.5/site-packages/apport/packaging_impl.py", line 18, in <module> import apt File "/usr/lib/python2.5/site-packages/apt/__init__.py", line 8, in <module> from apt.cache import Cache File "/usr/lib/python2.5/site-packages/apt/cache.py", line 24, in <module> import apt.progress File "/usr/lib/python2.5/site-packages/apt/progress.py", line 166 " called when the status changed " ^ TabError: inconsistent use of tabs and spaces in indentation Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line 38, in apport_excepthook from apport.packaging_impl import impl as packaging File "/usr/lib/python2.5/site-packages/apport/__init__.py", line 1, in <module> from apport.report import Report File "/usr/lib/python2.5/site-packages/apport/report.py", line 21, in <module> import fileutils File "/usr/lib/python2.5/site-packages/apport/fileutils.py", line 16, in <module> from packaging_impl import impl as packaging File "/usr/lib/python2.5/site-packages/apport/packaging_impl.py", line 18, in <module> import apt File "/usr/lib/python2.5/site-packages/apt/__init__.py", line 8, in <module> from apt.cache import Cache File "/usr/lib/python2.5/site-packages/apt/cache.py", line 24, in <module> import apt.progress File "/usr/lib/python2.5/site-packages/apt/progress.py", line 166 " called when the status changed " ^ TabError: inconsistent use of tabs and spaces in indentation Original exception was: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line 38, in apport_excepthook from apport.packaging_impl import impl as packaging File "/usr/lib/python2.5/site-packages/apport/__init__.py", line 1, in <module> from apport.report import Report File "/usr/lib/python2.5/site-packages/apport/report.py", line 21, in <module> import fileutils File "/usr/lib/python2.5/site-packages/apport/fileutils.py", line 16, in <module> from packaging_impl import impl as packaging File "/usr/lib/python2.5/site-packages/apport/packaging_impl.py", line 18, in <module> import apt File "/usr/lib/python2.5/site-packages/apt/__init__.py", line 8, in <module> from apt.cache import Cache File "/usr/lib/python2.5/site-packages/apt/cache.py", line 24, in <module> import apt.progress File "/usr/lib/python2.5/site-packages/apt/progress.py", line 166 " called when the status changed " ^ TabError: inconsistent use of tabs and spaces in indentation >>> $ exit exit Script done on Wed Nov 12 04:37:53 2008 ** Affects: python-apt (Ubuntu) Importance: Undecided Status: New -- python-apt 0.7.4ubuntu7.3 breaks sys.excepthook when used with python -tt https://bugs.launchpad.net/bugs/297207 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs