[issue1682942] ConfigParser support for alt delimiters
Georg Brandl ge...@python.org added the comment: Looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Éric Araujo mer...@netwok.org added the comment: I made some minor remarks on rietveld, it seems they’re saved but no email has come here. -- nosy: +merwok ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Éric Araujo mer...@netwok.org added the comment: Ah, the tracker does not know the address I use for Google, sorry. My comments are visible on Rietveld. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Changes by Łukasz Langa luk...@langa.pl: Removed file: http://bugs.python.org/file18219/issue1682942.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Łukasz Langa luk...@langa.pl added the comment: New patch after review by Éric Araujo. The difference between the last one and the current is cosmetic: --- Lib/configparser.py 2010-07-27 11:36:51.0 +0200 +++ Lib/configparser.py.2 2010-07-28 13:05:39.0 +0200 @@ -117,3 +117,2 @@ import re -import sre_parse import sys @@ -140,2 +139,3 @@ BaseException. + return self.__message @@ -145,2 +145,3 @@ BaseException. + self.__message = value @@ -301,2 +302,3 @@ + if section.lower() == default: @@ -338,2 +340,3 @@ + if isinstance(filenames, str): @@ -358,4 +361,4 @@ used. - + if filename is None: @@ -419,2 +422,3 @@ Check for the existence of a given option in a given section. + if not section or section == DEFAULTSECT: @@ -431,2 +435,3 @@ Set an option. + if not section or section == DEFAULTSECT: @@ -444,2 +449,3 @@ between keys and values are surrounded by spaces. + if space_around_delimiters: @@ -456,2 +462,3 @@ Remove an option. + if not section or section == DEFAULTSECT: @@ -471,2 +478,3 @@ Remove a file section. + existed = section in self._sections @@ -529,2 +537,3 @@ + cursect = None # None, or a dictionary @@ -657,2 +666,3 @@ + d = self._defaults.copy() @@ -690,2 +700,3 @@ + d = self._defaults.copy() @@ -789,2 +800,3 @@ Set an option. Extend ConfigParser.set: check for string values. + # The only legal non-string value if we allow valueless Some remarks on Éric's review: - thanks for reviewing the patch, however you did review an outdated version - comment_prefixes are by all means prefixes. Collins dictionary: prefix, n. - 2. something coming or placed before. Other reviewers didn't pose the current name as inapt - other remarks corrected in the current patch -- Added file: http://bugs.python.org/file18228/issue1682942.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Éric Araujo mer...@netwok.org added the comment: I advised putting a blankline between the first line of a docstring and the rest of it, not between the docstring and the body of the function. Re. prefix, Wordnet is more precise than Collins here: “an affix that is added in front of the word”. A prefix is not just a sequence of characters, it’s a morpheme (building block for word, if you want). So prefix is a wrong name in the docstring of str.startswith, since e.g. “pyt” is not a prefix, whereas “out” is, but str.startswith works with any sequence, not only something that is a prefix. Other reviewers didn't pose the current name as inapt They’re not linguists. Not saying this is a good or bad thing. :) Using linguistics terms to speak of computer languages is often a bad thing, but in this case I’d like to avoid using prefix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Georg Brandl ge...@python.org added the comment: Committed an extensively edited patch in r83202. Thanks all! -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Changes by Łukasz Langa luk...@langa.pl: Removed file: http://bugs.python.org/file18216/issue1682942.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Łukasz Langa luk...@langa.pl added the comment: Updated the patch after review by Brian Curtin and Alexander Belopolsky. All remarks addressed, I think it's ready for inclusion. -- Added file: http://bugs.python.org/file18219/issue1682942.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Michael Foord mich...@voidspace.org.uk added the comment: This would change the format of config files that configparser supports. Should there be some discussion of this on python-dev first? The patch for the docs is against the latex docs, so definitely needs updating. -- nosy: +michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Changes by Brian Curtin cur...@acm.org: -- nosy: +brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Łukasz Langa luk...@langa.pl added the comment: The original patch was of no use because didn't let users specify multicharacter delimiters and comment delimiters. The main goal behind the implementation was making monstrosities like the Samba configuration file work. This is why a sample smb.conf is added to the tests as to show what is now parsable. The patch is called issue1682942.diff and is quite big. Georg, Brian, before you panic, please note the following: the old test suite with the new code works (which means it's by default backwards compatible). With a patch of that size it also might just be easier for you to browse the patched code and not the patch itself. The Doc/ part still needs work but after 10 hours of coding I have enough for today :) -- Added file: http://bugs.python.org/file18214/issue1682942.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Changes by Łukasz Langa luk...@langa.pl: -- nosy: +georg.brandl Added file: http://bugs.python.org/file18215/cfgparser.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Changes by Łukasz Langa luk...@langa.pl: Removed file: http://bugs.python.org/file18214/issue1682942.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Łukasz Langa luk...@langa.pl added the comment: Updated the patch after review by Georg Brandl. This version includes documentation updates as well. -- Added file: http://bugs.python.org/file18216/issue1682942.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Brian Curtin cur...@acm.org added the comment: I uploaded the current patch to Rietveld and reviewed it there, CC'ed Łukasz. http://codereview.appspot.com/1848051/show is the link. I only gave the tests a once-over since they failed for not having the test file Łukasz meant to include. I'll review those more in depth on the next patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Mark Lawrence breamore...@yahoo.co.uk added the comment: Łukasz please attach your patch and I'll run with it, while you're at it could you also provide a unit test patch for #5412, thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Łukasz Langa luk...@langa.pl added the comment: Part of the patch has already been independently implemented (support for custom `dict_type`s). As for the custom delimiters the patch is somewhat incomplete. Let's take for instance delimiting by space characters (e.g. `delimiters = ( , )`). ConfigParser would input spacedelimspace so it would be quite bizarre. Brett, I have a patch ready but it depends on issue7113 changes I've made. -- nosy: +brett.cannon, lukasz.langa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Mark Lawrence breamore...@yahoo.co.uk added the comment: Could the patch be reworked for 3.2? -- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Tres Seaver tsea...@agendaless.com added the comment: I'm afraid the patch no longer applies cleanly to the trunk, although at least updating the docs should be easier now that they are converted to ReStructuredText. The tests in the patch for the new feature seem sensible. -- nosy: +tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682942] ConfigParser support for alt delimiters
Changes by Daniel Diniz aja...@gmail.com: -- stage: - patch review type: - feature request versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com