Update plugin to Spyder v4
jitseniesen opened this issue · 3 comments
jitseniesen commented
Currently the plugin fails in Spyder v4 with:
from spyder.plugins.configdialog import PluginConfigPage
ImportError: cannot import name 'PluginConfigPage'
Landau1908 commented
I meet the error, too.
jcox-nd commented
Did PluginConfigPage simply get renamed or relocated in Spyder 4.0? By doing a search of spyder origin/master, I find:
from spyder.api.preferences import PluginConfigPage
So what happens if you just change all references from:
'from spyder.plugins.configdialog import PluginConfigPage' -> from spyder.api.preferences import PluginConfigPage
Does it work?
ccordoba12 commented
@jcox-nd, that's almost the right fix. You need to do something like this:
try:
from spyder.plugins.configdialog import PluginConfigPage
except ImportError:
from spyder.api.preferences import PluginConfigPage
to make the plugin compatible with both Spyder 3 and 4.
Please make a PR with that fix so we can release a be version.