I'm on Python 3.10, gcc 13.2.1 and Linux of course. Cython 0.29 works, more modern version fail:
[1/1] Cythonizing src/pygrib/_pygrib.pyx
/usr/lib/python3.10/site-packages/Cython/Compiler/Main.py:373: FutureWarning: Cython directive 'language_level' not set, using '3' (Py3). File: ./pygrib/src/pygrib/_pygrib.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
warning: src/pygrib/_pygrib.pyx:353:12: Unreachable code
Error compiling Cython file:
------------------------------------------------------------
...
beg, end, inc = key.indices(self.messages)
msg = self.tell()
grbs = [self.message(n) for n in xrange(beg,end,inc)]
self.seek(msg) # put iterator back in original position
return grbs
elif type(key) == int or type(key) == long:
^
------------------------------------------------------------
src/pygrib/_pygrib.pyx:413:46: undeclared name not builtin: long
[..]
I'm on Python 3.10, gcc 13.2.1 and Linux of course. Cython 0.29 works, more modern version fail: