-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix external plugins import #3150
Comments
@Nodd can we consider moving away from namespace packages?, I know it was something we agreed on before but it seems they are falling out of favour in the python community and other libraries have moved away from them. Like flask, i.e. http://flask.pocoo.org/docs/0.10/extensions/ |
Well, it's better to do it now rather than after 3.0 is out. What is the problem with namespace packages exactly? If I understand correctly, extensions would work by searching in |
Apparently they created more problems than they solve, conda does not necessarily play well, and some of the conda devs say that we should stay away from them.
Yes, that would be the easy fix and avoid name collisions once and for all I dont remember about the link either |
Well the names could be spyder-profiler, spyder-line-profiler, spyder-memory-profiler, spyder-conda-manager, spyder-git, etc and the imports would be spyder_profiler |
I don't think namespace packages are much of a problem in our case, unless we make one package depend on another. That's were problems could arise. @goanpeca, what do you propose as an alternative? |
I see, so we can follow the Flask model. Changes to do it don't seem too hard to implement for me :-) |
@ccordoba12, yes we should follow the flask model. No, the changes are not so big. |
@goanpeca, could you open a PR with those changes? I'd do it myself but I'm really swamped with the move to Qt 5.6 (now I'm in charge of the Windows conda packages too :-). |
👍 |
How do we differentiate between UI and IO plugins ? Using a subdirectory is not very practical without a namespace package (both for the plugin developer and the implementation in spyder).
Option 1 can be interesting for building a plugin manager because there could be other information here. They could also be stored as attributes in the modules (similar to |
Description
I had to change the package name for autopep8, because there was a name clash with the autopep8 package that's used in autopep8 plugin.
In theory spyder plugins should be loaded as
spyplugins.ui.pluginame
, but it seems that somehowpluginame
is added tosys.modules
too.Version and main components
Dependencies
The text was updated successfully, but these errors were encountered: