Gentoo Archives: gentoo-python

From: "Michał Górny" <mgorny@g.o>
To: gentoo-python <gentoo-python@l.g.o>
Cc: python <python@g.o>
Subject: [gentoo-python] Cython warnings with PyPy 6.0.0
Date: Sat, 28 Apr 2018 07:22:00
Message-Id: 1524900113.1013.11.camel@gentoo.org
1 Hi,
2
3 Apparently PyPy 6.0.0 fixed a bug in type sizes which Cython up
4 to 0.28.2 worked around. As a result, .pyx files generated with older
5 versions of Cython will spew (harmless) warnings:
6
7 >>>> import numpy
8 /data/extra/pypy/6.0.0/site-packages/numpy/random/__init__.py:99: UserWarning: __builtin__.type size changed, may indicate binary incompatibility. Expected 888, got 408
9 from .mtrand import *
10
11 Apparently upgrading Cython locally is not enough to fix it, since
12 packages frequently include pregenerated files and we usually don't
13 regenerate them.
14
15 To be honest, I don't think this is something we need to solve. We can
16 just wait for upstreams to upgrade Cython and generate new packages.
17
18 Alternatively, we can remove the generated files from unpacked sources
19 to force setup.py to regenerate them. I've seen some packages doing
20 that. It may be in the 'Gentoo spirit' but I don't have a strong
21 opinion with that kind of files.
22
23 Finally, upstream provides a .pth hack that silences the warning.
24 However, I'd rather not do add more hacks to the stack.
25
26 Source: https://morepypy.blogspot.com/2018/04/how-to-ignore-annoying-cython-warnings.html
27
28 --
29 Best regards,
30 Michał Górny