Bug#1042278: python-snuggs: FTBFS: tests fail
Lucas Nussbaum
lucas at debian.org
Wed Jul 26 21:26:26 BST 2023
Source: python-snuggs
Version: 1.4.7-3
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lucas at debian.org
Usertags: ftbfs-20230726 ftbfs-trixie
Hi,
During a rebuild of all packages in sid, your package failed to build
on amd64.
Relevant part (hopefully):
> debian/rules binary
> dh binary --with python3 --buildsystem pybuild
> dh_update_autotools_config -O--buildsystem=pybuild
> dh_autoreconf -O--buildsystem=pybuild
> dh_auto_configure -O--buildsystem=pybuild
> I: pybuild base:240: python3.11 setup.py config
> running config
> dh_auto_build -O--buildsystem=pybuild
> I: pybuild base:240: /usr/bin/python3 setup.py build
> running build
> running build_py
> creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_snuggs/build/snuggs
> copying snuggs/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_snuggs/build/snuggs
> running egg_info
> creating snuggs.egg-info
> writing snuggs.egg-info/PKG-INFO
> writing dependency_links to snuggs.egg-info/dependency_links.txt
> writing requirements to snuggs.egg-info/requires.txt
> writing top-level names to snuggs.egg-info/top_level.txt
> writing manifest file 'snuggs.egg-info/SOURCES.txt'
> reading manifest file 'snuggs.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> warning: no files found matching 'VERSION.txt'
> adding license file 'LICENSE'
> adding license file 'AUTHORS.txt'
> writing manifest file 'snuggs.egg-info/SOURCES.txt'
> dh_auto_test -O--buildsystem=pybuild
> I: pybuild base:240: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_snuggs/build; python3.11 -m pytest /<<PKGBUILDDIR>>/test_snuggs.py
> ============================= test session starts ==============================
> platform linux -- Python 3.11.4, pytest-7.4.0, pluggy-1.2.0
> rootdir: /<<PKGBUILDDIR>>
> plugins: hypothesis-6.82.0
> collected 37 items
>
> ../../../test_snuggs.py ..........X...................F.F.F.. [100%]
>
> =================================== FAILURES ===================================
> __________________________ test_missing_closing_paren __________________________
>
> self = ')', instring = '(+ 1 2', loc = 6, doActions = True, callPreParse = False
>
> def _parseNoCache(
> self, instring, loc, doActions=True, callPreParse=True
> ) -> Tuple[int, ParseResults]:
> TRY, MATCH, FAIL = 0, 1, 2
> debugging = self.debug # and doActions)
> len_instring = len(instring)
>
> if debugging or self.failAction:
> # print("Match {} at loc {}({}, {})".format(self, loc, lineno(loc, instring), col(loc, instring)))
> try:
> if callPreParse and self.callPreparse:
> pre_loc = self.preParse(instring, loc)
> else:
> pre_loc = loc
> tokens_start = pre_loc
> if self.debugActions.debug_try:
> self.debugActions.debug_try(instring, tokens_start, self, False)
> if self.mayIndexError or pre_loc >= len_instring:
> try:
> loc, tokens = self.parseImpl(instring, pre_loc, doActions)
> except IndexError:
> raise ParseException(instring, len_instring, self.errmsg, self)
> else:
> loc, tokens = self.parseImpl(instring, pre_loc, doActions)
> except Exception as err:
> # print("Exception raised:", err)
> if self.debugActions.debug_fail:
> self.debugActions.debug_fail(
> instring, tokens_start, self, err, False
> )
> if self.failAction:
> self.failAction(instring, tokens_start, self, err)
> raise
> else:
> if callPreParse and self.callPreparse:
> pre_loc = self.preParse(instring, loc)
> else:
> pre_loc = loc
> tokens_start = pre_loc
> if self.mayIndexError or pre_loc >= len_instring:
> try:
> > loc, tokens = self.parseImpl(instring, pre_loc, doActions)
>
> /usr/lib/python3/dist-packages/pyparsing/core.py:845:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> self = ')', instring = '(+ 1 2', loc = 6, doActions = True
>
> def parseImpl(self, instring, loc, doActions=True):
> > if instring[loc] == self.firstMatchChar:
> E IndexError: string index out of range
>
> /usr/lib/python3/dist-packages/pyparsing/core.py:2471: IndexError
>
> During handling of the above exception, another exception occurred:
>
> line = '(+ 1 2'
>
> def handleLine(line):
> try:
> > result = expr.parseString(line)
>
> ../../../snuggs/__init__.py:185:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> /usr/lib/python3/dist-packages/pyparsing/util.py:256: in _inner
> return fn(self, *args, **kwargs)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> self = {Forward: Group:({{{Suppress:('(') map | partial} {{{'nil' | : ...} | * | + | / | - | & | | | <= | < | == | != | >= | .... | : ...} | 'nil'} | identifier} | number} | {string enclosed in "'" | string enclosed in '"'}}]...} Suppress:(')')})}
> instring = '(+ 1 2', parse_all = False
>
> def parse_string(
> self, instring: str, parse_all: bool = False, *, parseAll: bool = False
> ) -> ParseResults:
> """
> Parse a string with respect to the parser definition. This function is intended as the primary interface to the
> client code.
>
> :param instring: The input string to be parsed.
> :param parse_all: If set, the entire input string must match the grammar.
> :param parseAll: retained for pre-PEP8 compatibility, will be removed in a future release.
> :raises ParseException: Raised if ``parse_all`` is set and the input string does not match the whole grammar.
> :returns: the parsed data as a :class:`ParseResults` object, which may be accessed as a `list`, a `dict`, or
> an object with attributes if the given parser includes results names.
>
> If the input string is required to match the entire grammar, ``parse_all`` flag must be set to ``True``. This
> is also equivalent to ending the grammar with :class:`StringEnd`\\ ().
>
> To report proper column numbers, ``parse_string`` operates on a copy of the input string where all tabs are
> converted to spaces (8 spaces per tab, as per the default in ``string.expandtabs``). If the input string
> contains tabs and the grammar uses parse actions that use the ``loc`` argument to index into the string
> being parsed, one can ensure a consistent view of the input string by doing one of the following:
>
> - calling ``parse_with_tabs`` on your grammar before calling ``parse_string`` (see :class:`parse_with_tabs`),
> - define your parse action using the full ``(s,loc,toks)`` signature, and reference the input string using the
> parse action's ``s`` argument, or
> - explicitly expand the tabs in your input string before calling ``parse_string``.
>
> Examples:
>
> By default, partial matches are OK.
>
> >>> res = Word('a').parse_string('aaaaabaaa')
> >>> print(res)
> ['aaaaa']
>
> The parsing behavior varies by the inheriting class of this abstract class. Please refer to the children
> directly to see more examples.
>
> It raises an exception if parse_all flag is set and instring does not match the whole grammar.
>
> >>> res = Word('a').parse_string('aaaaabaaa', parse_all=True)
> Traceback (most recent call last):
> ...
> pyparsing.ParseException: Expected end of text, found 'b' (at char 5), (line:1, col:6)
> """
> parseAll = parse_all or parseAll
>
> ParserElement.reset_cache()
> if not self.streamlined:
> self.streamline()
> for e in self.ignoreExprs:
> e.streamline()
> if not self.keepTabs:
> instring = instring.expandtabs()
> try:
> loc, tokens = self._parse(instring, 0)
> if parseAll:
> loc = self.preParse(instring, loc)
> se = Empty() + StringEnd()
> se._parse(instring, loc)
> except ParseBaseException as exc:
> if ParserElement.verbose_stacktrace:
> raise
> else:
> # catch and re-raise exception from here, clearing out pyparsing internal stack trace
> > raise exc.with_traceback(None)
> E pyparsing.exceptions.ParseException: , found end of text (at char 6), (line:1, col:7)
>
> /usr/lib/python3/dist-packages/pyparsing/core.py:1190: ParseException
>
> During handling of the above exception, another exception occurred:
>
> def test_missing_closing_paren():
> with pytest.raises(SyntaxError) as excinfo:
> > snuggs.eval("(+ 1 2")
>
> ../../../test_snuggs.py:196:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../snuggs/__init__.py:218: in eval
> return handleLine(source)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> line = '(+ 1 2'
>
> def handleLine(line):
> try:
> result = expr.parseString(line)
> return processList(result[0])
> except ParseException as exc:
> text = str(exc)
> m = re.search(r'(Expected .+) \(at char (\d+)\), \(line:(\d+)', text)
> > msg = m.group(1)
> E AttributeError: 'NoneType' object has no attribute 'group'
>
> ../../../snuggs/__init__.py:190: AttributeError
> ______________________________ test_missing_func2 ______________________________
>
> line = '(# 1 2)'
>
> def handleLine(line):
> try:
> > result = expr.parseString(line)
>
> ../../../snuggs/__init__.py:185:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> /usr/lib/python3/dist-packages/pyparsing/util.py:256: in _inner
> return fn(self, *args, **kwargs)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> self = {Forward: Group:({{{Suppress:('(') map | partial} {{{'nil' | : ...} | * | + | / | - | & | | | <= | < | == | != | >= | .... | : ...} | 'nil'} | identifier} | number} | {string enclosed in "'" | string enclosed in '"'}}]...} Suppress:(')')})}
> instring = '(# 1 2)', parse_all = False
>
> def parse_string(
> self, instring: str, parse_all: bool = False, *, parseAll: bool = False
> ) -> ParseResults:
> """
> Parse a string with respect to the parser definition. This function is intended as the primary interface to the
> client code.
>
> :param instring: The input string to be parsed.
> :param parse_all: If set, the entire input string must match the grammar.
> :param parseAll: retained for pre-PEP8 compatibility, will be removed in a future release.
> :raises ParseException: Raised if ``parse_all`` is set and the input string does not match the whole grammar.
> :returns: the parsed data as a :class:`ParseResults` object, which may be accessed as a `list`, a `dict`, or
> an object with attributes if the given parser includes results names.
>
> If the input string is required to match the entire grammar, ``parse_all`` flag must be set to ``True``. This
> is also equivalent to ending the grammar with :class:`StringEnd`\\ ().
>
> To report proper column numbers, ``parse_string`` operates on a copy of the input string where all tabs are
> converted to spaces (8 spaces per tab, as per the default in ``string.expandtabs``). If the input string
> contains tabs and the grammar uses parse actions that use the ``loc`` argument to index into the string
> being parsed, one can ensure a consistent view of the input string by doing one of the following:
>
> - calling ``parse_with_tabs`` on your grammar before calling ``parse_string`` (see :class:`parse_with_tabs`),
> - define your parse action using the full ``(s,loc,toks)`` signature, and reference the input string using the
> parse action's ``s`` argument, or
> - explicitly expand the tabs in your input string before calling ``parse_string``.
>
> Examples:
>
> By default, partial matches are OK.
>
> >>> res = Word('a').parse_string('aaaaabaaa')
> >>> print(res)
> ['aaaaa']
>
> The parsing behavior varies by the inheriting class of this abstract class. Please refer to the children
> directly to see more examples.
>
> It raises an exception if parse_all flag is set and instring does not match the whole grammar.
>
> >>> res = Word('a').parse_string('aaaaabaaa', parse_all=True)
> Traceback (most recent call last):
> ...
> pyparsing.ParseException: Expected end of text, found 'b' (at char 5), (line:1, col:6)
> """
> parseAll = parse_all or parseAll
>
> ParserElement.reset_cache()
> if not self.streamlined:
> self.streamline()
> for e in self.ignoreExprs:
> e.streamline()
> if not self.keepTabs:
> instring = instring.expandtabs()
> try:
> loc, tokens = self._parse(instring, 0)
> if parseAll:
> loc = self.preParse(instring, loc)
> se = Empty() + StringEnd()
> se._parse(instring, loc)
> except ParseBaseException as exc:
> if ParserElement.verbose_stacktrace:
> raise
> else:
> # catch and re-raise exception from here, clearing out pyparsing internal stack trace
> > raise exc.with_traceback(None)
> E pyparsing.exceptions.ParseException: , found '#' (at char 1), (line:1, col:2)
>
> /usr/lib/python3/dist-packages/pyparsing/core.py:1190: ParseException
>
> During handling of the above exception, another exception occurred:
>
> def test_missing_func2():
> with pytest.raises(SyntaxError) as excinfo:
> > snuggs.eval("(# 1 2)")
>
> ../../../test_snuggs.py:211:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../snuggs/__init__.py:218: in eval
> return handleLine(source)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> line = '(# 1 2)'
>
> def handleLine(line):
> try:
> result = expr.parseString(line)
> return processList(result[0])
> except ParseException as exc:
> text = str(exc)
> m = re.search(r'(Expected .+) \(at char (\d+)\), \(line:(\d+)', text)
> > msg = m.group(1)
> E AttributeError: 'NoneType' object has no attribute 'group'
>
> ../../../snuggs/__init__.py:190: AttributeError
> _________________________ test_bogus_higher_order_func _________________________
>
> line = '((bogus * 2) 2)'
>
> def handleLine(line):
> try:
> > result = expr.parseString(line)
>
> ../../../snuggs/__init__.py:185:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> /usr/lib/python3/dist-packages/pyparsing/util.py:256: in _inner
> return fn(self, *args, **kwargs)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> self = {Forward: Group:({{{Suppress:('(') map | partial} {{{'nil' | : ...} | * | + | / | - | & | | | <= | < | == | != | >= | .... | : ...} | 'nil'} | identifier} | number} | {string enclosed in "'" | string enclosed in '"'}}]...} Suppress:(')')})}
> instring = '((bogus * 2) 2)', parse_all = False
>
> def parse_string(
> self, instring: str, parse_all: bool = False, *, parseAll: bool = False
> ) -> ParseResults:
> """
> Parse a string with respect to the parser definition. This function is intended as the primary interface to the
> client code.
>
> :param instring: The input string to be parsed.
> :param parse_all: If set, the entire input string must match the grammar.
> :param parseAll: retained for pre-PEP8 compatibility, will be removed in a future release.
> :raises ParseException: Raised if ``parse_all`` is set and the input string does not match the whole grammar.
> :returns: the parsed data as a :class:`ParseResults` object, which may be accessed as a `list`, a `dict`, or
> an object with attributes if the given parser includes results names.
>
> If the input string is required to match the entire grammar, ``parse_all`` flag must be set to ``True``. This
> is also equivalent to ending the grammar with :class:`StringEnd`\\ ().
>
> To report proper column numbers, ``parse_string`` operates on a copy of the input string where all tabs are
> converted to spaces (8 spaces per tab, as per the default in ``string.expandtabs``). If the input string
> contains tabs and the grammar uses parse actions that use the ``loc`` argument to index into the string
> being parsed, one can ensure a consistent view of the input string by doing one of the following:
>
> - calling ``parse_with_tabs`` on your grammar before calling ``parse_string`` (see :class:`parse_with_tabs`),
> - define your parse action using the full ``(s,loc,toks)`` signature, and reference the input string using the
> parse action's ``s`` argument, or
> - explicitly expand the tabs in your input string before calling ``parse_string``.
>
> Examples:
>
> By default, partial matches are OK.
>
> >>> res = Word('a').parse_string('aaaaabaaa')
> >>> print(res)
> ['aaaaa']
>
> The parsing behavior varies by the inheriting class of this abstract class. Please refer to the children
> directly to see more examples.
>
> It raises an exception if parse_all flag is set and instring does not match the whole grammar.
>
> >>> res = Word('a').parse_string('aaaaabaaa', parse_all=True)
> Traceback (most recent call last):
> ...
> pyparsing.ParseException: Expected end of text, found 'b' (at char 5), (line:1, col:6)
> """
> parseAll = parse_all or parseAll
>
> ParserElement.reset_cache()
> if not self.streamlined:
> self.streamline()
> for e in self.ignoreExprs:
> e.streamline()
> if not self.keepTabs:
> instring = instring.expandtabs()
> try:
> loc, tokens = self._parse(instring, 0)
> if parseAll:
> loc = self.preParse(instring, loc)
> se = Empty() + StringEnd()
> se._parse(instring, loc)
> except ParseBaseException as exc:
> if ParserElement.verbose_stacktrace:
> raise
> else:
> # catch and re-raise exception from here, clearing out pyparsing internal stack trace
> > raise exc.with_traceback(None)
> E pyparsing.exceptions.ParseException: , found 'bogus' (at char 2), (line:1, col:3)
>
> /usr/lib/python3/dist-packages/pyparsing/core.py:1190: ParseException
>
> During handling of the above exception, another exception occurred:
>
> def test_bogus_higher_order_func():
> with pytest.raises(SyntaxError) as excinfo:
> > snuggs.eval("((bogus * 2) 2)")
>
> ../../../test_snuggs.py:226:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../snuggs/__init__.py:218: in eval
> return handleLine(source)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> line = '((bogus * 2) 2)'
>
> def handleLine(line):
> try:
> result = expr.parseString(line)
> return processList(result[0])
> except ParseException as exc:
> text = str(exc)
> m = re.search(r'(Expected .+) \(at char (\d+)\), \(line:(\d+)', text)
> > msg = m.group(1)
> E AttributeError: 'NoneType' object has no attribute 'group'
>
> ../../../snuggs/__init__.py:190: AttributeError
> =========================== short test summary info ============================
> FAILED ../../../test_snuggs.py::test_missing_closing_paren - AttributeError: ...
> FAILED ../../../test_snuggs.py::test_missing_func2 - AttributeError: 'NoneTyp...
> FAILED ../../../test_snuggs.py::test_bogus_higher_order_func - AttributeError...
> =================== 3 failed, 33 passed, 1 xpassed in 0.92s ====================
> E: pybuild pybuild:388: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_snuggs/build; python3.11 -m pytest /<<PKGBUILDDIR>>/test_snuggs.py
> dh_auto_test: error: pybuild --test -i python{version} -p 3.11 returned exit code 13
The full build log is available from:
http://qa-logs.debian.net/2023/07/26/python-snuggs_1.4.7-3_unstable.log
All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20230726;users=lucas@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20230726&fusertaguser=lucas@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results
A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!
If you reassign this bug to another package, please mark it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects
If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.
More information about the Pkg-grass-devel
mailing list