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 , 6 years ago
Status: | assigned → accepted |
---|
comment:2 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
The plan is to remove the import hook when we go to 1.0 beta.