Hello community, here is the log from the commit of package python-pyparsing for openSUSE:Factory checked in at 2015-05-18 22:58:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pyparsing (Old) and /work/SRC/openSUSE:Factory/.python-pyparsing.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pyparsing" Changes: -------- --- /work/SRC/openSUSE:Factory/python-pyparsing/python-pyparsing.changes 2015-01-15 16:01:10.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python-pyparsing.new/python-pyparsing.changes 2015-05-18 22:58:29.000000000 +0200 @@ -1,0 +2,23 @@ +Mon May 11 17:40:24 UTC 2015 - benoit.mo...@gmx.fr + +- update to version 2.0.3: + * Fixed escaping behavior in QuotedString. Formerly, only + quotation marks (or characters designated as quotation marks in + the QuotedString constructor) would be escaped. Now all escaped + characters will be escaped, and the escaping backslashes will + be removed. + * Fixed regression in ParseResults.pop() - pop() was pretty much + broken after I added *improvements* in 2.0.2. Reported by Iain + Shelvington, thanks Iain! + * Fixed bug in And class when initializing using a generator. + * Enhanced ParseResults.dump() method to list out nested + ParseResults that are unnamed arrays of sub-structures. + * Fixed UnboundLocalError under Python 3.4 in oneOf method, + reported on Sourceforge by aldanor, thanks! + * Fixed bug in ParseResults __init__ method, when returning + non-ParseResults types from parse actions that implement + __eq__. Raised during discussion on the pyparsing wiki with + cyrfer. +- fix end of line encoding of every file in examples + +------------------------------------------------------------------- Old: ---- pyparsing-2.0.2.tar.gz New: ---- pyparsing-2.0.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pyparsing.spec ++++++ --- /var/tmp/diff_new_pack.0NRM9A/_old 2015-05-18 22:58:30.000000000 +0200 +++ /var/tmp/diff_new_pack.0NRM9A/_new 2015-05-18 22:58:30.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-pyparsing # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: python-pyparsing -Version: 2.0.2 +Version: 2.0.3 Release: 0 Url: http://pyparsing.wikispaces.com/ Summary: Grammar Parser Library for Python @@ -59,7 +59,7 @@ %build python setup.py build # Fix wrong EOL encoding: -sed -i 's/\r$//' CHANGES LICENSE README examples/*.py +sed -i 's/\r$//' CHANGES LICENSE README examples/* %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} ++++++ pyparsing-2.0.2.tar.gz -> pyparsing-2.0.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyparsing-2.0.2/CHANGES new/pyparsing-2.0.3/CHANGES --- old/pyparsing-2.0.2/CHANGES 2014-04-13 19:10:42.000000000 +0200 +++ new/pyparsing-2.0.3/CHANGES 2014-08-16 07:18:53.000000000 +0200 @@ -2,6 +2,30 @@ Change Log ========== +Version 2.0.3 - +--------------------------- +- Fixed escaping behavior in QuotedString. Formerly, only quotation + marks (or characters designated as quotation marks in the QuotedString + constructor) would be escaped. Now all escaped characters will be + escaped, and the escaping backslashes will be removed. + +- Fixed regression in ParseResults.pop() - pop() was pretty much + broken after I added *improvements* in 2.0.2. Reported by Iain + Shelvington, thanks Iain! + +- Fixed bug in And class when initializing using a generator. + +- Enhanced ParseResults.dump() method to list out nested ParseResults that + are unnamed arrays of sub-structures. + +- Fixed UnboundLocalError under Python 3.4 in oneOf method, reported + on Sourceforge by aldanor, thanks! + +- Fixed bug in ParseResults __init__ method, when returning non-ParseResults + types from parse actions that implement __eq__. Raised during discussion + on the pyparsing wiki with cyrfer. + + Version 2.0.2 - April, 2014 --------------------------- - Extended "expr(name)" shortcut (same as "expr.setResultsName(name)") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyparsing-2.0.2/PKG-INFO new/pyparsing-2.0.3/PKG-INFO --- old/pyparsing-2.0.2/PKG-INFO 2014-04-13 19:24:37.000000000 +0200 +++ new/pyparsing-2.0.3/PKG-INFO 2014-10-11 07:19:23.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: pyparsing -Version: 2.0.2 +Version: 2.0.3 Summary: Python parsing module Home-page: http://pyparsing.wikispaces.com/ Author: Paul McGuire diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyparsing-2.0.2/examples/parsePythonValue.py new/pyparsing-2.0.3/examples/parsePythonValue.py --- old/pyparsing-2.0.2/examples/parsePythonValue.py 2013-07-17 07:24:18.000000000 +0200 +++ new/pyparsing-2.0.3/examples/parsePythonValue.py 2014-10-11 06:19:18.000000000 +0200 @@ -2,14 +2,16 @@ # # Copyright, 2006, by Paul McGuire # - +from __future__ import print_function from pyparsing import * + cvtBool = lambda t:t[0]=='True' cvtInt = lambda toks: int(toks[0]) cvtReal = lambda toks: float(toks[0]) cvtTuple = lambda toks : tuple(toks.asList()) cvtDict = lambda toks: dict(toks.asList()) +cvtList = lambda toks: [toks.asList()] # define punctuation as suppressed literals lparen,rparen,lbrack,rbrack,lbrace,rbrace,colon = \ @@ -39,6 +41,7 @@ listStr << (lbrack + Optional(delimitedList(listItem) + Optional(Suppress(","))) + rbrack) +listStr.setParseAction(cvtList, lambda t: t[0]) dictEntry = Group( listItem + colon + listItem ) dictStr << (lbrace + Optional(delimitedList(dictEntry) + \ Files old/pyparsing-2.0.2/htmldoc/pyparsing_2.0.2_docs.zip and new/pyparsing-2.0.3/htmldoc/pyparsing_2.0.2_docs.zip differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyparsing-2.0.2/pyparsing.py new/pyparsing-2.0.3/pyparsing.py --- old/pyparsing-2.0.2/pyparsing.py 2014-04-13 19:10:57.000000000 +0200 +++ new/pyparsing-2.0.3/pyparsing.py 2014-08-16 07:14:39.000000000 +0200 @@ -57,8 +57,8 @@ - embedded comments """ -__version__ = "2.0.2" -__versionTime__ = "13 April 2014 12:10" +__version__ = "2.0.3" +__versionTime__ = "16 Aug 2014 00:12" __author__ = "Paul McGuire <pt...@users.sourceforge.net>" import string @@ -300,7 +300,7 @@ if isinstance(name,int): name = _ustr(name) # will always return a str, but use _ustr for consistency self.__name = name - if not toklist in (None,'',[]): + if not (isinstance(toklist, (type(None), basestring, list)) and toklist in (None,'',[])): if isinstance(toklist,basestring): toklist = [ toklist ] if asList: @@ -414,11 +414,15 @@ supported, just as in dict.pop().""" if not args: args = [-1] - if 'default' in kwargs: - args.append(kwargs['default']) + for k,v in kwargs.items(): + if k == 'default': + args = (args[0], v) + else: + raise TypeError("pop() got an unexpected keyword argument '%s'" % k) if (isinstance(args[0], int) or len(args) == 1 or args[0] in self): + index = args[0] ret = self[index] del self[index] return ret @@ -637,15 +641,25 @@ Accepts an optional C{indent} argument so that this string can be embedded in a nested display of other data.""" out = [] + NL = '\n' out.append( indent+_ustr(self.asList()) ) items = sorted(self.items()) for k,v in items: if out: - out.append('\n') + out.append(NL) out.append( "%s%s- %s: " % (indent,(' '*depth), k) ) if isinstance(v,ParseResults): - if v.haskeys(): - out.append( v.dump(indent,depth+1) ) + if v: + if v.haskeys(): + out.append( v.dump(indent,depth+1) ) + elif any(isinstance(vv,ParseResults) for vv in v): + for i,vv in enumerate(v): + if isinstance(vv,ParseResults): + out.append("\n%s%s[%d]:\n%s%s%s" % (indent,(' '*(depth+1)),i,indent,(' '*(depth+2)),vv.dump(indent,depth+2) )) + else: + out.append("\n%s%s[%d]:\n%s%s%s" % (indent,(' '*(depth+1)),i,indent,(' '*(depth+2)),_ustr(vv))) + else: + out.append(_ustr(v)) else: out.append(_ustr(v)) else: @@ -1914,8 +1928,7 @@ self.pattern += (r'|(?:%s)' % re.escape(escQuote)) if escChar: self.pattern += (r'|(?:%s.)' % re.escape(escChar)) - charset = ''.join(set(self.quoteChar[0]+self.endQuoteChar[0])).replace('^',r'\^').replace('-',r'\-') - self.escCharReplacePattern = re.escape(self.escChar)+("([%s])" % charset) + self.escCharReplacePattern = re.escape(self.escChar)+"(.)" self.pattern += (r')*%s' % re.escape(self.endQuoteChar)) try: @@ -2338,8 +2351,8 @@ def __init__( self, exprs, savelist = True ): super(And,self).__init__(exprs, savelist) self.mayReturnEmpty = all(e.mayReturnEmpty for e in self.exprs) - self.setWhitespaceChars( exprs[0].whiteChars ) - self.skipWhitespace = exprs[0].skipWhitespace + self.setWhitespaceChars( self.exprs[0].whiteChars ) + self.skipWhitespace = self.exprs[0].skipWhitespace self.callPreparse = True def parseImpl( self, instring, loc, doActions=True ): @@ -3228,6 +3241,7 @@ masks = ( lambda a,b: b.startswith(a) ) parseElementClass = Literal + symbols = [] if isinstance(strs,basestring): symbols = strs.split() elif isinstance(strs, collections.Sequence): @@ -3237,6 +3251,8 @@ else: warnings.warn("Invalid argument to oneOf, expected string or list", SyntaxWarning, stacklevel=2) + if not symbols: + return NoMatch() i = 0 while i < len(symbols)-1: