Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update plugin to Spyder v4 #26

Closed
jitseniesen opened this issue Dec 9, 2017 · 3 comments · Fixed by #36
Closed

Update plugin to Spyder v4 #26

jitseniesen opened this issue Dec 9, 2017 · 3 comments · Fixed by #36
Milestone

Comments

@jitseniesen
Copy link
Member

Currently the plugin fails in Spyder v4 with:

    from spyder.plugins.configdialog import PluginConfigPage
ImportError: cannot import name 'PluginConfigPage'
@Landau1908
Copy link

I meet the error, too.

@jcox-nd
Copy link

jcox-nd commented May 1, 2019

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
Copy link
Member

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants