enthought/enstaller — pull request #158 by cournape (2014-02-24 16:36:22+00:00)
Title: Config singleton big removal

This is significant PR to allow multiple, independent configurations in enstaller. In terms of API:

- there is now a proper Configuration object that holds configuration state, and has proper attributed to move away from stringly typed API.
- configuration files are properly parsed using ast module instead of exec'ing the file
- most functions at enstaller.config have been removed. The function enstaller.config.get_auth has been kept for backward compatibility reasons, except that it will now fail if an .enstaller4rc file does not already exist.
- Enpkg class now takes a config argument. I kept the Enpkg.__init__ signature backward-incompatible (a default config reading the default enstaller4rc is created instead), but I am not convinced it is a great idea.

In terms of behavior:

- enpkg will always create a default config file if not found, not just when doing --userpass
- enpkg now require authentication early (except for things like --version, etc...). This makes error handling and auth-dependend code more reliable. This also gives better error messages.