Closed Bug 1265245 Opened 8 years ago Closed 3 years ago

Distinguish between builtin and user-defined classes in the python plugin

Categories

(Webtools Graveyard :: DXR, defect)

defect
Not set
normal

Tracking

(firefox48 affected)

RESOLVED WONTFIX
Tracking Status
firefox48 --- affected

People

(Reporter: twointofive, Unassigned)

Details

This is followup on bug 1264627:

The class definition causing the DXR crash there was

class DeprecationWarning(DeprecationWarning):

(https://hg.mozilla.org/mozilla-central/file/45661ca3b6b1/testing/web-platform/tests/tools/py/py/_log/warning.py#l3)

The issue is that the base DeprecationWarning is a builtin from the exceptions module which doesn't need to be explicitly imported, so we don't recognize that it's not a separate name from the derived DeprecationWarning being defined by the class statement, and then since we don't distinguish the two names, it looks to us like there's an inheritance cycle.

The fix in bug 1264627 clipped the cycle, but didn't fix the underlying naming issue, and 'base:' and 'derived:' searches are still broken in some cases:
https://github.com/mozilla/dxr/blob/d9e75cab015d109a62a77d54105da5e9d49090e4/dxr/plugins/python/tests/test_derived.py#L88

DXR is no longer available. Searchfox is now replacing it.
See meta bug 1669906 & https://groups.google.com/g/mozilla.dev.platform/c/jDRjrq3l-CY for more details.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.