Hi Tristan,
On Mon, 2019-04-15 at 20:45 +0900, Tristan Van Berkom wrote:
<snip>
> Again, I think the idea is "neat", but I should reiterate that
> external
> imports is really very limited to a very small amount of plugins who
> actually import external libraries.
>
> There is no reason at all for an element to import anything external,
> and only a small subset of plugins actually import external
> libraries.
This is the current situation, but it feels quite restrictive to
enforce that requirement on anyone considering writing a plugin in the
future. I don't really have an idea in mind of what kind of plugin may
want to do that, and maybe this assumption is invalid and nobody will
ever want external dependencies in a new plugin (I'd be interested to
hear what authors of plugins such as those in bst-external think of
this, since I don't have a ton of context really).
It was me who introduced the 'requests' import in bst-external. I did this because 'requests' is easier and safer to use than Python's own urllib module[1]. If BuildStream exposed some comparable 'perform a HTTP request as securely as possible' API to plugins, the 'requests' import could easily be removed.