• Bug#1064707: devscripts: FTBFS: AssertionError: black found code that n

    From Lucas Nussbaum@21:1/5 to All on Sun Feb 25 21:00:09 2024
    Source: devscripts
    Version: 2.23.7
    Severity: serious
    Justification: FTBFS
    Tags: trixie sid ftbfs
    User: lucas@debian.org
    Usertags: ftbfs-20240224 ftbfs-trixie

    Hi,

    During a rebuild of all packages in sid, your package failed to build
    on amd64.


    Relevant part (hopefully):
    ======================================================================
    FAIL: test_black (devscripts.test.test_black.BlackTestCase.test_black)
    Test: Run black code formatter on Python source code. ---------------------------------------------------------------------- Traceback (most recent call last):
    File "/<<PKGBUILDDIR>>/scripts/devscripts/test/test_black.py", line 43, in test_black
    self.fail(
    AssertionError: black found code that needs reformatting:
    --- reproducible-check 2023-04-02 17:44:26+00:00
    +++ reproducible-check 2024-02-24 22:54:57.358173+00:00
    @@ -198,13 +198,13 @@

    # We may have installed a binNMU version locally so we need to
    # strip these off when looking up against the JSON of results.
    version = re.sub(r"\+b\d+$", "", pkg_ver.version)

    - result[
    - (pkg.shortname, pkg_ver.architecture, version)
    - ] = pkg_ver.source_name
    + result[(pkg.shortname, pkg_ver.architecture, version)] = (
    + pkg_ver.source_name
    + )

    self.log.debug("Parsed %d installed binary packages", len(result))

    return result

    ----------------------------------------------------------------------
    Ran 21 tests in 13.726s

    FAILED (failures=1)
    Test failed: <unittest.runner.TextTestResult run=21 errors=0 failures=1> error: Test failed: <unittest.runner.TextTestResult run=21 errors=0 failures=1>
    make[3]: *** [Makefile:102: test_py] Error 1
    make[3]: Leaving directory '/<<PKGBUILDDIR>>/scripts'
    make[2]: *** [Makefile:68: test_scripts] Error 2
    make[2]: Leaving directory '/<<PKGBUILDDIR>>'
    make[1]: *** [Makefile:43: test] Error 2
    make[1]: Leaving directory '/<<PKGBUILDDIR>>'
    dh_auto_test: error: make -j8 test returned exit code 2


    The full build log is available from: http://qa-logs.debian.net/2024/02/24/devscripts_2.23.7_unstable.log

    All bugs filed during this archive rebuild are listed at: https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240224;users=lucas@debian.org
    or: https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240224&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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon McVittie@21:1/5 to Lucas Nussbaum on Tue Mar 12 13:10:01 2024
    On Sun, 25 Feb 2024 at 20:36:58 +0100, Lucas Nussbaum wrote:
    FAIL: test_black (devscripts.test.test_black.BlackTestCase.test_black) Test: Run black code formatter on Python source code.

    I think lint checks like this one should be run by contributors and CI
    when targeting the main branch, but skipped when building or testing
    a released, production-ready .deb package - they're just too fragile
    against new versions of the lint tool that move the goalposts.

    smcv

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)