Hello community, here is the log from the commit of package python-Arpeggio for openSUSE:Factory checked in at 2018-07-09 13:29:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Arpeggio (Old) and /work/SRC/openSUSE:Factory/.python-Arpeggio.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Arpeggio" Mon Jul 9 13:29:23 2018 rev:2 rq:621430 version:1.8.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Arpeggio/python-Arpeggio.changes 2017-09-05 15:15:57.842963594 +0200 +++ /work/SRC/openSUSE:Factory/.python-Arpeggio.new/python-Arpeggio.changes 2018-07-09 13:31:02.182527418 +0200 @@ -1,0 +2,18 @@ +Sat Jul 7 08:11:38 UTC 2018 - sebix+novell....@sebix.at + +- add fix-setup-encoding.patch to fix setup.py encoding issue +- update to version 1.8.0: + - Fixed issue #43. + *Backward incompatible change* for cleanpeg comment syntax. + Please see: https://github.com/igordejanovic/Arpeggio/issues/43 + - Added `file` parser param used for `DebugPrinter` to allow the + output stream to be changed from stdout. This allows doctests to + continue to work. Thanks ianmmoir@GitHub. +- update to version 1.7.1: + - Fixed bug in comment parsing optimization. +- update to version 1.7: + - Added re_flag parameter to RegExMatch constructor. Thanks Aluriak@GitHub. + - Fix in grammar language docs. Thanks schmittlauch@GitHub. + - Small fixes in examples. + +------------------------------------------------------------------- Old: ---- Arpeggio-1.6.1.tar.gz New: ---- Arpeggio-1.8.0.tar.gz fix-setup-encoding.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Arpeggio.spec ++++++ --- /var/tmp/diff_new_pack.bw7tWF/_old 2018-07-09 13:31:02.958525854 +0200 +++ /var/tmp/diff_new_pack.bw7tWF/_new 2018-07-09 13:31:02.962525846 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-Arpeggio # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 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 @@ -13,21 +13,24 @@ # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ +# %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without test Name: python-Arpeggio -Version: 1.6.1 +Version: 1.8.0 Release: 0 -License: MIT Summary: Packrat parser interpreter -Url: http://igordejanovic.net/Arpeggio/ +License: MIT Group: Development/Languages/Python +Url: http://igordejanovic.net/Arpeggio/ Source: https://files.pythonhosted.org/packages/source/A/Arpeggio/Arpeggio-%{version}.tar.gz -BuildRequires: python-rpm-macros +# PATCH-FIX-UPSTREAM fix-setup-encoding.patch +Patch0: https://github.com/igordejanovic/Arpeggio/pull/44.patch#/fix-setup-encoding.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros BuildArch: noarch %python_subpackages @@ -41,6 +44,7 @@ %prep %setup -q -n Arpeggio-%{version} +%patch0 -p1 %build %python_build ++++++ Arpeggio-1.6.1.tar.gz -> Arpeggio-1.8.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Arpeggio-1.6.1/Arpeggio.egg-info/PKG-INFO new/Arpeggio-1.8.0/Arpeggio.egg-info/PKG-INFO --- old/Arpeggio-1.6.1/Arpeggio.egg-info/PKG-INFO 2017-05-15 20:33:38.000000000 +0200 +++ new/Arpeggio-1.8.0/Arpeggio.egg-info/PKG-INFO 2018-05-16 17:01:20.000000000 +0200 @@ -1,12 +1,13 @@ Metadata-Version: 1.1 Name: Arpeggio -Version: 1.6.1 +Version: 1.8.0 Summary: Packrat parser interpreter Home-page: https://github.com/igordejanovic/Arpeggio Author: Igor R. Dejanovic -Author-email: igor DOT dejanovic AT gmail DOT com +Author-email: igor.dejano...@gmail.com License: MIT -Download-URL: https://github.com/igordejanovic/Arpeggio/archive/v1.6.1.tar.gz +Download-URL: https://github.com/igordejanovic/Arpeggio/archive/v1.8.0.tar.gz +Description-Content-Type: UNKNOWN Description: UNKNOWN Keywords: parser packrat peg Platform: UNKNOWN diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Arpeggio-1.6.1/PKG-INFO new/Arpeggio-1.8.0/PKG-INFO --- old/Arpeggio-1.6.1/PKG-INFO 2017-05-15 20:33:38.000000000 +0200 +++ new/Arpeggio-1.8.0/PKG-INFO 2018-05-16 17:01:20.000000000 +0200 @@ -1,12 +1,13 @@ Metadata-Version: 1.1 Name: Arpeggio -Version: 1.6.1 +Version: 1.8.0 Summary: Packrat parser interpreter Home-page: https://github.com/igordejanovic/Arpeggio Author: Igor R. Dejanovic -Author-email: igor DOT dejanovic AT gmail DOT com +Author-email: igor.dejano...@gmail.com License: MIT -Download-URL: https://github.com/igordejanovic/Arpeggio/archive/v1.6.1.tar.gz +Download-URL: https://github.com/igordejanovic/Arpeggio/archive/v1.8.0.tar.gz +Description-Content-Type: UNKNOWN Description: UNKNOWN Keywords: parser packrat peg Platform: UNKNOWN diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Arpeggio-1.6.1/arpeggio/__init__.py new/Arpeggio-1.8.0/arpeggio/__init__.py --- old/Arpeggio-1.6.1/arpeggio/__init__.py 2017-05-15 20:30:59.000000000 +0200 +++ new/Arpeggio-1.8.0/arpeggio/__init__.py 2018-05-16 16:59:57.000000000 +0200 @@ -19,7 +19,7 @@ from arpeggio.utils import isstr import types -__version__ = "1.6.1" +__version__ = "1.8.0" if sys.version < '3': text = unicode @@ -127,19 +127,22 @@ def __init__(self, **kwargs): self.debug = kwargs.pop("debug", False) + self.file = kwargs.pop("file", sys.stdout) self._current_ident = 0 super(DebugPrinter, self).__init__(**kwargs) def dprint(self, message, ident_change=0): """ - Handle debug message. Current implementation will print to stdout using - the current identation level. + Handle debug message. Print to the stream specified by the 'file' + keyword argument at the current indentation level. Default stream is + stdout. """ if ident_change < 0: self._current_ident += ident_change - print(("%s%s" % (" " * self._current_ident, message))) + print(("%s%s" % (" " * self._current_ident, message)), + file=self.file) if ident_change > 0: self._current_ident += ident_change @@ -724,8 +727,8 @@ pos = parser.position ws = parser.ws i = parser.input - l = len(i) - while pos < l and i[pos] in ws: + length = len(i) + while pos < length and i[pos] in ws: pos += 1 parser.position = pos except NoMatch: @@ -742,8 +745,8 @@ pos = parser.position ws = parser.ws i = parser.input - l = len(i) - while pos < l and i[pos] in ws: + length = len(i) + while pos < length and i[pos] in ws: pos += 1 parser.position = pos @@ -756,7 +759,7 @@ parser.position, parser.context())) - if parser.position in parser.comment_positions: + if parser.skipws and parser.position in parser.comment_positions: # Skip comments if already parsed. parser.position = parser.comment_positions[parser.position] else: @@ -779,21 +782,34 @@ It will be used to create regular expression using re.compile. ignore_case(bool): If case insensitive match is needed. Default is None to support propagation from global parser setting. + multiline(bool): allow regex to works on multiple lines + (re.DOTALL flag). Default is None to support propagation from + global parser setting. str_repr(str): A string that is used to represent this regex. + re_flags: flags parameter for re.compile if neither ignore_case + or multiple are set. ''' def __init__(self, to_match, rule_name='', root=False, ignore_case=None, - str_repr=None): + multiline=None, str_repr=None, re_flags=re.MULTILINE): super(RegExMatch, self).__init__(rule_name, root) self.to_match_regex = to_match self.ignore_case = ignore_case + self.multiline = multiline + self.explicit_flags = re_flags self.to_match = str_repr if str_repr is not None else to_match def compile(self): - flags = re.MULTILINE - if self.ignore_case: + flags = self.explicit_flags + if self.multiline is True: + flags |= re.DOTALL + if self.multiline is False and flags & re.DOTALL: + flags -= re.DOTALL + if self.ignore_case is True: flags |= re.IGNORECASE + if self.ignore_case is False and flags & re.IGNORECASE: + flags -= re.IGNORECASE self.regex = re.compile(self.to_match_regex, flags) def __str__(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Arpeggio-1.6.1/arpeggio/cleanpeg.py new/Arpeggio-1.8.0/arpeggio/cleanpeg.py --- old/Arpeggio-1.6.1/arpeggio/cleanpeg.py 2017-05-14 17:38:26.000000000 +0200 +++ new/Arpeggio-1.8.0/arpeggio/cleanpeg.py 2018-05-10 10:27:00.000000000 +0200 @@ -52,7 +52,7 @@ def rule_crossref(): return rule_name def str_match(): return _(r'''(?s)('[^'\\]*(?:\\.[^'\\]*)*')|''' r'''("[^"\\]*(?:\\.[^"\\]*)*")''') -def comment(): return _("#.*\n") +def comment(): return "//", _(".*\n") class ParserPEG(ParserPEGOrig): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Arpeggio-1.6.1/setup.py new/Arpeggio-1.8.0/setup.py --- old/Arpeggio-1.6.1/setup.py 2017-01-26 11:55:25.000000000 +0100 +++ new/Arpeggio-1.8.0/setup.py 2018-05-16 16:59:47.000000000 +0200 @@ -4,7 +4,7 @@ # Name: arpeggio.py # Purpose: PEG parser interpreter # Author: Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com> -# Copyright: (c) 2009-2016 Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com> +# Copyright: (c) 2009-2017 Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com> # License: MIT License # # Arpeggio is an implementation of packrat parser interpreter based on PEG @@ -15,13 +15,20 @@ import os import sys from setuptools import setup -import arpeggio + +VERSIONFILE = "arpeggio/__init__.py" +VERSION = None +for line in open(VERSIONFILE, "r").readlines(): + if line.startswith('__version__'): + VERSION = line.split('"')[1] + +if not VERSION: + raise RuntimeError('No version defined in arpeggio/__init__.py') NAME = 'Arpeggio' -VERSION = arpeggio.__version__ DESC = 'Packrat parser interpreter' AUTHOR = 'Igor R. Dejanovic' -AUTHOR_EMAIL = 'igor DOT dejanovic AT gmail DOT com' +AUTHOR_EMAIL = 'igor.dejano...@gmail.com' LICENSE = 'MIT' URL = 'https://github.com/igordejanovic/Arpeggio' DOWNLOAD_URL = 'https://github.com/igordejanovic/Arpeggio/archive/v{}.tar.gz'\ @@ -45,18 +52,18 @@ sys.exit() setup( - name = NAME, - version = VERSION, - description = DESC, - author = AUTHOR, - author_email = AUTHOR_EMAIL, - maintainer = AUTHOR, - maintainer_email = AUTHOR_EMAIL, - license = LICENSE, - url = URL, - download_url = DOWNLOAD_URL, - packages = ["arpeggio"], - keywords = "parser packrat peg", + name=NAME, + version=VERSION, + description=DESC, + author=AUTHOR, + author_email=AUTHOR_EMAIL, + maintainer=AUTHOR, + maintainer_email=AUTHOR_EMAIL, + license=LICENSE, + url=URL, + download_url=DOWNLOAD_URL, + packages=["arpeggio"], + keywords="parser packrat peg", classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', ++++++ fix-setup-encoding.patch ++++++ >From a23376c03106779b75dc332b04b68deca57eca5a Mon Sep 17 00:00:00 2001 From: Sebastian Wagner <se...@sebix.at> Date: Sat, 7 Jul 2018 10:16:34 +0200 Subject: [PATCH] Fix setup.py version read utf-8 encoding in environment was assumed --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2b17939..0e2d39f 100644 --- a/setup.py +++ b/setup.py @@ -12,13 +12,14 @@ # Parsers are defined using python language construction or PEG language. ############################################################################### +import codecs import os import sys from setuptools import setup VERSIONFILE = "arpeggio/__init__.py" VERSION = None -for line in open(VERSIONFILE, "r").readlines(): +for line in codecs.open(VERSIONFILE, "r", encoding='utf-8').readlines(): if line.startswith('__version__'): VERSION = line.split('"')[1]