Opened 6 years ago

Closed 5 years ago

#2876 closed defect (fixed)

core import hook makes non-equivalent classes

Reported by: Tom Goddard Owned by: pett
Priority: moderate Milestone:
Component: Core Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The input hook that allows "from chimerax.core.ui import MainToolWindow" work even though the ui module was long ago moved out of core gives a class that is not the same as "from chimerax.ui import MainToolWindow". This makes

isinstance(isolde_tool_win, MainToolWindow) -> False

in the VR code because ISOLDE is importing from chimerax.core.ui and VR code from chimerax.ui as reported in ticket #2875. Tristan will fix the ISOLDE import. But the import hook mechanism is seriously broken and should be removed if class instances are not the same depending on which import is used.

Change History (2)

comment:1 by pett, 6 years ago

Status: assignedaccepted

The plan is to remove the import hook when we go to 1.0 beta.

comment:2 by pett, 5 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.