Open rlaverde opened 7 years ago
# I would dump all shareable widgets in
spyder.api.widgets
# py3 compatibility
spyder.api.py3compat
# For the rest
spyder.api.utils
@ccordoba12 thoughts?
I wouldn't like to move things so abruptly. Instead, I thought the idea of the api
module was just to expose things from our internal modules, instead of moving things there.
No @ccordoba12 you got it wrong, what we mean is to have a way to import ths things from the api module not to move stuff TO the api module. This has the advantage of exposing only stuff form the api and keeping signatures and other things for backwards compatibility.
# spyder.api.utils
import spyder.utils
def method_to_expose(arg1, arg2):
# Example that preserves api even if internal method changed order of args for eample
return spyder.utils.method_to_expose(arg2, arg1)
We definitely want to discourage for users creating plugins to import stuff from everywhere in Spyder. If we limit to api then we can do it gradually as needed and support only that.
Yep, that's what I understood. So then, please go ahead @rlaverde.
I'm opening this issue to make a list of utilities that could be used by plugins and could be exposed in the api
As @goanpeca says here "I think we should only allow importing from api when doing a plugin"
At the moment I found the followings functions and modules being used by plugins (and aren't in the API yet):
which ones we will exposes through the api? and how we will organize them?