The import process of requests is very expensive: it imports all urllib, and a lot of stuff. It is a problem on slow hardware, for applications not running browser2 (example: weboob-config update). This patch has two mains parts: * introduces load_browser to load a browser only if needed (a lot of repository processing does not need a browser) * Do not import exceptions of requests, but use Weboob internals one Before: 6455 open/190 modules imported After: 3997 open/112 modules |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| backendscfg.py | ||
| bcall.py | ||
| modules.py | ||
| ouiboube.py | ||
| repositories.py | ||
| scheduler.py | ||