lazily autoinstall thirdparty python libraries
Created attachment 84652 [details] Patch
I'm not super excited about this, but I think it's better than what we have currently. I don't like how we have to move the imports to where the object is actually used, but I can't think of another way to make this work.
I'm not sure I understand what problem you're trying to solve.
(In reply to comment #3) > I'm not sure I understand what problem you're trying to solve. About a month ago, the chromium waterfall moved to a new datacenter and > 100 bots were trying to autoinstall packages from sourceforge.net, effectively DOSing them. By autoinstalling less, the bots will be more stable.
Here's the chromium-dev thread: http://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/48ed0048e6749748/fcfb18a3a7dff1dc?lnk=gst
Comment on attachment 84652 [details] Patch I'm confused as to why the import hooks are needed if you're moving the import calls into the functions themselves.
(In reply to comment #6) > (From update of attachment 84652 [details]) > I'm confused as to why the import hooks are needed if you're moving the import calls into the functions themselves. If we don't use import hooks, importing anything in thirdparty triggers the downloads. For example, importing thirdparty.BeautifulSoup or thirdparty.mock triggers downloads. I could try pushing all those imports down as well, but that seems a bit more fragile since it's less obvious that importing thirdparty.BeautifulSoup is going to trigger a download (at least thirdparty.autoinstalled.foo has autoinstalled in it).
Created attachment 84776 [details] Patch
Created attachment 91307 [details] Patch for landing
Committed r85080: <http://trac.webkit.org/changeset/85080>