Hello community, here is the log from the commit of package python-ply for openSUSE:Factory checked in at Thu Mar 31 15:54:01 CEST 2011.
-------- --- python-ply/python-ply.changes 2010-09-14 10:52:24.000000000 +0200 +++ python-ply/python-ply.changes 2011-03-29 16:07:35.000000000 +0200 @@ -1,0 +2,12 @@ +Tue Mar 29 14:02:28 UTC 2011 - sasc...@suse.de + +- Update to 3.4: + + Minor patch to make cpp.py compatible with Python 3. + + Fixed setup.py trove classifiers to properly list PLY as Python + 3 compatible. +- License changed to BSD3c +- Packaged more doc files +- Moved important docs (README, ..) to base package +- Fixed build for non-SUSE distros + +------------------------------------------------------------------- @@ -4,4 +16,4 @@ -- update to 3.3: - PLY-3.3 is a minor bug fix release, it supports - both Python 2 and Python 3. -- license changed to BSD +- Update to 3.3: + + PLY-3.3 is a minor bug fix release, it supports both Python 2 + and Python 3. +- License changed to BSD @@ -12 +24 @@ -- use new python macros +- Use new python macros calling whatdependson for head-i586 Old: ---- ply-3.3.tar.gz New: ---- ply-3.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-ply.spec ++++++ --- /var/tmp/diff_new_pack.9UloW2/_old 2011-03-31 15:52:59.000000000 +0200 +++ /var/tmp/diff_new_pack.9UloW2/_new 2011-03-31 15:52:59.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package python-ply (Version 3.3) +# spec file for package python-ply # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products 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,77 +17,79 @@ # norootforbuild -BuildRequires: python-devel -Summary: Lex and Yacc-like tools written in Python +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} + +%define mod_name ply -Name: python-ply -Version: 3.3 +Name: python-%{mod_name} +Version: 3.4 Release: 1 -License: BSD +Url: http://www.dabeaz.com/ply/ +Summary: Python Lex & Yacc +License: BSD3c Group: Development/Languages/Python -Source0: http://www.dabeaz.com/ply/ply-%{version}.tar.gz +Source: %{mod_name}-%{version}.tar.gz Patch0: python-ply-shebangs.patch -Url: http://www.dabeaz.com/ply BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: python-devel +%if 0%{?suse_version} %py_requires -%if %suse_version > 1120 +%if 0%{?suse_version} > 1110 BuildArch: noarch %endif +%endif %description -PLY is yet another implementation of lex and yacc for Python. - Although several other parsing tools are available for Python, - there are several reasons why you might want to take a look at - PLY: - It uses LR-parsing which is reasonably efficient and well - suited for larger grammars. - -- PLY provides most of the standard lex/yacc features including - support for empty productions, precedence rules, error recovery, - and support for ambiguous grammars. +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 +uses LALR(1) parsing which is efficient and well suited for larger grammars. + +PLY provides most of the standard lex/yacc features including support for empty +productions, precedence rules, error recovery, and support for ambiguous grammars. -- PLY is extremely easy to use and provides very extensive error -checking. +PLY is extremely easy to use and provides very extensive error checking. +It is compatible with both Python 2 and Python 3. %package doc License: LGPLv2.1+ Group: Development/Languages/Python -Summary: Lex and Yacc-like tools written in Python +Summary: Python Lex & Yacc Requires: %{name} = %{version} %description doc -PLY is yet another implementation of lex and yacc for Python. - Although several other parsing tools are available for Python, - there are several reasons why you might want to take a look at - PLY: - It uses LR-parsing which is reasonably efficient and well - suited for larger grammars. - -- PLY provides most of the standard lex/yacc features including - support for empty productions, precedence rules, error recovery, - and support for ambiguous grammars. +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 +uses LALR(1) parsing which is efficient and well suited for larger grammars. + +PLY provides most of the standard lex/yacc features including support for empty +productions, precedence rules, error recovery, and support for ambiguous grammars. -- PLY is extremely easy to use and provides very extensive error -checking. +PLY is extremely easy to use and provides very extensive error checking. +It is compatible with both Python 2 and Python 3. %prep -%setup -n ply-%{version} +%setup -q -n %{mod_name}-%{version} %patch0 -p1 %build +export CFLAGS="%{optflags}" +python setup.py build %install -python setup.py install --prefix /usr --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES +python setup.py install --prefix=%{_prefix} --root=%{buildroot} chmod a-x test/* %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} -%files -f INSTALLED_FILES -%defattr(-,root,root) -# setup.py is kind of dumb, so: -%dir %{python_sitelib}/ply +%files +%defattr(-,root,root,-) +%doc ANNOUNCE CHANGES README TODO +%python_sitelib/%{mod_name}* %files doc -%defattr(-, root, root) -%doc CHANGES README TODO doc example test +%defattr(-,root,root,-) +%doc doc example test %changelog ++++++ ply-3.3.tar.gz -> ply-3.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ply-3.3/ANNOUNCE new/ply-3.4/ANNOUNCE --- old/ply-3.3/ANNOUNCE 2009-09-02 16:27:23.000000000 +0200 +++ new/ply-3.4/ANNOUNCE 2011-02-18 04:52:28.000000000 +0100 @@ -1,11 +1,11 @@ -September 2, 2009 +February 17, 2011 - Announcing : PLY-3.3 (Python Lex-Yacc) + Announcing : PLY-3.4 (Python Lex-Yacc) http://www.dabeaz.com/ply -I'm pleased to announce PLY-3.3--a pure Python implementation of the -common parsing tools lex and yacc. PLY-3.3 is a minor bug fix +I'm pleased to announce PLY-3.4--a pure Python implementation of the +common parsing tools lex and yacc. PLY-3.4 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.3/CHANGES new/ply-3.4/CHANGES --- old/ply-3.3/CHANGES 2009-08-27 03:28:42.000000000 +0200 +++ new/ply-3.4/CHANGES 2011-02-18 04:52:28.000000000 +0100 @@ -1,3 +1,16 @@ +Version 3.4 +--------------------- +02/17/11: beazley + Minor patch to make cpp.py compatible with Python 3. Note: This + is an experimental file not currently used by the rest of PLY. + +02/17/11: beazley + Fixed setup.py trove classifiers to properly list PLY as + Python 3 compatible. + +01/02/11: beazley + Migration of repository to github. + Version 3.3 ----------------------------- 08/25/09: beazley diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ply-3.3/PKG-INFO new/ply-3.4/PKG-INFO --- old/ply-3.3/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/ply-3.4/PKG-INFO 2011-02-18 04:52:35.000000000 +0100 @@ -0,0 +1,22 @@ +Metadata-Version: 1.0 +Name: ply +Version: 3.4 +Summary: Python Lex & Yacc +Home-page: http://www.dabeaz.com/ply/ +Author: David Beazley +Author-email: d...@dabeaz.com +License: BSD +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 + uses LALR(1) parsing which is efficient and well suited for larger grammars. + + PLY provides most of the standard lex/yacc features including support for empty + productions, precedence rules, error recovery, and support for ambiguous grammars. + + PLY is extremely easy to use and provides very extensive error checking. + It is compatible with both Python 2 and Python 3. + +Platform: UNKNOWN +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ply-3.3/README new/ply-3.4/README --- old/ply-3.3/README 2009-09-02 16:27:23.000000000 +0200 +++ new/ply-3.4/README 2011-02-18 04:52:28.000000000 +0100 @@ -1,6 +1,6 @@ -PLY (Python Lex-Yacc) Version 3.3 +PLY (Python Lex-Yacc) Version 3.4 -Copyright (C) 2001-2009, +Copyright (C) 2001-2011, David M. Beazley (Dabeaz LLC) All rights reserved. @@ -177,7 +177,7 @@ t.lexer.lineno += t.value.count("\n") def t_error(t): - print "Illegal character '%s'" % t.value[0] + print("Illegal character '%s'" % t.value[0]) t.lexer.skip(1) # Build the lexer @@ -200,7 +200,7 @@ def p_statement_expr(p): 'statement : expression' - print p[1] + print(p[1]) def p_expression_binop(p): '''expression : expression PLUS expression @@ -229,18 +229,18 @@ try: p[0] = names[p[1]] except LookupError: - print "Undefined name '%s'" % p[1] + print("Undefined name '%s'" % p[1]) p[0] = 0 def p_error(p): - print "Syntax error at '%s'" % p.value + print("Syntax error at '%s'" % p.value) import ply.yacc as yacc yacc.yacc() while 1: try: - s = raw_input('calc > ') + s = raw_input('calc > ') # use input() on Python 3 except EOFError: break yacc.parse(s) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ply-3.3/doc/ply.html new/ply-3.4/doc/ply.html --- old/ply-3.3/doc/ply.html 2009-09-02 16:27:23.000000000 +0200 +++ new/ply-3.4/doc/ply.html 2011-02-18 04:52:28.000000000 +0100 @@ -12,7 +12,7 @@ </b> <p> -<b>PLY Version: 3.3</b> +<b>PLY Version: 3.4</b> <p> <!-- INDEX --> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ply-3.3/ply/cpp.py new/ply-3.4/ply/cpp.py --- old/ply-3.3/ply/cpp.py 2009-02-06 14:52:07.000000000 +0100 +++ new/ply-3.4/ply/cpp.py 2011-02-18 04:52:28.000000000 +0100 @@ -176,7 +176,7 @@ # ---------------------------------------------------------------------- def error(self,file,line,msg): - print >>sys.stderr,"%s:%d %s" % (file,line,msg) + print("%s:%d %s" % (file,line,msg)) # ---------------------------------------------------------------------- # lexprobe() @@ -193,7 +193,7 @@ self.lexer.input("identifier") tok = self.lexer.token() if not tok or tok.value != "identifier": - print "Couldn't determine identifier type" + print("Couldn't determine identifier type") else: self.t_ID = tok.type @@ -201,7 +201,7 @@ self.lexer.input("12345") tok = self.lexer.token() if not tok or int(tok.value) != 12345: - print "Couldn't determine integer type" + print("Couldn't determine integer type") else: self.t_INTEGER = tok.type self.t_INTEGER_TYPE = type(tok.value) @@ -210,7 +210,7 @@ self.lexer.input("\"filename\"") tok = self.lexer.token() if not tok or tok.value != "\"filename\"": - print "Couldn't determine string type" + print("Couldn't determine string type") else: self.t_STRING = tok.type @@ -227,7 +227,7 @@ tok = self.lexer.token() if not tok or tok.value != "\n": self.t_NEWLINE = None - print "Couldn't determine token for newlines" + print("Couldn't determine token for newlines") else: self.t_NEWLINE = tok.type @@ -239,7 +239,7 @@ self.lexer.input(c) tok = self.lexer.token() if not tok or tok.value != c: - print "Unable to lex '%s' required for preprocessor" % c + print("Unable to lex '%s' required for preprocessor" % c) # ---------------------------------------------------------------------- # add_path() @@ -737,7 +737,7 @@ break i += 1 else: - print "Malformed #include <...>" + print("Malformed #include <...>") return filename = "".join([x.value for x in tokens[1:i]]) path = self.path + [""] + self.temp_path @@ -745,7 +745,7 @@ filename = tokens[0].value[1:-1] path = self.temp_path + [""] + self.path else: - print "Malformed #include statement" + print("Malformed #include statement") return for p in path: iname = os.path.join(p,filename) @@ -759,10 +759,10 @@ if dname: del self.temp_path[0] break - except IOError,e: + except IOError: pass else: - print "Couldn't find '%s'" % filename + print("Couldn't find '%s'" % filename) # ---------------------------------------------------------------------- # define() @@ -794,7 +794,7 @@ variadic = False for a in args: if variadic: - print "No more arguments may follow a variadic argument" + print("No more arguments may follow a variadic argument") break astr = "".join([str(_i.value) for _i in a]) if astr == "...": @@ -813,7 +813,7 @@ a[0].value = a[0].value[:-3] continue if len(a) > 1 or a[0].type != self.t_ID: - print "Invalid macro argument" + print("Invalid macro argument") break else: mvalue = self.tokenstrip(linetok[1+tokcount:]) @@ -830,9 +830,9 @@ self.macro_prescan(m) self.macros[name.value] = m else: - print "Bad macro definition" + print("Bad macro definition") except LookupError: - print "Bad macro definition" + print("Bad macro definition") # ---------------------------------------------------------------------- # undef() @@ -864,7 +864,7 @@ def token(self): try: while True: - tok = self.parser.next() + tok = next(self.parser) if tok.type not in self.ignore: return tok except StopIteration: self.parser = None @@ -884,7 +884,7 @@ while True: tok = p.token() if not tok: break - print p.source, tok + print(p.source, tok) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ply-3.3/ply/lex.py new/ply-3.4/ply/lex.py --- old/ply-3.3/ply/lex.py 2009-08-27 03:28:42.000000000 +0200 +++ new/ply-3.4/ply/lex.py 2011-02-18 04:52:28.000000000 +0100 @@ -1,7 +1,7 @@ # ----------------------------------------------------------------------------- # ply: lex.py # -# Copyright (C) 2001-2009, +# Copyright (C) 2001-2011, # David M. Beazley (Dabeaz LLC) # All rights reserved. # @@ -31,7 +31,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ----------------------------------------------------------------------------- -__version__ = "3.3" +__version__ = "3.4" __tabversion__ = "3.2" # Version of table file used import re, sys, types, copy, os diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ply-3.3/ply/yacc.py new/ply-3.4/ply/yacc.py --- old/ply-3.3/ply/yacc.py 2009-09-02 16:27:23.000000000 +0200 +++ new/ply-3.4/ply/yacc.py 2011-02-18 04:52:28.000000000 +0100 @@ -1,7 +1,7 @@ # ----------------------------------------------------------------------------- # ply: yacc.py # -# Copyright (C) 2001-2009, +# Copyright (C) 2001-2011, # David M. Beazley (Dabeaz LLC) # All rights reserved. # @@ -59,7 +59,7 @@ # own risk! # ---------------------------------------------------------------------------- -__version__ = "3.3" +__version__ = "3.4" __tabversion__ = "3.2" # Table version #----------------------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ply-3.3/setup.py new/ply-3.4/setup.py --- old/ply-3.3/setup.py 2009-09-02 16:29:24.000000000 +0200 +++ new/ply-3.4/setup.py 2011-02-18 04:52:28.000000000 +0100 @@ -14,13 +14,18 @@ productions, precedence rules, error recovery, and support for ambiguous grammars. PLY is extremely easy to use and provides very extensive error checking. +It is compatible with both Python 2 and Python 3. """, license="""BSD""", - version = "3.3", + version = "3.4", author = "David Beazley", author_email = "d...@dabeaz.com", maintainer = "David Beazley", maintainer_email = "d...@dabeaz.com", url = "http://www.dabeaz.com/ply/", packages = ['ply'], + classifiers = [ + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 2', + ] ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ply-3.3/test/README new/ply-3.4/test/README --- old/ply-3.3/test/README 2006-11-21 16:09:46.000000000 +0100 +++ new/ply-3.4/test/README 2011-02-18 04:52:28.000000000 +0100 @@ -4,8 +4,4 @@ $ python testlex.py . $ python testyacc.py . -The tests can also be run using the Python unittest module. - - $ python rununit.py - The script 'cleanup.sh' cleans up this directory to its original state. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ply-3.3/test/cleanup.sh new/ply-3.4/test/cleanup.sh --- old/ply-3.3/test/cleanup.sh 2008-05-29 16:00:14.000000000 +0200 +++ new/ply-3.4/test/cleanup.sh 2011-02-18 04:52:28.000000000 +0100 @@ -1,4 +1,4 @@ #!/bin/sh -rm -f *~ *.pyc *.pyo *.dif *.out +rm -rf *~ *.pyc *.pyo *.dif *.out __pycache__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ply-3.3/test/testlex.py new/ply-3.4/test/testlex.py --- old/ply-3.3/test/testlex.py 2009-02-02 23:53:39.000000000 +0100 +++ new/ply-3.4/test/testlex.py 2011-02-18 04:52:28.000000000 +0100 @@ -7,11 +7,33 @@ import io as StringIO import sys +import os +import imp +import warnings + sys.path.insert(0,"..") sys.tracebacklimit = 0 import ply.lex +def make_pymodule_path(filename): + path = os.path.dirname(filename) + file = os.path.basename(filename) + mod, ext = os.path.splitext(file) + + if sys.hexversion >= 0x3020000: + modname = mod+"."+imp.get_tag()+ext + fullpath = os.path.join(path,'__pycache__',modname) + else: + fullpath = filename + return fullpath + +def pymodule_out_exists(filename): + return os.path.exists(make_pymodule_path(filename)) + +def pymodule_out_remove(filename): + os.remove(make_pymodule_path(filename)) + def check_expected(result,expected): if sys.version_info[0] >= 3: if isinstance(result,str): @@ -40,6 +62,9 @@ def setUp(self): sys.stderr = StringIO.StringIO() sys.stdout = StringIO.StringIO() + if sys.hexversion >= 0x3020000: + warnings.filterwarnings('ignore',category=ResourceWarning) + def tearDown(self): sys.stderr = sys.__stderr__ sys.stdout = sys.__stdout__ @@ -325,9 +350,9 @@ "(NUMBER,3,1,0)\n" "(PLUS,'+',1,1)\n" "(NUMBER,4,1,2)\n")) - self.assert_(os.path.exists("lextab.pyo")) + self.assert_(pymodule_out_exists("lextab.pyo")) - os.remove("lextab.pyo") + pymodule_out_remove("lextab.pyo") p = subprocess.Popen([sys.executable,'-OO','lex_optimize.py'], stdout=subprocess.PIPE) result = p.stdout.read() @@ -335,17 +360,17 @@ "(NUMBER,3,1,0)\n" "(PLUS,'+',1,1)\n" "(NUMBER,4,1,2)\n")) - self.assert_(os.path.exists("lextab.pyo")) + self.assert_(pymodule_out_exists("lextab.pyo")) try: os.remove("lextab.py") except OSError: pass try: - os.remove("lextab.pyc") + pymodule_out_remove("lextab.pyc") except OSError: pass try: - os.remove("lextab.pyo") + pymodule_out_remove("lextab.pyo") except OSError: pass @@ -377,8 +402,8 @@ "(NUMBER,3,1,0)\n" "(PLUS,'+',1,1)\n" "(NUMBER,4,1,2)\n")) - self.assert_(os.path.exists("opt2tab.pyo")) - os.remove("opt2tab.pyo") + self.assert_(pymodule_out_exists("opt2tab.pyo")) + pymodule_out_remove("opt2tab.pyo") p = subprocess.Popen([sys.executable,'-OO','lex_optimize2.py'], stdout=subprocess.PIPE) result = p.stdout.read() @@ -386,17 +411,17 @@ "(NUMBER,3,1,0)\n" "(PLUS,'+',1,1)\n" "(NUMBER,4,1,2)\n")) - self.assert_(os.path.exists("opt2tab.pyo")) + self.assert_(pymodule_out_exists("opt2tab.pyo")) try: os.remove("opt2tab.py") except OSError: pass try: - os.remove("opt2tab.pyc") + pymodule_out_remove("opt2tab.pyc") except OSError: pass try: - os.remove("opt2tab.pyo") + pymodule_out_remove("opt2tab.pyo") except OSError: pass @@ -425,8 +450,8 @@ "(NUMBER,3,1,0)\n" "(PLUS,'+',1,1)\n" "(NUMBER,4,1,2)\n")) - self.assert_(os.path.exists("lexdir/sub/calctab.pyo")) - os.remove("lexdir/sub/calctab.pyo") + self.assert_(pymodule_out_exists("lexdir/sub/calctab.pyo")) + pymodule_out_remove("lexdir/sub/calctab.pyo") p = subprocess.Popen([sys.executable,'-OO','lex_optimize3.py'], stdout=subprocess.PIPE) result = p.stdout.read() @@ -434,7 +459,7 @@ "(NUMBER,3,1,0)\n" "(PLUS,'+',1,1)\n" "(NUMBER,4,1,2)\n")) - self.assert_(os.path.exists("lexdir/sub/calctab.pyo")) + self.assert_(pymodule_out_exists("lexdir/sub/calctab.pyo")) try: shutil.rmtree("lexdir") except OSError: @@ -468,8 +493,8 @@ "(NUMBER,3,1,0)\n" "(+,'+',1,1)\n" "(NUMBER,4,1,2)\n")) - self.assert_(os.path.exists("aliastab.pyo")) - os.remove("aliastab.pyo") + self.assert_(pymodule_out_exists("aliastab.pyo")) + pymodule_out_remove("aliastab.pyo") p = subprocess.Popen([sys.executable,'-OO','lex_opt_alias.py'], stdout=subprocess.PIPE) result = p.stdout.read() @@ -477,17 +502,17 @@ "(NUMBER,3,1,0)\n" "(+,'+',1,1)\n" "(NUMBER,4,1,2)\n")) - self.assert_(os.path.exists("aliastab.pyo")) + self.assert_(pymodule_out_exists("aliastab.pyo")) try: os.remove("aliastab.py") except OSError: pass try: - os.remove("aliastab.pyc") + pymodule_out_remove("aliastab.pyc") except OSError: pass try: - os.remove("aliastab.pyo") + pymodule_out_remove("aliastab.pyo") except OSError: pass @@ -531,8 +556,8 @@ "(TOK999,'TOK999:',1,47)\n" )) - self.assert_(os.path.exists("manytab.pyo")) - os.remove("manytab.pyo") + self.assert_(pymodule_out_exists("manytab.pyo")) + pymodule_out_remove("manytab.pyo") try: os.remove("manytab.py") except OSError: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ply-3.3/test/testyacc.py new/ply-3.4/test/testyacc.py --- old/ply-3.3/test/testyacc.py 2009-03-24 12:40:56.000000000 +0100 +++ new/ply-3.4/test/testyacc.py 2011-02-18 04:52:28.000000000 +0100 @@ -8,11 +8,32 @@ import sys import os +import warnings sys.path.insert(0,"..") sys.tracebacklimit = 0 import ply.yacc +import imp + +def make_pymodule_path(filename): + path = os.path.dirname(filename) + file = os.path.basename(filename) + mod, ext = os.path.splitext(file) + + if sys.hexversion >= 0x3020000: + modname = mod+"."+imp.get_tag()+ext + fullpath = os.path.join(path,'__pycache__',modname) + else: + fullpath = filename + return fullpath + +def pymodule_out_exists(filename): + return os.path.exists(make_pymodule_path(filename)) + +def pymodule_out_remove(filename): + os.remove(make_pymodule_path(filename)) + def check_expected(result,expected): resultlines = [] @@ -43,10 +64,13 @@ sys.stdout = StringIO.StringIO() try: os.remove("parsetab.py") - os.remove("parsetab.pyc") + pymodule_out_remove("parsetab.pyc") except OSError: pass + if sys.hexversion >= 0x3020000: + warnings.filterwarnings('ignore',category=ResourceWarning) + def tearDown(self): sys.stderr = sys.__stderr__ sys.stdout = sys.__stdout__ @@ -297,7 +321,6 @@ def test_yacc_uprec(self): self.assertRaises(ply.yacc.YaccError,run_import,"yacc_uprec") result = sys.stderr.getvalue() - print repr(result) self.assert_(check_expected(result, "yacc_uprec.py:37: Nothing known about the precedence of 'UMINUS'\n" )) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org