#18 Merged at 48ec086
  1. Chris Beelby

A couple documentation updates and some code changes.

I can find no reason in the documentation or code why the engine configuration handler accepts certain aliases for things that could otherwise be configured using the standard method. For example engine.autoreload_on vs. engine.autoreload.on. Especially in this case using the .on property is more consistent with most of the documentation. So to simplify things and reduce redundant configuration names for the same value I have removed them.

Also this fixes a bug which I detected where a global configuration file consisting of

environment = staging

engine.autoreload.on = True

would actually not set autoreload to on because the "staging" environment had a default value for engine.autoreload_on of False and since that key name didn't match engine.autoreload.on they were both loaded into the config dictionary and the autoreload_on happened to be read last making it override the value that was actually specified.

Comments (4)

  1. Joseph Tate

    I don't think we should remove the aliases. They're there to provide backwards compatibility. We SHOULD emit deprecation warnings though when they are used. With that change I think the pull request can be accepted.

  2. Chris Beelby author

    Just curious...what version are we providing backwards compatibility for? Just wondering how far back the use of those aliases goes if you know.

    I'll work on making some warnings appear so that they can be removed in the future.

  3. Chris Beelby author

    Okay. I have added new code which does as you suggest. Also I noticed I broke a test which was specifically looking for the old autoreload_on key, so I updated the test to look for autoreload.on and now it is working again.