Hello community,

here is the log from the commit of package python-ply for openSUSE:Factory 
checked in at 2017-03-17 15:07:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ply (Old)
 and      /work/SRC/openSUSE:Factory/.python-ply.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-ply"

Fri Mar 17 15:07:39 2017 rev:25 rq:480761 version:3.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ply/python-ply.changes    2016-09-16 
11:00:24.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-ply.new/python-ply.changes       
2017-03-17 15:07:40.372309246 +0100
@@ -1,0 +2,8 @@
+Thu Mar 16 19:28:47 UTC 2017 - [email protected]
+
+- Switch to single-spec build
+- Update to 3.10
+  * Changed grammar signature computation to not involve hashing
+    functions. Parts are just combined into a big string.
+
+-------------------------------------------------------------------

Old:
----
  ply-3.9.tar.gz

New:
----
  ply-3.10.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-ply.spec ++++++
--- /var/tmp/diff_new_pack.9VhFzq/_old  2017-03-17 15:07:41.012218934 +0100
+++ /var/tmp/diff_new_pack.9VhFzq/_new  2017-03-17 15:07:41.012218934 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-ply
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 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
@@ -16,26 +16,24 @@
 #
 
 
-%define modname ply
-Name:           python-%{modname}
-Version:        3.9
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+Name:           python-ply
+Version:        3.10
 Release:        0
-Url:            http://www.dabeaz.com/ply/
 Summary:        Python Lex & Yacc
 License:        BSD-3-Clause
 Group:          Development/Languages/Python
-Source:         http://www.dabeaz.com/%{modname}/%{modname}-%{version}.tar.gz
+Url:            http://www.dabeaz.com/ply/
+Source:         http://www.dabeaz.com/ply/ply-%{version}.tar.gz
 Patch0:         python-ply-shebangs.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-BuildRequires:  python-devel
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-%py_requires
-%{!?python_sitelib: %global python_sitelib %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%endif
+BuildRequires:  %{python_module devel}
+BuildRequires:  python-rpm-macros
 %if 0%{?suse_version} > 1110 || 0%{?fedora} > 12 || 0%{?mdkversion}
 BuildArch:      noarch
 %endif
 
+%python_subpackages
+
 %description
 PLY is yet another implementation of lex and yacc for Python. Some notable
 features include the fact that its implemented entirely in Python and it
@@ -65,29 +63,29 @@
 It is compatible with both Python 2 and Python 3.
 
 %prep
-%setup -q -n %{modname}-%{version}
+%setup -q -n ply-%{version}
 %patch0 -p1
 # remove unneeded executable bit
 chmod -x test/testlex.py
 
 %build
-python setup.py build
+%python_build
 
 %install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%python_install
 
 %check
 export PYTHONPATH=%{buildroot}%{python_sitelib}
 pushd test
-python testlex.py 
-python testyacc.py 
+%python_exec  testlex.py 
+%python_exec  testyacc.py 
 
-%files
+%files %{python_files}
 %defattr(-,root,root,-)
 %doc ANNOUNCE CHANGES TODO
-%python_sitelib/%{modname}*
+%python_sitelib/*
 
-%files doc
+%files  %{python_files doc}
 %defattr(-,root,root,-)
 %doc doc example test
 

++++++ ply-3.9.tar.gz -> ply-3.10.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ply-3.9/ANNOUNCE new/ply-3.10/ANNOUNCE
--- old/ply-3.9/ANNOUNCE        2016-08-31 16:02:26.000000000 +0200
+++ new/ply-3.10/ANNOUNCE       2017-01-31 19:37:45.000000000 +0100
@@ -1,11 +1,11 @@
-August 31, 2016
+January 31, 2017
 
-                  Announcing :  PLY-3.9 (Python Lex-Yacc)
+                  Announcing :  PLY-3.10 (Python Lex-Yacc)
 
                         http://www.dabeaz.com/ply
 
-I'm pleased to announce PLY-3.9--a pure Python implementation of the
-common parsing tools lex and yacc.  PLY-3.9 is a minor bug fix
+I'm pleased to announce PLY-3.10--a pure Python implementation of the
+common parsing tools lex and yacc.  PLY-3.10 is a minor bug fix
 release.  It supports both Python 2 and Python 3.
 
 If you are new to PLY, here are a few highlights:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ply-3.9/CHANGES new/ply-3.10/CHANGES
--- old/ply-3.9/CHANGES 2016-08-31 16:02:26.000000000 +0200
+++ new/ply-3.10/CHANGES        2017-01-31 19:37:45.000000000 +0100
@@ -1,3 +1,23 @@
+Version 3.10
+---------------------
+01/31/17: beazley
+          Changed grammar signature computation to not involve hashing
+          functions. Parts are just combined into a big string.
+
+10/07/16: beazley
+          Fixed Issue #101: Incorrect shift-reduce conflict resolution with
+          precedence specifier.
+
+          PLY was incorrectly resolving shift-reduce conflicts in certain
+          cases.  For example, in the example/calc/calc.py example, you 
+          could trigger it doing this:
+
+          calc > -3 - 4            
+          1                         (correct answer should be -7)
+          calc >
+
+          Issue and suggested patch contributed by https://github.com/RomaVis
+           
 Version 3.9
 ---------------------
 08/30/16: beazley
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ply-3.9/PKG-INFO new/ply-3.10/PKG-INFO
--- old/ply-3.9/PKG-INFO        2016-08-31 16:13:14.000000000 +0200
+++ new/ply-3.10/PKG-INFO       2017-01-31 19:38:33.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: ply
-Version: 3.9
+Version: 3.10
 Summary: Python Lex & Yacc
 Home-page: http://www.dabeaz.com/ply/
 Author: David Beazley
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ply-3.9/README.md new/ply-3.10/README.md
--- old/ply-3.9/README.md       2016-08-31 16:02:26.000000000 +0200
+++ new/ply-3.10/README.md      2017-01-31 19:37:45.000000000 +0100
@@ -1,6 +1,6 @@
-PLY (Python Lex-Yacc)                   Version 3.9
+PLY (Python Lex-Yacc)                   Version 3.10
 
-Copyright (C) 2001-2016
+Copyright (C) 2001-2017
 David M. Beazley (Dabeaz LLC)
 All rights reserved.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ply-3.9/doc/internal.html 
new/ply-3.10/doc/internal.html
--- old/ply-3.9/doc/internal.html       2016-08-31 16:02:26.000000000 +0200
+++ new/ply-3.10/doc/internal.html      2017-01-31 19:37:45.000000000 +0100
@@ -12,7 +12,7 @@
 </b>
 
 <p>
-<b>PLY Version: 3.0</b>
+<b>PLY Version: 3.10</b>
 <p>
 
 <!-- INDEX -->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ply-3.9/doc/ply.html new/ply-3.10/doc/ply.html
--- old/ply-3.9/doc/ply.html    2016-08-31 16:02:26.000000000 +0200
+++ new/ply-3.10/doc/ply.html   2017-01-31 19:37:45.000000000 +0100
@@ -12,7 +12,7 @@
 </b>
 
 <p>
-<b>PLY Version: 3.9</b>
+<b>PLY Version: 3.10</b>
 <p>
 
 <!-- INDEX -->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ply-3.9/example/yply/ylex.py 
new/ply-3.10/example/yply/ylex.py
--- old/ply-3.9/example/yply/ylex.py    2016-08-31 16:02:26.000000000 +0200
+++ new/ply-3.10/example/yply/ylex.py   2017-01-31 19:37:45.000000000 +0100
@@ -109,8 +109,8 @@
 
 
 def t_error(t):
-    print "%d: Illegal character '%s'" % (t.lexer.lineno, t.value[0])
-    print t.value
+    print("%d: Illegal character '%s'" % (t.lexer.lineno, t.value[0]))
+    print(t.value)
     t.lexer.skip(1)
 
 lex.lex()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ply-3.9/example/yply/yparse.py 
new/ply-3.10/example/yply/yparse.py
--- old/ply-3.9/example/yply/yparse.py  2016-08-31 16:02:26.000000000 +0200
+++ new/ply-3.10/example/yply/yparse.py 2017-01-31 19:37:45.000000000 +0100
@@ -22,18 +22,18 @@
     '''defsection : definitions SECTION
                   | SECTION'''
     p.lexer.lastsection = 1
-    print "tokens = ", repr(tokenlist)
-    print
-    print "precedence = ", repr(preclist)
-    print
-    print "# -------------- RULES ----------------"
-    print
+    print("tokens = ", repr(tokenlist))
+    print()
+    print("precedence = ", repr(preclist))
+    print()
+    print("# -------------- RULES ----------------")
+    print()
 
 
 def p_rulesection(p):
     '''rulesection : rules SECTION'''
 
-    print "# -------------- RULES END ----------------"
+    print("# -------------- RULES END ----------------")
     print_code(p[2], 0)
 
 
@@ -49,7 +49,7 @@
 
 def p_definition_start(p):
     '''definition : START ID'''
-    print "start = '%s'" % p[2]
+    print("start = '%s'" % p[2])
 
 
 def p_definition_token(p):
@@ -138,7 +138,7 @@
     rulecount = 1
     for r in rule[1]:
         # r contains one of the rule possibilities
-        print "def p_%s_%d(p):" % (rulename, rulecount)
+        print("def p_%s_%d(p):" % (rulename, rulecount))
         prod = []
         prodcode = ""
         for i in range(len(r)):
@@ -155,17 +155,17 @@
                     embed_count += 1
             else:
                 prod.append(item)
-        print "    '''%s : %s'''" % (rulename, " ".join(prod))
+        print("    '''%s : %s'''" % (rulename, " ".join(prod)))
         # Emit code
         print_code(prodcode, 4)
-        print
+        print()
         rulecount += 1
 
     for e, code in embedded:
-        print "def p_%s(p):" % e
-        print "    '''%s : '''" % e
+        print("def p_%s(p):" % e)
+        print("    '''%s : '''" % e)
         print_code(code, 4)
-        print
+        print()
 
 
 def p_rule(p):
@@ -204,7 +204,7 @@
         p[0] = p[1]
         p[0].append(p[3])
 
-#   print "morerules", len(p), p[0]
+#   print("morerules", len(p), p[0])
 
 
 def p_rulelist(p):
@@ -241,4 +241,4 @@
         return
     codelines = code.splitlines()
     for c in codelines:
-        print "%s# %s" % (" " * indent, c)
+        print("%s# %s" % (" " * indent, c))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ply-3.9/example/yply/yply.py 
new/ply-3.10/example/yply/yply.py
--- old/ply-3.9/example/yply/yply.py    2016-08-31 16:02:26.000000000 +0200
+++ new/ply-3.10/example/yply/yply.py   2017-01-31 19:37:45.000000000 +0100
@@ -29,14 +29,14 @@
 from ply import *
 
 if len(sys.argv) == 1:
-    print "usage : yply.py [-nocode] inputfile"
+    print("usage : yply.py [-nocode] inputfile")
     raise SystemExit
 
 if len(sys.argv) == 3:
     if sys.argv[1] == '-nocode':
         yparse.emit_code = 0
     else:
-        print "Unknown option '%s'" % sys.argv[1]
+        print("Unknown option '%s'" % sys.argv[1])
         raise SystemExit
     filename = sys.argv[2]
 else:
@@ -44,8 +44,8 @@
 
 yacc.parse(open(filename).read())
 
-print """
+print("""
 if __name__ == '__main__':
     from ply import *
     yacc.yacc()
-"""
+""")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ply-3.9/ply/cpp.py new/ply-3.10/ply/cpp.py
--- old/ply-3.9/ply/cpp.py      2016-08-31 16:02:26.000000000 +0200
+++ new/ply-3.10/ply/cpp.py     2017-01-31 19:37:45.000000000 +0100
@@ -77,6 +77,7 @@
     r'(//.*?(\n|$))'
     # replace with '/n'
     t.type = 'CPP_WS'; t.value = '\n'
+    return t
     
 def t_error(t):
     t.type = t.value[0]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ply-3.9/ply/lex.py new/ply-3.10/ply/lex.py
--- old/ply-3.9/ply/lex.py      2016-08-31 16:02:26.000000000 +0200
+++ new/ply-3.10/ply/lex.py     2017-01-31 19:37:45.000000000 +0100
@@ -1,7 +1,7 @@
 # -----------------------------------------------------------------------------
 # ply: lex.py
 #
-# Copyright (C) 2001-2016
+# Copyright (C) 2001-2017
 # David M. Beazley (Dabeaz LLC)
 # All rights reserved.
 #
@@ -31,8 +31,8 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 # -----------------------------------------------------------------------------
 
-__version__    = '3.9'
-__tabversion__ = '3.8'
+__version__    = '3.10'
+__tabversion__ = '3.10'
 
 import re
 import sys
@@ -230,7 +230,7 @@
             titem = []
             txtitem = []
             for pat, func_name in lre:
-                titem.append((re.compile(pat, lextab._lexreflags | 
re.VERBOSE), _names_to_funcs(func_name, fdict)))
+                titem.append((re.compile(pat, lextab._lexreflags), 
_names_to_funcs(func_name, fdict)))
 
             self.lexstatere[statename] = titem
             self.lexstateretext[statename] = txtitem
@@ -495,7 +495,7 @@
         return []
     regex = '|'.join(relist)
     try:
-        lexre = re.compile(regex, re.VERBOSE | reflags)
+        lexre = re.compile(regex, reflags)
 
         # Build the index to function map for the matching engine
         lexindexfunc = [None] * (max(lexre.groupindex.values()) + 1)
@@ -758,7 +758,7 @@
                     continue
 
                 try:
-                    c = re.compile('(?P<%s>%s)' % (fname, _get_regex(f)), 
re.VERBOSE | self.reflags)
+                    c = re.compile('(?P<%s>%s)' % (fname, _get_regex(f)), 
self.reflags)
                     if c.match(''):
                         self.log.error("%s:%d: Regular expression for rule 
'%s' matches empty string", file, line, f.__name__)
                         self.error = True
@@ -782,7 +782,7 @@
                     continue
 
                 try:
-                    c = re.compile('(?P<%s>%s)' % (name, r), re.VERBOSE | 
self.reflags)
+                    c = re.compile('(?P<%s>%s)' % (name, r), self.reflags)
                     if (c.match('')):
                         self.log.error("Regular expression for rule '%s' 
matches empty string", name)
                         self.error = True
@@ -861,7 +861,7 @@
 # Build all of the regular expression rules from definitions in the supplied 
module
 # -----------------------------------------------------------------------------
 def lex(module=None, object=None, debug=False, optimize=False, lextab='lextab',
-        reflags=0, nowarn=False, outputdir=None, debuglog=None, errorlog=None):
+        reflags=int(re.VERBOSE), nowarn=False, outputdir=None, debuglog=None, 
errorlog=None):
 
     if lextab is None:
         lextab = 'lextab'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ply-3.9/ply/yacc.py new/ply-3.10/ply/yacc.py
--- old/ply-3.9/ply/yacc.py     2016-08-31 16:02:26.000000000 +0200
+++ new/ply-3.10/ply/yacc.py    2017-01-31 19:37:45.000000000 +0100
@@ -1,7 +1,7 @@
 # -----------------------------------------------------------------------------
 # ply: yacc.py
 #
-# Copyright (C) 2001-2016
+# Copyright (C) 2001-2017
 # David M. Beazley (Dabeaz LLC)
 # All rights reserved.
 #
@@ -67,8 +67,8 @@
 import base64
 import warnings
 
-__version__    = '3.9'
-__tabversion__ = '3.8'
+__version__    = '3.10'
+__tabversion__ = '3.10'
 
 #-----------------------------------------------------------------------------
 #                     === User configurable parameters ===
@@ -2585,8 +2585,13 @@
                                         # Need to decide on shift or reduce 
here
                                         # By default we favor shifting. Need 
to add
                                         # some precedence rules here.
-                                        sprec, slevel = 
Productions[st_actionp[a].number].prec
-                                        rprec, rlevel = Precedence.get(a, 
('right', 0))
+
+                                        # Shift precedence comes from the token
+                                        sprec, slevel = Precedence.get(a, 
('right', 0))
+
+                                        # Reduce precedence comes from rule 
being reduced (p)
+                                        rprec, rlevel = 
Productions[p.number].prec
+
                                         if (slevel < rlevel) or ((slevel == 
rlevel) and (rprec == 'left')):
                                             # We really need to reduce here.
                                             st_action[a] = -p.number
@@ -2644,8 +2649,13 @@
                                         #   -  if precedence of reduce rule is 
higher, we reduce.
                                         #   -  if precedence of reduce is same 
and left assoc, we reduce.
                                         #   -  otherwise we shift
-                                        rprec, rlevel = 
Productions[st_actionp[a].number].prec
+
+                                        # Shift precedence comes from the token
                                         sprec, slevel = Precedence.get(a, 
('right', 0))
+
+                                        # Reduce precedence comes from the 
rule that could have been reduced
+                                        rprec, rlevel = 
Productions[st_actionp[a].number].prec
+
                                         if (slevel > rlevel) or ((slevel == 
rlevel) and (rprec == 'right')):
                                             # We decide to shift here... 
highest precedence to shift
                                             
Productions[st_actionp[a].number].reduced -= 1
@@ -2958,28 +2968,20 @@
 
     # Compute a signature over the grammar
     def signature(self):
+        parts = []
         try:
-            from hashlib import md5
-        except ImportError:
-            from md5 import md5
-        try:
-            sig = md5()
             if self.start:
-                sig.update(self.start.encode('latin-1'))
+                parts.append(self.start)
             if self.prec:
-                sig.update(''.join([''.join(p) for p in 
self.prec]).encode('latin-1'))
+                parts.append(''.join([''.join(p) for p in self.prec]))
             if self.tokens:
-                sig.update(' '.join(self.tokens).encode('latin-1'))
+                parts.append(' '.join(self.tokens))
             for f in self.pfuncs:
                 if f[3]:
-                    sig.update(f[3].encode('latin-1'))
+                    parts.append(f[3])
         except (TypeError, ValueError):
             pass
-
-        digest = base64.b16encode(sig.digest())
-        if sys.version_info[0] >= 3:
-            digest = digest.decode('latin-1')
-        return digest
+        return ''.join(parts)
 
     # 
-----------------------------------------------------------------------------
     # validate_modules()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ply-3.9/ply.egg-info/PKG-INFO 
new/ply-3.10/ply.egg-info/PKG-INFO
--- old/ply-3.9/ply.egg-info/PKG-INFO   2016-08-31 16:13:14.000000000 +0200
+++ new/ply-3.10/ply.egg-info/PKG-INFO  2017-01-31 19:38:32.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: ply
-Version: 3.9
+Version: 3.10
 Summary: Python Lex & Yacc
 Home-page: http://www.dabeaz.com/ply/
 Author: David Beazley
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ply-3.9/setup.py new/ply-3.10/setup.py
--- old/ply-3.9/setup.py        2016-08-31 16:02:26.000000000 +0200
+++ new/ply-3.10/setup.py       2017-01-31 19:37:45.000000000 +0100
@@ -17,7 +17,7 @@
 It is compatible with both Python 2 and Python 3.
 """,
             license="""BSD""",
-            version = "3.9",
+            version = "3.10",
             author = "David Beazley",
             author_email = "[email protected]",
             maintainer = "David Beazley",


Reply via email to