ionelmc / python-hunter

Hunter is a flexible code tracing toolkit.
https://python-hunter.readthedocs.io/
BSD 2-Clause "Simplified" License
794 stars 46 forks source link

Python 3.9: "buildins.type size changed" warning #87

Closed The-Compiler closed 3 years ago

The-Compiler commented 3 years ago

When I try to import hunter with Python 3.9.0b5, I get a warning - stack with -Werror:

Python 3.9.0b5 (default, Aug 11 2020, 09:48:07) 
[GCC 10.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import hunter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".../lib/python3.9/site-packages/hunter/__init__.py", line 24, in <module>
    from ._event import Event
  File ".tox/cythonize/lib/python3.8/site-packages/Cython/Includes/cpython/type.pxd", line 9, in init hunter._event
RuntimeWarning: builtins.type size changed, may indicate binary incompatibility. Expected 872 from C header, got 880 from PyObject

Apparently this happens when extensions have been built against older beta versions or something? Here's what I could find about it (plus a couple of Tensorflow issues unrelated to Python 3.9):

Not sure if this is a Cython or a hunter issue, though?

ionelmc commented 3 years ago

Could it be possible that hunter was built with older 3.9? Eg: wheel caching.

Afaik it's expected that the ABI can change till the release candidate.

The-Compiler commented 3 years ago

Ah, indeed, pip install --no-cache hunter seems to have helped. Thanks and sorry for the noise!