Skip to content

[Build issue] Wheel fails to build on Python 3.13 #680

@VaZark

Description

@VaZark

When using pip wheel --no-cache-dir "uvloop (==0.19.0)"

For context, I was installing uvloop as a dependency for a Robyn-based project using poetry. When it failed, I tried using a wheel directly with pip

The pyproject.toml

name = "robyn-router"
version = "0.1.0"
description = ""
authors = [
    {name = "vaz",email = "vasanth93067@gmail.com"}
]
readme = "README.md"
requires-python = ">=3.13, < 4.0.0"
dependencies = [
    "robyn (>=0.66.2,<0.67.0)"
]


[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"

Error message from shell

building 'uvloop.loop' extension
      creating build/temp.linux-x86_64-cpython-313/uvloop
      gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -I/usr/include/python3.13 -I/tmp/pip-wheel-z_n6fbm9/uvloop_5c6a01c65cc5422a9826f7fce5193fe9/vendor/libuv/include -c uvloop/loop.c -o build/temp.linux-x86_64-cpython-313/uvloop/loop.o -O2
      uvloop/loop.c:860:1: warning: ‘Py_UNICODE’ is deprecated [-Wdeprecated-declarations]
        860 | static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
            | ^~~~~~
      uvloop/loop.c: In function ‘__Pyx_Py_UNICODE_strlen’:
      uvloop/loop.c:861:5: warning: ‘Py_UNICODE’ is deprecated [-Wdeprecated-declarations]
        861 |     const Py_UNICODE *u_end = u;
            |     ^~~~~
      uvloop/loop.c: In function ‘__Pyx_init_assertions_enabled’:
      uvloop/loop.c:4446:39: error: implicit declaration of function ‘_PyInterpreterState_GetConfig’; did you mean ‘PyInterpreterState_GetID’? [-Wimplicit-function-declaration]
       4446 |     __pyx_assertions_enabled_flag = ! _PyInterpreterState_GetConfig(__Pyx_PyThreadState_Current->interp)->optimization_level;
            |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            |                                       PyInterpreterState_GetID
      uvloop/loop.c:4446:105: error: invalid type argument of ‘->’ (have ‘int’)
       4446 |     __pyx_assertions_enabled_flag = ! _PyInterpreterState_GetConfig(__Pyx_PyThreadState_Current->interp)->optimization_level;
            |                                                                                                         ^~
      uvloop/loop.c: In function ‘__pyx_f_6uvloop_4loop_9UVProcess__after_fork’:
      uvloop/loop.c:110087:5: error: implicit declaration of function ‘_Py_RestoreSignals’ [-Wimplicit-function-declaration]
      110087 |     _Py_RestoreSignals();
             |     ^~~~~~~~~~~~~~~~~~
      uvloop/loop.c: In function ‘__pyx_pymod_exec_loop’:
      uvloop/loop.c:4637:38: error: implicit declaration of function ‘_PyDict_SetItem_KnownHash’; did you mean ‘_PyDict_GetItem_KnownHash’? [-Wimplicit-function-declaration]
       4637 |     (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
            |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~
      uvloop/loop.c:170547:7: note: in expansion of macro ‘__Pyx_SetNameInClass’
      170547 |   if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 3276, __pyx_L1_error)
             |       ^~~~~~~~~~~~~~~~~~~~
      uvloop/loop.c: In function ‘__Pyx_set_iter_next’:
      uvloop/loop.c:172680:19: error: implicit declaration of function ‘_PySet_NextEntry’ [-Wimplicit-function-declaration]
      172680 |         int ret = _PySet_NextEntry(iter_obj, ppos, value, &hash);
             |                   ^~~~~~~~~~~~~~~~
      uvloop/loop.c: In function ‘__Pyx_PyUnicode_Join’:
      uvloop/loop.c:174030:13: error: implicit declaration of function ‘_PyUnicode_FastCopyCharacters’; did you mean ‘PyUnicode_CopyCharacters’? [-Wimplicit-function-declaration]
      174030 |             _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
             |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             |             PyUnicode_CopyCharacters
      uvloop/loop.c: In function ‘__Pyx_PyGen_Send’:
      uvloop/loop.c:174515:13: error: implicit declaration of function ‘_PyGen_SetStopIterationValue’; did you mean ‘__Pyx_PyGen__FetchStopIterationValue’? [-Wimplicit-function-declaration]
      174515 |             _PyGen_SetStopIterationValue(result);
             |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
             |             __Pyx_PyGen__FetchStopIterationValue
      uvloop/loop.c: In function ‘__Pyx_Coroutine_AwaitableIterError’:
      uvloop/loop.c:175485:5: error: implicit declaration of function ‘_PyErr_FormatFromCause’ [-Wimplicit-function-declaration]
      175485 |     _PyErr_FormatFromCause(
             |     ^~~~~~~~~~~~~~~~~~~~~~
      uvloop/loop.c: In function ‘__Pyx_PyInt_As_int’:
      uvloop/loop.c:177390:27: error: too few arguments to function ‘_PyLong_AsByteArray’
      177390 |                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
             |                           ^~~~~~~~~~~~~~~~~~~
      In file included from /usr/include/python3.13/longobject.h:107,
                       from /usr/include/python3.13/Python.h:81,
                       from uvloop/loop.c:22:
      /usr/include/python3.13/cpython/longobject.h:111:17: note: declared here
        111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
            |                 ^~~~~~~~~~~~~~~~~~~
      uvloop/loop.c: In function ‘__Pyx_PyInt_As_uint64_t’:
      uvloop/loop.c:177586:27: error: too few arguments to function ‘_PyLong_AsByteArray’
      177586 |                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
             |                           ^~~~~~~~~~~~~~~~~~~
      /usr/include/python3.13/cpython/longobject.h:111:17: note: declared here
        111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
            |                 ^~~~~~~~~~~~~~~~~~~
      uvloop/loop.c: In function ‘__Pyx_PyInt_As_long’:
      uvloop/loop.c:177820:27: error: too few arguments to function ‘_PyLong_AsByteArray’
      177820 |                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
             |                           ^~~~~~~~~~~~~~~~~~~
      /usr/include/python3.13/cpython/longobject.h:111:17: note: declared here
        111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
            |                 ^~~~~~~~~~~~~~~~~~~
      uvloop/loop.c: In function ‘__Pyx_PyInt_As_unsigned_long’:
      uvloop/loop.c:178092:27: error: too few arguments to function ‘_PyLong_AsByteArray’
      178092 |                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
             |                           ^~~~~~~~~~~~~~~~~~~
      /usr/include/python3.13/cpython/longobject.h:111:17: note: declared here
        111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
            |                 ^~~~~~~~~~~~~~~~~~~
      uvloop/loop.c: In function ‘__Pyx_PyInt_As_unsigned_int’:
      uvloop/loop.c:178288:27: error: too few arguments to function ‘_PyLong_AsByteArray’
      178288 |                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
             |                           ^~~~~~~~~~~~~~~~~~~
      /usr/include/python3.13/cpython/longobject.h:111:17: note: declared here
        111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
            |                 ^~~~~~~~~~~~~~~~~~~
      uvloop/loop.c: In function ‘__Pyx_PyInt_As_size_t’:
      uvloop/loop.c:178560:27: error: too few arguments to function ‘_PyLong_AsByteArray’
      178560 |                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
             |                           ^~~~~~~~~~~~~~~~~~~
      /usr/include/python3.13/cpython/longobject.h:111:17: note: declared here
        111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
            |                 ^~~~~~~~~~~~~~~~~~~
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions