Calibre test suite fails

  • Done
  • quality assurance status badge
Details
2 participants
  • Josh Holland
  • Marius Bakke
Owner
unassigned
Submitted by
Josh Holland
Severity
normal
J
J
Josh Holland wrote on 2 Apr 2020 14:09
(name . bug-guix\@gnu.org)(address . bug-guix@gnu.org)
87wo6yf5rl.fsf@inv.alid.pw
Hi,

Both on my local machine and on the CI[0], the Calibre test suite has
been failing with the following error:

======================================================================
ERROR: test_msgpack (calibre.test_build.BuildTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/guix-build-calibre-3.42.0.drv-0/calibre-3.42.0/src/calibre/test_build.py", line 124, in test_msgpack
self.assertEqual(obj, msgpack_loads(s))
File "/tmp/guix-build-calibre-3.42.0.drv-0/calibre-3.42.0/src/calibre/utils/serialize.py", line 113, in msgpack_loads
return msgpack.unpackb(dump, ext_hook=msgpack_decoder, raw=False, use_list=use_list)
File "/gnu/store/z7dz4iiaivmadhk0x50qs5zv3rwykrmd-python2-msgpack-1.0.0/lib/python2.7/site-packages/msgpack/fallback.py", line 129, in unpackb
ret = unpacker._unpack()
File "/gnu/store/z7dz4iiaivmadhk0x50qs5zv3rwykrmd-python2-msgpack-1.0.0/lib/python2.7/site-packages/msgpack/fallback.py", line 666, in _unpack
"%s is not allowed for map key" % str(type(key))
ValueError: <type 'int'> is not allowed for map key

----------------------------------------------------------------------

This is happening on both staging and master. There have been no
changes to the calibre package itself since January. I have run a git
bisect and the offending change appears to be in commit
66ab2f5e3a0df665f6e39203aedd2bf4812e6a71, when python-msgpack was
updated to version 1.0.0.


--
Josh Holland
J
J
Josh Holland wrote on 3 Apr 2020 15:05
Reported upstream to Calibre
(address . 40388@debbugs.gnu.org)
87a73sbtye.fsf@inv.alid.pw
I've reported this bug as
backwards-incompatible change in msgpack which is the culprit of this:

* Default value of strict_map_key is changed to True to avoid
hashdos. You need to pass strict_map_key=False if you have data which
contain map keys which type is not bytes or str.


I can prepare a patch (both within the Guix build system and to send
upstream) which fixes this, though I'm not sure what hashdos are or
whether they are actually important to avoid in this case.

--
Josh Holland
M
M
Marius Bakke wrote on 3 Apr 2020 15:31
87wo6wpuey.fsf@devup.no
Josh Holland <josh@inv.alid.pw> writes:

Toggle quote (10 lines)
> I've reported this bug as
> https://bugs.launchpad.net/calibre/+bug/1870541. I also found the
> backwards-incompatible change in msgpack which is the culprit of this:
>
> * Default value of strict_map_key is changed to True to avoid
> hashdos. You need to pass strict_map_key=False if you have data which
> contain map keys which type is not bytes or str.
>
> (from <https://pypi.org/project/msgpack/>)

Thanks for reporting it! I was just looking into the issue and found
that it was fixed upstream 3 days ago:


I adopted the patch to Guix in 3e4ce1cc3eb7b35405c4d2c4f837e53ec9952c99.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl6HOsUACgkQoqBt8qM6
VPpsbQf+PXW98e2Nv0aOby3q0i3FYfSifDn+jG9c3ilhn4SUjKOYGp7oWIHuzfbq
HfT7WkdXa7OD1kvUP8iLk3C2MiJv/jUTfkdZw0BbX/WkdAAebHN55xlo5sd57BCC
FTtzyRRV+h7gzs5oE7yFLgpkuxpYS5z8OqzbM0bL5ReCN9cw+hY0atxzjPJa53+a
dWEinsw+hHi3sB9xc1S7pNEJrmxEiHpqJ2gY8tTzkzgpL89CpzjTh7B7FBgKqyjM
YL68XjLofCPWrqdNLH9eNDb/IgTMZb1SEBOYO8+fsZJecJVgx0yFu6WP7+aTWXWD
aiL39twD1x2BalRh/Lk157TGoqRc6Q==
=Lg6z
-----END PGP SIGNATURE-----

Closed
?