tokenize.py uses N_TOKENS without prior definition

Bug #127023 reported by Scott Kitterman
6
Affects Status Importance Assigned to Milestone
python2.5 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: apport

Doing a test dist-upgrade using update-manager and update-manager crashed. Apport did not survive the attempt to collect the crash information. This is a current Feisty Kubuntu

PythonArgs: ['/usr/share/apport/apport']
Traceback:
 Traceback (most recent call last):
   File "/usr/share/apport/apport", line 17, in <module>
     import signal, inspect, atexit, grp
   File "inspect.py", line 31, in <module>
     import sys, os, types, string, re, dis, imp, tokenize, linecache
   File "tokenize.py", line 38, in <module>
     COMMENT = N_TOKENS
 NameError: name 'N_TOKENS' is not defined

Revision history for this message
Scott Kitterman (kitterman) wrote :

Apport crash report on apport crash

Revision history for this message
Martin Pitt (pitti) wrote :

Indeed, this is an actual bug in Python's tokenize.py.

Changed in apport:
status: New → Confirmed
Revision history for this message
Matthias Klose (doko) wrote :

no, it's not a bug; see the line before:

  tokenize.py: from token import *

$ python2.5
Python 2.5.1 (r251:54863, Jul 17 2007, 16:02:11)
[GCC 4.1.3 20070629 (prerelease) (Ubuntu 4.1.2-13ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tokenize
>>>

reassigning back to apport.

Changed in python2.5:
status: Confirmed → Incomplete
Changed in apport:
status: Incomplete → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Seems the Python interpreter got royally confused here (apport itself merely does an import of some Python standard libs, nothing I could fix there). Scott, did you ever get this again? If not, are you ok with blaming sun rays and just ignore this?

Changed in apport:
status: Confirmed → Incomplete
Revision history for this message
Scott Kitterman (kitterman) wrote :

I never got it again. I get the impression from doko's comment he had an idea what the issue was. Up to you how you want to deal with it.

Revision history for this message
Connor Imes (ckimes) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in python2.5:
status: Incomplete → Invalid
Revision history for this message
Scott Kitterman (kitterman) wrote :

Apport no longer uses tokenize, so I think this is fine.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.