Python imports being mixed with actual definition

Bug #618979 reported by Gustavo Niemeyer on 2010-08-17
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
exuberant-ctags (Ubuntu)
Medium
Colin Watson

Bug Description

Binary package hint: exuberant-ctags

The behavior of exuberant-ctags has recently changed so that, when indexing Python code, imports will be mixed up with definitions. In practice, it means that when one searches for ClassName, everything which lists ClassName in an import statement will be included in the result next to the definition itself, which is pretty bad.

To workaround the problem, include this in your ~/.ctags file:

    --python-kinds=-i

Colin found the actual commit and upstream bug related to the problem:

----

Probably this commit (from the bzr import):

 revno: 693
 committer: elias
 timestamp: Sun 2009-07-05 15:38:06 +0000
 message:
   Synchronized the python parser with the geany tagmanager, including the following geany commits:
   r3788: nestlevel.c and some other stuff
   r3804: Parse Python import statements to get symbol completion for the imported module names.
   r3809: Parse Python calltips.
   r3831: Fix grouping functions/classes under a nested function.

   Many thanks to the geany devs!

Here's the upstream bug:

 http://sourceforge.net/tracker/index.php?func=detail&aid=2829739&group_id=6556&atid=106556

Changed in exuberant-ctags (Ubuntu):
status: New → Confirmed
Colin Watson (cjwatson) on 2010-08-17
Changed in exuberant-ctags (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Colin Watson (cjwatson)
status: Confirmed → Triaged
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package exuberant-ctags - 1:5.8-3ubuntu1

---------------
exuberant-ctags (1:5.8-3ubuntu1) maverick; urgency=low

  * For Python, disable -i so imports are not tagged by default.
    (LP: #618979)
 -- Barry Warsaw <email address hidden> Tue, 17 Aug 2010 18:11:31 +0100

Changed in exuberant-ctags (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers