Bug#1020456: cypari2 FTBFS with PARI 2.15.0
Bill Allombert
ballombe at debian.org
Sat Oct 1 21:01:30 BST 2022
On Wed, Sep 21, 2022 at 11:57:40PM +0300, Adrian Bunk wrote:
> Source: cypari2
> Version: 2.1.2-2
> Severity: serious
> Tags: ftbfs bookworm sid
>
> https://buildd.debian.org/status/logs.php?pkg=cypari2&ver=2.1.2-2%2Bb3
>
> Differences (ndiff with -expected +actual):
> Traceback (most recent call last):
> - ...
> - PariError: call_python: forbidden multiplication t_VEC (1 elts) * t_VEC (1 elts)
> + File "/usr/lib/python3.10/doctest.py", line 1350, in __run
> + exec(compile(example.source, filename, "single",
> + File "<doctest cypari2.closure.__test__.objtoclosure (line 145)[18]>", line 1, in <module>
> + mul([1], [2])
> + File "cypari2/gen.pyx", line 4107, in cypari2.gen.Gen.__call__
> + sig_on()
> + File "cypari2/handle_error.pyx", line 213, in cypari2.handle_error._pari_err_handle
> + raise PariError(errnum, pari_error_string, clone_gen_noclear(E))
> + PariError: call_python: incorrect type in qfbcomp (t_VEC)
a
Some explanation for the failure.
PARI has merged t_QFI and t_QFR to a new type t_QFB. This explains this error.
This might requires some actual fix in cpari2.
> **********************************************************************
> File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cypari2/build/cypari2/closure.cpython-310-x86_64-linux-gnu.so", line ?, in cypari2.closure.objtoclosure
> Failed example:
> mul([1], [2])
> Differences (ndiff with -expected +actual):
> Traceback (most recent call last):
> - ...
> - PariError: call_python: forbidden multiplication t_VEC (1 elts) * t_VEC (1 elts)
> + File "/usr/lib/python3.10/doctest.py", line 1350, in __run
> + exec(compile(example.source, filename, "single",
> + File "<doctest cypari2.closure.objtoclosure[18]>", line 1, in <module>
> + mul([1], [2])
> + File "cypari2/gen.pyx", line 4107, in cypari2.gen.Gen.__call__
> + sig_on()
> + File "cypari2/handle_error.pyx", line 213, in cypari2.handle_error._pari_err_handle
> + raise PariError(errnum, pari_error_string, clone_gen_noclear(E))
> + PariError: call_python: incorrect type in qfbcomp (t_VEC)
Idem
> **********************************************************************
> 2 items had failures:
> 1 of 19 in cypari2.closure.__test__.objtoclosure (line 145)
> 1 of 19 in cypari2.closure.objtoclosure
> ***Test Failed*** 2 failures.
> ================================================================================
> Testing cypari2.convert
> ================================================================================
> Testing cypari2.gen
> **********************************************************************
> File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cypari2/build/cypari2/gen.cpython-310-x86_64-linux-gnu.so", line ?, in cypari2.gen.Gen.__complex__
> Failed example:
> complex(g)
> Differences (ndiff with -expected +actual):
> - (2.2847006554165614+0j)
> + (1.118033988749895+0j)
> **********************************************************************
> File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cypari2/build/cypari2/gen.cpython-310-x86_64-linux-gnu.so", line ?, in cypari2.gen.__test__.Gen.__complex__ (line 2006)
> Failed example:
> complex(g)
> Differences (ndiff with -expected +actual):
> - (2.2847006554165614+0j)
> + (1.118033988749895+0j)
> **********************************************************************
> 2 items had failures:
> 1 of 13 in cypari2.gen.Gen.__complex__
> 1 of 13 in cypari2.gen.__test__.Gen.__complex__ (line 2006)
> ***Test Failed*** 2 failures.
> ================================================================================
> Testing cypari2.handle_error
> **********************************************************************
> File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cypari2/build/cypari2/handle_error.cpython-310-x86_64-linux-gnu.so", line ?, in cypari2.handle_error.__test__.PariError.__str__ (line 104)
> Failed example:
> pari('!@#$%^&*()')
> Differences (ndiff with -expected +actual):
> Traceback (most recent call last):
> - ...
> + File "/usr/lib/python3.10/doctest.py", line 1350, in __run
> + exec(compile(example.source, filename, "single",
> + File "<doctest cypari2.handle_error.__test__.PariError.__str__ (line 104)[3]>", line 1, in <module>
> + pari('!@#$%^&*()')
> + File "cypari2/pari_instance.pyx", line 832, in cypari2.pari_instance.Pari.__call__
> + cdef Gen g = objtogen(s)
> + File "cypari2/gen.pyx", line 4810, in cypari2.gen.objtogen
> + cdef GEN g = PyObject_AsGEN(s)
> + File "cypari2/convert.pyx", line 557, in cypari2.convert.PyObject_AsGEN
> + sig_on()
> + File "cypari2/handle_error.pyx", line 213, in cypari2.handle_error._pari_err_handle
> + raise PariError(errnum, pari_error_string, clone_gen_noclear(E))
> - PariError: syntax error, unexpected $undefined
> ? ------ ^
> + PariError: syntax error, unexpected invalid token
> ? +++++++++ ^
This is actually a change in bison (that replaced $undefined by invalid token in syntax error)
in bison 3.5.90
2020-04-12 Akim Demaille <akim.demaille at gmail.com>
skeletons: clarify the tag of special tokens
From
GRAM_EOF = 0, /* $end */
GRAM_ERRCODE = 1, /* error */
GRAM_UNDEF = 2, /* $undefined */
to
GRAM_EOF = 0, /* "end of file" */
GRAM_ERRCODE = 1, /* error */
GRAM_UNDEF = 2, /* "invalid token" */
> **********************************************************************
> 1 items had failures:
> 1 of 4 in cypari2.handle_error.__test__.PariError.__str__ (line 104)
> ***Test Failed*** 1 failures.
> ================================================================================
> Testing cypari2.pari_instance
> **********************************************************************
> File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cypari2/build/cypari2/pari_instance.cpython-310-x86_64-linux-gnu.so", line ?, in cypari2.pari_instance.Pari.genus2red
> Failed example:
> pari.genus2red([-5*x**5, x**3 - 2*x**2 - 2*x + 1])
> Differences (ndiff with -expected +actual):
> - [1416875, [2, -1; 5, 4; 2267, 1], x^6 - 240*x^4 - 2550*x^3 - 11400*x^2 - 24100*x - 19855, [[2, [2, [Mod(1, 2)]], []], [5, [1, []], ["[V] page 156", [3]]], [2267, [2, [Mod(432, 2267)]], ["[I{1-0-0}] page 170", []]]]]
> ? ^^ ------ ^^^ --- ^^^^^^ ^^^^^^ ^^^^^^^^^^^^
> + [1416875, [2, -1; 5, 4; 2267, 1], [-6*x^5 + 2*x^3 - x, x^3 + 1], [[2, [2, [Mod(1, 2)]], []], [5, [1, []], ["[V] page 156", [3]]], [2267, [2, [Mod(432, 2267)]], ["[I{1-0-0}] page 170", []]]]]
> ? ^^ ^^^ ^^^ ^^^^ ^
This error and below come from the new code for genus2red that return a minimal model as
a vector of two components instead as a single equation, which was not minimal for p=2.
Cheers,
--
Bill. <ballombe at debian.org>
Imagine a large red swirl here.
More information about the debian-science-maintainers
mailing list