Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aiohttp 3.9.3 fails to install on Python 3.13.0a4 #8194

Open
1 task done
whitequark opened this issue Feb 29, 2024 · 4 comments
Open
1 task done

aiohttp 3.9.3 fails to install on Python 3.13.0a4 #8194

whitequark opened this issue Feb 29, 2024 · 4 comments
Labels

Comments

@whitequark
Copy link

whitequark commented Feb 29, 2024

Describe the bug

Aiohttp fails to build on Python 3.13-dev.

To Reproduce

pip install aiohttp

Expected behavior

Aiohttp builds.

Logs/tracebacks

gcc -fno-strict-overflow -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-semantic-interposition -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-semantic-interposition -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-semantic-interposition -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -I/home/mwk/venv313/include -I/usr/include/python3.13 -c aiohttp/_websocket.c -o build/temp.linux-x86_64-cpython-313/aiohttp/_websocket.o
      aiohttp/_websocket.c:1295:1: warning: ‘Py_UNICODE’ is deprecated [-Wdeprecated-declarations]
       1295 | static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
            | ^~~~~~
      aiohttp/_websocket.c: In function ‘__Pyx_Py_UNICODE_strlen’:
      aiohttp/_websocket.c:1297:5: warning: ‘Py_UNICODE’ is deprecated [-Wdeprecated-declarations]
       1297 |     const Py_UNICODE *u_end = u;
            |     ^~~~~
      aiohttp/_websocket.c: At top level:
      aiohttp/_websocket.c:741:45: error: ‘_PyCFunctionFastWithKeywords’ undeclared here (not in a function); did you mean ‘PyCFunctionFastWithKeywords’?
        741 |   #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
            |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      aiohttp/_websocket.c:746:50: note: in expansion of macro ‘__Pyx_PyCFunctionFastWithKeywords’
        746 |   #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
            |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      aiohttp/_websocket.c:2930:127: note: in expansion of macro ‘__Pyx_PyCFunction_FastCallWithKeywords’
       2930 | static PyMethodDef __pyx_mdef_7aiohttp_10_websocket_1_websocket_mask_cython = {"_websocket_mask_cython", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7aiohttp_10_websocket_1_websocket_mask_cython, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7aiohttp_10_websocket__websocket_mask_cython};
            |                                                                                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      aiohttp/_websocket.c:2930:166: error: expected ‘}’ before ‘__pyx_pw_7aiohttp_10_websocket_1_websocket_mask_cython’
       2930 | static PyMethodDef __pyx_mdef_7aiohttp_10_websocket_1_websocket_mask_cython = {"_websocket_mask_cython", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7aiohttp_10_websocket_1_websocket_mask_cython, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7aiohttp_10_websocket__websocket_mask_cython};
            |                                                                               ~                                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      aiohttp/_websocket.c: In function ‘__Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS’:
      aiohttp/_websocket.c:6062:44: error: expected expression before ‘void’
       6062 |     return ((_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
            |                                            ^~~~
      aiohttp/_websocket.c:6062:58: error: expected ‘)’ before ‘def6062 |     return ((_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
            |            ~                                             ^~~
            |                                                          )
      aiohttp/_websocket.c:6043:18: warning: unused variable ‘def’ [-Wunused-variable]
       6043 |     PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
            |                  ^~~
      aiohttp/_websocket.c:6063:1: warning: control reaches end of non-void function [-Wreturn-type]
       6063 | }
            | ^
      aiohttp/_websocket.c: At top level:
      aiohttp/_websocket.c:2931:18: warning: ‘__pyx_pw_7aiohttp_10_websocket_1_websocket_mask_cython’ defined but not used [-Wunused-function]
       2931 | static PyObject *__pyx_pw_7aiohttp_10_websocket_1_websocket_mask_cython(PyObject *__pyx_self,
            |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from /usr/include/python3.13/Python.h:51,
                       from aiohttp/_websocket.c:16:
      aiohttp/_websocket.c:2929:14: warning: ‘__pyx_doc_7aiohttp_10_websocket__websocket_mask_cython’ defined but not used [-Wunused-const-variable=]
       2929 | PyDoc_STRVAR(__pyx_doc_7aiohttp_10_websocket__websocket_mask_cython, "Note, this function mutates its `data` argument\n    ");
            |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/include/python3.13/pymacro.h:92:43: note: in definition of macro ‘PyDoc_VAR’
         92 | #define PyDoc_VAR(name) static const char name[]
            |                                           ^~~~
      aiohttp/_websocket.c:2929:1: note: in expansion of macro ‘PyDoc_STRVAR’
       2929 | PyDoc_STRVAR(__pyx_doc_7aiohttp_10_websocket__websocket_mask_cython, "Note, this function mutates its `data` argument\n    ");
            | ^~~~~~~~~~~~
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for aiohttp
Failed to build aiohttp
ERROR: Could not build wheels for aiohttp, which is required to install pyproject.toml-based projects

Python Version

$ python --version
3.13.0a4

aiohttp Version

3.9.3

multidict Version

N/A

yarl Version

N/A

OS

Linux

Related component

Server, Client

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct
@whitequark whitequark added the bug label Feb 29, 2024
@webknjaz
Copy link
Member

sdists on PyPI currently contain C-files translated from PYX using a certain Cython version that was available at the time of publishing. That version likely didn't support Cython and there's no way around it, short of building from the Git repo which is a bit more involved.

Also, I don't know if Cython already supports Python 3.13 or we should wait until it does.

@whitequark
Copy link
Author

Thanks. I mainly wanted to make sure this problem is tracked, since I haven't found an existing issue.

@webknjaz
Copy link
Member

I see. Normally, we don't do anything about it too early because we always end up having to wait for Cython.
Additionally, there's still some flaky tests in the CI under 3.11/3.12 which is why we haven't even added those to Trove classifiers (despite people successfully using aiohttp under those runtimes).

@webknjaz
Copy link
Member

UPD: 3.11/3.12 have just been added to the trove classifiers in the metadata and can be considered fully supported now. There's also a CI job for 3.13 that's failing due to dependencies not being installable: https://github.com/aio-libs/aiohttp/actions/runs/8493964364/job/23268586328.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants