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

uvloop fails to build with Python 3.13.0a5: error: implicit declaration of function ‘_Py_RestoreSignals’ #603

Closed
befeleme opened this issue Mar 27, 2024 · 4 comments · Fixed by #604

Comments

@befeleme
Copy link
Contributor

  • uvloop version: 0.19.0
  • Python version: 3.13.0a5
  • Platform: Fedora Linux 41
  • Can you reproduce the bug with PYTHONASYNCIODEBUG in env?: n/a
  • Does uvloop behave differently from vanilla asyncio? How?: n/a

I try to build uvloop for Fedora Linux 41 with Python 3.13.0a5.
The build fails with the information below.

  uvloop/loop.c: In function ‘__pyx_f_6uvloop_4loop_9UVProcess__after_fork’:
  uvloop/loop.c:129617:5: error: implicit declaration of function ‘_Py_RestoreSignals’ [-Werror=implicit-function-declaration]
  129617 |     _Py_RestoreSignals();
         |     ^~~~~~~~~~~~~~~~~~
@befeleme
Copy link
Contributor Author

_Py_RestoreSignals() has apparently been moved to internal CPython: python/cpython@c9ce983

@hroncok
Copy link
Contributor

hroncok commented Apr 30, 2024

@wRAR
Copy link

wRAR commented May 28, 2024

This one is a warning here on a pyenv-installed 3.13.0b1 (not sure if -Werror=implicit-function-declaration in the original report comes from Fedora defaults or what), but there are multiple actual errors:

      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_PyInt_As_int’:
      uvloop/loop.c:177390:27: error: too few arguments to function ‘_PyLong_AsByteArray’
      177390 |                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
             |                           ^~~~~~~~~~~~~~~~~~~
[...]

@root-kidik
Copy link

+1

fantix added a commit that referenced this issue Aug 15, 2024
Changes
=======

* Upgrade libuv to v1.48.0 (#600)
  (by @niklasr22 @fantix in 7777852 for #596 #615)

Fixes
=====

* Fix test_create_server_4 with Python 3.12.5 (#614)
  (by @shadchin in 62f9239)

* Use len(os.sched_getaffinity(0)) instead of os.cpu_count() (#591)
  (by @avkarenow in c8531c2 for #591)

* Inline _Py_RestoreSignals() from CPython (#604)
  (by @befeleme in 8511ba1 for #603)
@fantix fantix mentioned this issue Aug 15, 2024
edgarrmondragon pushed a commit to edgarrmondragon/uvloop that referenced this issue Aug 19, 2024
Changes
=======

* Upgrade libuv to v1.48.0 (MagicStack#600)
  (by @niklasr22 @fantix in 7777852 for MagicStack#596 MagicStack#615)

Fixes
=====

* Fix test_create_server_4 with Python 3.12.5 (MagicStack#614)
  (by @shadchin in 62f9239)

* Use len(os.sched_getaffinity(0)) instead of os.cpu_count() (MagicStack#591)
  (by @avkarenow in c8531c2 for MagicStack#591)

* Inline _Py_RestoreSignals() from CPython (MagicStack#604)
  (by @befeleme in 8511ba1 for MagicStack#603)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants