Re: [Rest2web-develop] ConfigObj 4 Beta 1
Brought to you by:
mjfoord
From: Michael F. <mi...@pc...> - 2005-08-25 08:48:05
|
Nicola Larosa wrote: >>3a. the two doctests in the ConfigObj class docstring should raise >> DuplicateError, but instead raise ConfigObjError; > > > I added "raise_errors = True" to the tests, and changed the expected output > to match the new one. > Ahh... :-) Well caught. > > >>>>3b. we may want to try minimizing the usage of the isinstance >>>> built-in, especially to allow passing dict-like objects that >>>> are not subclasses of dict; > > >>>What alternative do you suggest ? >>> >>>``IsmappingType`` is hopeless (it returns ``True`` for *any* class). I >>>don't think restricting input to dicts or genuine subclasses is too >>>restrictive. > > >>That's what he asked for. > > >>>We could assume that any item with a ``__getitem__`` method *and* a >>>``keys`` method will behave like a dictionary ? (I'd be happy with this >>>as a solution - but it will need documenting). > > >>Some kind of duck typing, yes, I'll explore current usage. > > > I tried using "dict(value)" in a try...except block, but things are > complicated by the fact that both "dict('')" and "dict(())" succeed, > returning the empty dict. > > Let's keep it all as it is; if someone wants to pass in a non-dict-derived > dict-like thing, it's their responsibility to convert it to dict first. > Yeah - dict(value) is hardly a *great* chore. Nice one. > > >>>>6. the "BSD-LICENSE.txt" and the generated HTML files have CRLF >>>> line endings, while the sources have LF ones. Also, the >>>> "configobj.txt" has LF ones, except for the HTML fragment at the >>>> end, that has ten CRLF endings. > > >>>Ok - I can sort this. Committing will remove the carriage returns from >>>configobj.txt. > > >>Just updated, and it didn't. :-( I'll fix the files and their svn:eol-style >>property. > > > I set the svn:eol-style property on all files in the repository except GIF > and JPG images, and removed all CR chars from all the other files. > Thanks > I set all properties to 'LF' instead of 'native'. In this way the files > will keep their LF endings on Windows too, instead of being converted back > and forth to CRLF. > Great > Apart from being The Right Thing (tm), ;-) this will ease your packaging > job, and won't create problems with editing: just set SPE to use the > original line endings of each file, without changing them. > > You won't be able to open those files with Notepad anymore, but Wordpad > reads them, and correctly writes them, just fine. ;-) > No problem - SPE (and most python tools) preserve line endings. I use a nice text editor which does too. > > Overall, green light to official beta release from me! :-D > Oh good... my low key mention on my blog got put up on Daily Python URL ! I need to edit the doc files to use the new zip file name. (and make the change to validate.py) Then I'll sort it... later today. I'm just installing Namazu on the server. Fuzzy http://www.voidspace.org.uk/python |