#2240: Improve the config system of TG2
-------------------------+--------------------------------------------------
 Reporter:  chrisz       |        Owner:                  
     Type:  enhancement  |       Status:  new             
 Priority:  high         |    Milestone:  __unclassified__
Component:  TurboGears   |      Version:  2.0b6           
 Severity:  major        |   Resolution:                  
 Keywords:  config       |  
-------------------------+--------------------------------------------------
Changes (by chrisz):

  * type:  defect => enhancement

Comment:

 Right, "paster serve" assumes Paste Deploy config format, which means
 unevaluated strings only - so this cannot be changed so easily. But it
 would still make sense, as you suggested, to keep the application specific
 config in a different file where values are evaluated. We could keep the
 different file extensions `*.ini` and `*.cfg` to distinguish files which
 are not evaluated (i.e. you can write strings without quotes) from files
 where values are evaluated (i.e. you need to quote strings).

 And maybe we can suggest that the Paste Deploy format gets changed in the
 long run. This would even simplify Paste itself - if you look at the
 function `server_runner` in paste.httpserver you will understand what I
 mean.

 In fact, it seems that Ian recognized the problem, too (see
 [http://pythonpaste.org/deploy/#outstanding-issues here]): "Should objects
 be Python-syntax, instead of always strings? Lots of code isn’t usable
 with Python strings without a thin wrapper to translate objects into their
 proper types." Probably we should discuss this on the Paste mailing list
 first, to find out how likely this will be changed in Paste.

 If it's not gonna be changed then we should consider the split into
 `*.ini` files used by paste and `*.cfg` used for tg app configuration or
 we should at least add some convenience methods to the config object which
 allow getting values interpreted as bool or ints (the default config
 parser actually has methods like getboolean() or getint(), we should then
 make these available as well).

-- 
Ticket URL: <http://trac.turbogears.org/ticket/2240#comment:2>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to