Lazy sources - after submodules
I know I keep doing new PRs, sorry. Hopefully this will be the last one!!
Basically the goal is: ConfigSources manage their entire state and minimal assumptions are made about the internal workings of a ConfigSource by other Config objects (making ConfigSources much more extendable).
So for example, say you have some custom complicated source that is made by combining multiple files and an API call (idk why). By abstracting away ConfigSource.exists for example, the config source can define that state on its own without Configuration ever having to be privy to those details.
Notes:
- we still have that bug where python 2.7 doesn't actually call
dict.keys(or anything else) when casting to dict, so a hotfix is to look forkeysin__getattribute__and call load ifkeyswas accessed. Obviously, I'd like to get rid of this, but I'm not sure what the best way is. - this is built on the submodule breakup PR so once that is merged, we should only have commits starting at
2ea14db - pypy is currently failing (like the 2.7 dict bug) because I'm guessing that it doesn't get
keyswhen casting to dict. I'm guessing that becauseConfigSourcesubclassesdict, it just doesisinstance(src, dict)
I think we could do 1+2, and then do 3 separately. 1 doesn't do much for simplification unless we have 2 in place as well.