Fails with current Python 3.8 builds: error: too few arguments to function ‘PyCode_New’
See original GitHub issueI 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.)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:20 (9 by maintainers)
Top Results From Across the Web
PyCode_New API change breaks backwards compatibility policy
msg345153 ‑ (view) Author: Nick Coghlan (ncoghlan) * Date: 2019‑06‑10 23:24
msg345154 ‑ (view) Author: STINNER Victor (vstinner) * Date: 2019‑06‑10 23:28
msg345168 ‑ (view)...
Read more >Error installing gevent in Docker Alpine Python - Stack Overflow
When building the docker, I always get an error "gcc failed with exit status 1". I've tried installing several packages but none have...
Read more >pip install lxml fails on Python 3.8 b2 - Launchpad Bugs
Python 3.8 b2 is out now, and `pip install lxml` started failing again: mg@blynas: ... error: too many arguments to function 'PyCode_New'
Read more >Changelog - ActivePython 3.8.2 Documentation
For compatibility across Python 3.8 and later versions, consider using zipp. ... list appearing too high or low when shown above the current...
Read more >Working with the AWS CDK in Python
This is the AWS CDK v2 Developer Guide. The older CDK v1 entered maintenance on June 1, 2022 and will now receive only...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.x
welcome.