[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#505443: python-apt 0.7.4ubuntu7.3 breaks sys.excepthook when used with python -tt



Package: python-apt
Version: 0.7.4ubuntu7.3
Severity: important

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 think this is
bug report is a candidate for Severity level of at least "serious."

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



Reply to: