Re: [Rest2web-develop] Misc fixes, and a last request
Brought to you by:
mjfoord
From: Michael F. <mi...@pc...> - 2005-08-15 09:07:27
|
Just got your other email - at work now. I haven't yet committed my changes... will do any minute..... Meet you on IRC ?? Nicola Larosa wrote: > Almost completed the translation of my main use case from ZConfig to > ConfigObj. Changed a few things: > > configobj.py > ------------ > > Reworked the ConfigObj._parse, _handle_error and _multiline methods: > mutated the self._infile, self._index and self._maxline attributes into > local variables and method parameters. > > Reshaped the ConfigObj._multiline method to better reflect its semantics. > > Changed the "default_test" test in ConfigObj.validate to check the fix for > the bug in validate.Validator.check (see below). > > Added a test to SimpleVal: it does not seem able to intercept missing > values, please check it. > > Commented out the following line in SimpleVal: > > baseErrorClass = Exception > > it's what causes the exception in doctest in Python2.2, and doesn't seem > needed anyway: if it is, write a test that uses it. :-) > I've sorted SimpleVal - it stopped working when we added default values. It now works - and *needs* self.baseErrorClass, which it has to raise when a value is missing. I've set ``baseErrorClass`` to ``ConfigObjError`` - and made it an instance attribute rather than a class attribute. Hopefully this will remove the doctest problem (?). > validate.py > ----------- > > Fixed a bug in Validator.check: when a value that has a default is also > specified in the config file, the default must be deleted from fun_kwargs > anyway, otherwise the check function will get a spurious "default" keyword > argument. > > Added an "ip_addr_list" check. > Cool - I've removed all references to timestamp, other than a mention in the TODO list. > odict.py > -------- > > Cosmetic changes only, to get PyLint to give it a "10" score. It's the > first time I manage to do that. :-) > > Maximum score from PyLint and extensive test coverage, that's probably the > best Python Ordered Dictionary in the known universe. ;-D > Fantastic. :-) > The last request > ---------------- > > Really the last, I promise. O:-) > > It's about required values, and required sections. > [snip..] Awaiting your response to my suggestions (including the suggestion that you code the chosen implementation). We need to make a decision as the only bits of documentation that still need work is (still) the validation related stuff. All the best, Fuzzy http://www.voidspace.rog.uk/python |