-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fails to build with Python 3.13 #1181
Comments
If it helps, we’re successfully building and testing
And, of course, we remove any pre-generated Cythonized C sources and re-generate them with a current Cython (3.0.11): # Remove pre-generated C sources from Cython to ensure they are re-generated
# and not used in the build. Note that recordobj.c is not a generated source,
# and must not be removed!
find asyncpg -type f -name '*.c' ! -name 'recordobj.c' -print -delete (We also export the environment variable |
same issue here |
same error but when i set the github repository, it works with python versions 3.9, 3.10, 3.11, 3.12 and 3.13:
When the next release is planned ? |
|
same issue on Mac
|
@musicinmybrain Existing any alternative for python-3.13.0 ? I am using docker image python-3.13.0-slim |
21.42 gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/usr/local/include/python3.13 -c asyncpg/pgproto/pgproto.c -o build/temp.linux-x86_64-cpython-313/asyncpg/pgproto/pgproto.o -O2 -fsigned-char -Wall -Wsign-compare -Wconversion
21.42 asyncpg/pgproto/pgproto.c:864:1: warning: ‘Py_UNICODE’ is deprecated [-Wdeprecated-declarations]
21.42 864 | static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
21.42 | ^~~~~~
21.42 asyncpg/pgproto/pgproto.c: In function ‘__Pyx_Py_UNICODE_strlen’:
21.42 asyncpg/pgproto/pgproto.c:865:5: warning: ‘Py_UNICODE’ is deprecated [-Wdeprecated-declarations]
21.42 865 | const Py_UNICODE *u_end = u;
21.42 | ^~~~~
21.42 asyncpg/pgproto/pgproto.c: In function ‘__Pyx_init_assertions_enabled’:
21.42 asyncpg/pgproto/pgproto.c:1667:39: warning: implicit declaration of function ‘_PyInterpreterState_GetConfig’; did you mean ‘PyInterpreterState_GetID’? [-Wimplicit-function-declaration]
21.42 1667 | __pyx_assertions_enabled_flag = ! _PyInterpreterState_GetConfig(__Pyx_PyThreadState_Current->interp)->optimization_level;
21.42 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21.42 | PyInterpreterState_GetID
21.42 asyncpg/pgproto/pgproto.c:1667:105: error: invalid type argument of ‘->’ (have ‘int’)
21.42 1667 | __pyx_assertions_enabled_flag = ! _PyInterpreterState_GetConfig(__Pyx_PyThreadState_Current->interp)->optimization_level;
21.42 | ^~
21.42 asyncpg/pgproto/pgproto.c: In function ‘__Pyx_PyUnicode_Join’:
21.42 asyncpg/pgproto/pgproto.c:38932:13: warning: implicit declaration of function ‘_PyUnicode_FastCopyCharacters’; did you mean ‘PyUnicode_CopyCharacters’? [-Wimplicit-function-declaration]
21.42 38932 | _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
21.42 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21.42 | PyUnicode_CopyCharacters
21.42 In file included from /usr/local/include/python3.13/internal/pycore_code.h:12,
21.42 from /usr/local/include/python3.13/internal/pycore_frame.h:13,
21.42 from asyncpg/pgproto/pgproto.c:41520:
21.42 /usr/local/include/python3.13/internal/pycore_backoff.h: In function ‘make_backoff_counter’:
21.42 /usr/local/include/python3.13/internal/pycore_backoff.h:60:20: warning: conversion from ‘uint16_t’ {aka ‘short unsigned int’} to ‘short unsigned int:12’ may change value [-Wconversion]
21.42 60 | result.value = value;
21.42 | ^~~~~
21.42 /usr/local/include/python3.13/internal/pycore_backoff.h:61:22: warning: conversion from ‘uint16_t’ {aka ‘short unsigned int’} to ‘unsigned char:4’ may change value [-Wconversion]
21.42 61 | result.backoff = backoff;
21.42 | ^~~~~~~
21.42 /usr/local/include/python3.13/internal/pycore_backoff.h: In function ‘restart_backoff_counter’:
21.42 /usr/local/include/python3.13/internal/pycore_backoff.h:78:66: warning: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [-Wconversion]
21.42 78 | return make_backoff_counter((1 << (counter.backoff + 1)) - 1, counter.backoff + 1);
21.42 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
21.42 asyncpg/pgproto/pgproto.c: In function ‘__Pyx_PyInt_As_int’:
21.42 asyncpg/pgproto/pgproto.c:41809:27: error: too few arguments to function ‘_PyLong_AsByteArray’
21.42 41809 | int ret = _PyLong_AsByteArray((PyLongObject *)v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 In file included from /usr/local/include/python3.13/longobject.h:107,
21.42 from /usr/local/include/python3.13/Python.h:81,
21.42 from asyncpg/pgproto/pgproto.c:33:
21.42 /usr/local/include/python3.13/cpython/longobject.h:111:17: note: declared here
21.42 111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 asyncpg/pgproto/pgproto.c: In function ‘__Pyx_PyInt_As_int64_t’:
21.42 asyncpg/pgproto/pgproto.c:42043:27: error: too few arguments to function ‘_PyLong_AsByteArray’
21.42 42043 | int ret = _PyLong_AsByteArray((PyLongObject *)v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 /usr/local/include/python3.13/cpython/longobject.h:111:17: note: declared here
21.42 111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 asyncpg/pgproto/pgproto.c: In function ‘__Pyx_PyInt_As_int32_t’:
21.42 asyncpg/pgproto/pgproto.c:42239:27: error: too few arguments to function ‘_PyLong_AsByteArray’
21.42 42239 | int ret = _PyLong_AsByteArray((PyLongObject *)v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 /usr/local/include/python3.13/cpython/longobject.h:111:17: note: declared here
21.42 111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 asyncpg/pgproto/pgproto.c: In function ‘__Pyx_PyInt_As_long’:
21.42 asyncpg/pgproto/pgproto.c:42435:27: error: too few arguments to function ‘_PyLong_AsByteArray’
21.42 42435 | int ret = _PyLong_AsByteArray((PyLongObject *)v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 /usr/local/include/python3.13/cpython/longobject.h:111:17: note: declared here
21.42 111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 asyncpg/pgproto/pgproto.c: In function ‘__Pyx_PyInt_As_unsigned_char’:
21.42 asyncpg/pgproto/pgproto.c:42745:27: error: too few arguments to function ‘_PyLong_AsByteArray’
21.42 42745 | int ret = _PyLong_AsByteArray((PyLongObject *)v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 /usr/local/include/python3.13/cpython/longobject.h:111:17: note: declared here
21.42 111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 asyncpg/pgproto/pgproto.c: In function ‘__Pyx_PyInt_As_int16_t’:
21.42 asyncpg/pgproto/pgproto.c:43055:27: error: too few arguments to function ‘_PyLong_AsByteArray’
21.42 43055 | int ret = _PyLong_AsByteArray((PyLongObject *)v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 /usr/local/include/python3.13/cpython/longobject.h:111:17: note: declared here
21.42 111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 asyncpg/pgproto/pgproto.c: In function ‘__Pyx_PyInt_As_char’:
21.42 asyncpg/pgproto/pgproto.c:43289:27: error: too few arguments to function ‘_PyLong_AsByteArray’
21.42 43289 | int ret = _PyLong_AsByteArray((PyLongObject *)v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 /usr/local/include/python3.13/cpython/longobject.h:111:17: note: declared here
21.42 111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 asyncpg/pgproto/pgproto.c: In function ‘__Pyx_PyInt_As_int8_t’:
21.42 asyncpg/pgproto/pgproto.c:43485:27: error: too few arguments to function ‘_PyLong_AsByteArray’
21.42 43485 | int ret = _PyLong_AsByteArray((PyLongObject *)v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 /usr/local/include/python3.13/cpython/longobject.h:111:17: note: declared here
21.42 111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 asyncpg/pgproto/pgproto.c: In function ‘__Pyx_PyInt_As_uint32_t’:
21.42 asyncpg/pgproto/pgproto.c:43719:27: error: too few arguments to function ‘_PyLong_AsByteArray’
21.42 43719 | int ret = _PyLong_AsByteArray((PyLongObject *)v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 /usr/local/include/python3.13/cpython/longobject.h:111:17: note: declared here
21.42 111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 asyncpg/pgproto/pgproto.c: In function ‘__Pyx_PyInt_As_uint64_t’:
21.42 asyncpg/pgproto/pgproto.c:43915:27: error: too few arguments to function ‘_PyLong_AsByteArray’
21.42 43915 | int ret = _PyLong_AsByteArray((PyLongObject *)v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 /usr/local/include/python3.13/cpython/longobject.h:111:17: note: declared here
21.42 111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
21.42 | ^~~~~~~~~~~~~~~~~~~
21.42 asyncpg/pgproto/pgproto.c: At top level:
21.42 asyncpg/pgproto/pgproto.c:23994:18: warning: ‘__pyx_f_7asyncpg_7pgproto_7pgproto_json_decode’ defined but not used [-Wunused-function]
21.42 23994 | static PyObject *__pyx_f_7asyncpg_7pgproto_7pgproto_json_decode(struct __pyx_obj_7asyncpg_7pgproto_7pgproto_CodecContext *__pyx_v_settings, struct __pyx_t_7asyncpg_7pgproto_7pgproto_FRBuffer *__pyx_v_buf) {
21.42 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21.42 asyncpg/pgproto/pgproto.c:23886:18: warning: ‘__pyx_f_7asyncpg_7pgproto_7pgproto_json_encode’ defined but not used [-Wunused-function]
21.42 23886 | static PyObject *__pyx_f_7asyncpg_7pgproto_7pgproto_json_encode(struct __pyx_obj_7asyncpg_7pgproto_7pgproto_CodecContext *__pyx_v_settings, struct __pyx_obj_7asyncpg_7pgproto_7pgproto_WriteBuffer *__pyx_v_buf, PyObject *__pyx_v_obj) {
21.42 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21.42 error: command '/usr/bin/gcc' failed with exit code 1
21.42 [end of output]
|
There's many functions in cPython become suddenly internal therefore breaking to much binary packages. Probably there's an alternative for long to bytes function we can use. |
I do not maintain I maintain the |
I'll look into releasing 3.13 wheels soon. |
The logs in #1181 (comment) just indicate that the Cythonized C sources were generated by a too-old version of Cython. Try |
0.30.0 with support for Python 3.13 has been released. |
He was ! But it is likely that you will need to install greenlet. I believe that to solve the problems mentioned by @musicinmybrain...
After install Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/coverage/collector.py", line 145, in __init__
import greenlet
ModuleNotFoundError: No module named 'greenlet'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/pytest", line 8, in <module>
sys.exit(console_main())
~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/_pytest/config/__init__.py", line 201, in console_main
code = main()
File "/usr/local/lib/python3.13/site-packages/_pytest/config/__init__.py", line 156, in main
config = _prepareconfig(args, plugins)
File "/usr/local/lib/python3.13/site-packages/_pytest/config/__init__.py", line 341, in _prepareconfig
config = pluginmanager.hook.pytest_cmdline_parse(
pluginmanager=pluginmanager, args=args
)
File "/usr/local/lib/python3.13/site-packages/pluggy/_hooks.py", line 513, in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pluggy/_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pluggy/_callers.py", line 139, in _multicall
raise exception.with_traceback(exception.__traceback__)
File "/usr/local/lib/python3.13/site-packages/pluggy/_callers.py", line 122, in _multicall
teardown.throw(exception) # type: ignore[union-attr]
~~~~~~~~~~~~~~^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/_pytest/helpconfig.py", line 105, in pytest_cmdline_parse
config = yield
^^^^^
File "/usr/local/lib/python3.13/site-packages/pluggy/_callers.py", line 103, in _multicall
res = hook_impl.function(*args)
File "/usr/local/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1140, in pytest_cmdline_parse
self.parse(args)
~~~~~~~~~~^^^^^^
File "/usr/local/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1494, in parse
self._preparse(args, addopts=addopts)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1398, in _preparse
self.hook.pytest_load_initial_conftests(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
early_config=self, args=args, parser=self._parser
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
uvloop?: yes
Fails to build on Python 3.13. There's been various API changes.
Read more: MagicStack/uvloop#603
The text was updated successfully, but these errors were encountered: