cython: Fails with current Python 3.8 builds: error: too few arguments to function ‘PyCode_New’
I built CPython 3.8 from current git master for test purposes, and I’ve noticed that Cython does not work with it. Steps to reproduce:
- get a python 3.8 (the version I used was
3.8.0a3+ (heads/master:d537ab0ff9, Apr 30 2019, 16:44:28)), virtulalenv -p python3.8 /tmp/py38/tmp/py38/bin/pip install cython
This fails with
running build_ext
building 'Cython.Plex.Scanners' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/tmp
creating build/temp.linux-x86_64-3.8/tmp/pip-install-vy4o1bl9
creating build/temp.linux-x86_64-3.8/tmp/pip-install-vy4o1bl9/cython
creating build/temp.linux-x86_64-3.8/tmp/pip-install-vy4o1bl9/cython/Cython
creating build/temp.linux-x86_64-3.8/tmp/pip-install-vy4o1bl9/cython/Cython/Plex
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/mg/opt/python38/include/python3.8 -c /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c -o build/temp.linux-x86_64-3.8/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.o
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c: In function ‘__Pyx_InitCachedConstants’:
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:7233:89: warning: passing argument 6 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
__pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Cython_Plex_Scanners_py, __pyx_n_s_read, 113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 113, __pyx_L1_error)
^~~~~~~~~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:37: note: in definition of macro ‘__Pyx_PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:7233:252: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion]
__pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Cython_Plex_Scanners_py, __pyx_n_s_read, 113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 113, __pyx_L1_error)
^~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:72: note: in definition of macro ‘__Pyx_PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:7233:257: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
__pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Cython_Plex_Scanners_py, __pyx_n_s_read, 113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 113, __pyx_L1_error)
^~~~~~~~~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:79: note: in definition of macro ‘__Pyx_PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:11: error: too few arguments to function ‘PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:7233:33: note: in expansion of macro ‘__Pyx_PyCode_New’
__pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Cython_Plex_Scanners_py, __pyx_n_s_read, 113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 113, __pyx_L1_error)
^~~~~~~~~~~~~~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: declared here
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:7245:89: warning: passing argument 6 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
__pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Cython_Plex_Scanners_py, __pyx_n_s_position, 297, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 297, __pyx_L1_error)
^~~~~~~~~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:37: note: in definition of macro ‘__Pyx_PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:7245:256: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion]
__pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Cython_Plex_Scanners_py, __pyx_n_s_position, 297, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 297, __pyx_L1_error)
^~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:72: note: in definition of macro ‘__Pyx_PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:7245:261: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
__pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Cython_Plex_Scanners_py, __pyx_n_s_position, 297, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 297, __pyx_L1_error)
^~~~~~~~~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:79: note: in definition of macro ‘__Pyx_PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:11: error: too few arguments to function ‘PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:7245:33: note: in expansion of macro ‘__Pyx_PyCode_New’
__pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Cython_Plex_Scanners_py, __pyx_n_s_position, 297, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 297, __pyx_L1_error)
^~~~~~~~~~~~~~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: declared here
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:7257:90: warning: passing argument 6 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
__pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Cython_Plex_Scanners_py, __pyx_n_s_get_position, 308, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 308, __pyx_L1_error)
^~~~~~~~~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:37: note: in definition of macro ‘__Pyx_PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:7257:261: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion]
__pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Cython_Plex_Scanners_py, __pyx_n_s_get_position, 308, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 308, __pyx_L1_error)
^~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:72: note: in definition of macro ‘__Pyx_PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:7257:266: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
__pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Cython_Plex_Scanners_py, __pyx_n_s_get_position, 308, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 308, __pyx_L1_error)
^~~~~~~~~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:79: note: in definition of macro ‘__Pyx_PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:11: error: too few arguments to function ‘PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:7257:34: note: in expansion of macro ‘__Pyx_PyCode_New’
__pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Cython_Plex_Scanners_py, __pyx_n_s_get_position, 308, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 308, __pyx_L1_error)
^~~~~~~~~~~~~~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: declared here
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:7269:90: warning: passing argument 6 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
__pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Cython_Plex_Scanners_py, __pyx_n_s_eof, 334, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 334, __pyx_L1_error)
^~~~~~~~~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:37: note: in definition of macro ‘__Pyx_PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:7269:253: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion]
__pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Cython_Plex_Scanners_py, __pyx_n_s_eof, 334, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 334, __pyx_L1_error)
^~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:72: note: in definition of macro ‘__Pyx_PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:7269:258: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
__pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Cython_Plex_Scanners_py, __pyx_n_s_eof, 334, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 334, __pyx_L1_error)
^~~~~~~~~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:79: note: in definition of macro ‘__Pyx_PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:11: error: too few arguments to function ‘PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:7269:34: note: in expansion of macro ‘__Pyx_PyCode_New’
__pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Cython_Plex_Scanners_py, __pyx_n_s_eof, 334, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 334, __pyx_L1_error)
^~~~~~~~~~~~~~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: declared here
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c: In function ‘__Pyx_CreateCodeObjectForTraceback’:
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:10031:9: warning: passing argument 6 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
__pyx_empty_bytes, /*PyObject *code,*/
^~~~~~~~~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:37: note: in definition of macro ‘__Pyx_PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:10039:9: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion]
py_line,
^~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:72: note: in definition of macro ‘__Pyx_PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:10040:9: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
__pyx_empty_bytes /*PyObject *lnotab*/
^~~~~~~~~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:79: note: in definition of macro ‘__Pyx_PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:329:11: error: too few arguments to function ‘PyCode_New’
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
^~~~~~~~~~
/tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:10025:15: note: in expansion of macro ‘__Pyx_PyCode_New’
py_code = __Pyx_PyCode_New(
^~~~~~~~~~~~~~~~
In file included from /home/mg/opt/python38/include/python3.8/compile.h:5,
from /home/mg/opt/python38/include/python3.8/Python.h:137,
from /tmp/pip-install-vy4o1bl9/cython/Cython/Plex/Scanners.c:19:
/home/mg/opt/python38/include/python3.8/code.h:105:28: note: declared here
PyAPI_FUNC(PyCodeObject *) PyCode_New(
^~~~~~~~~~
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command "/tmp/py38/bin/python3.8 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-vy4o1bl9/cython/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-xiot_hb9/install-record.txt --single-version-externally-managed --compile --install-headers /tmp/py38/include/site/python3.8/cython" failed with error code 1 in /tmp/pip-install-vy4o1bl9/cython/
I’m on Ubuntu 19.04.
(FWIW /tmp/py38/bin/pip install lxml fails the build with a similar PyCode_New-related error, using, I assume, my system Cython package, which is 0.29.2-2build1. I had not noticed similar problems with 3.8.0a3 itself, but there’ve been almost 300 new commits since then.)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 7
- Comments: 20 (14 by maintainers)
I am currently working on the 0.29 backport.
I think it’s worth backporting the fix to 0.29.x (setting pos-only args to a constant
0), given that it otherwise can’t even compile in Py3.8.PR against
0.29.xwelcome.Hopefully this will do: https://github.com/cython/cython/pull/2971
Would it be possible to get a release? Right now, there is no Cython release supporting Python 3.8 which prevents to many popular applications. Random example: IPython cannot be installed on Python 3.8, because pyzmq uses Cython and the compilation of its Cython code fails on PyCode_New() call.
That will fix itself as soon as CPython 3.8 beta 1 is released.