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

Build failing with Python 3.13 #20

Closed
kmaehashi opened this issue Dec 9, 2024 · 3 comments
Closed

Build failing with Python 3.13 #20

kmaehashi opened this issue Dec 9, 2024 · 3 comments

Comments

@kmaehashi
Copy link

kmaehashi commented Dec 9, 2024

One of the CuPy user reported that there is an error building fastrlock on Python 3.13. After the quick investigation, this looks happening because rlock.c bundled with the sdist is generated using older Cython which does not support Python 3.13.

% pip install -v fastrlock

... snip ...

  fastrlock/rlock.c: In function ‘__Pyx_PyInt_As_long’:
  fastrlock/rlock.c:9635:23: error: too few arguments to function ‘_PyLong_AsByteArray’
   9635 |                 ret = _PyLong_AsByteArray((PyLongObject *)v,
        |                       ^~~~~~~~~~~~~~~~~~~
  In file included from /home/maehashi/.pyenv/versions/3.13.1/include/python3.13/longobject.h:107,
                   from /home/maehashi/.pyenv/versions/3.13.1/include/python3.13/Python.h:81,
                   from fastrlock/rlock.c:35:
  /home/maehashi/.pyenv/versions/3.13.1/include/python3.13/cpython/longobject.h:111:17: note: declared here
    111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
        |                 ^~~~~~~~~~~~~~~~~~~
  fastrlock/rlock.c: In function ‘__Pyx_PyInt_As_int’:
  fastrlock/rlock.c:9908:23: error: too few arguments to function ‘_PyLong_AsByteArray’
   9908 |                 ret = _PyLong_AsByteArray((PyLongObject *)v,
        |                       ^~~~~~~~~~~~~~~~~~~
  In file included from /home/maehashi/.pyenv/versions/3.13.1/include/python3.13/longobject.h:107,
                   from /home/maehashi/.pyenv/versions/3.13.1/include/python3.13/Python.h:81,
                   from fastrlock/rlock.c:35:
  /home/maehashi/.pyenv/versions/3.13.1/include/python3.13/cpython/longobject.h:111:17: note: declared here
    111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
        |                 ^~~~~~~~~~~~~~~~~~~
  error: command '/home/maehashi/local/bin/ccache-gcc' failed with exit code 1

... snip ...

It would be great if we can see a new release including the source generated with the latest Cython (or binary packages for Python 3.13).

@leofang
Copy link

leofang commented Dec 17, 2024

+1 it's be nice to help unblock CuPy (which in turn would unblock us 😄)

cc @szalpal @aterrel for vis

@scoder
Copy link
Owner

scoder commented Dec 17, 2024

I released fastrlock 0.8.3 with wheels up to Py3.13.

@scoder scoder closed this as completed Dec 17, 2024
@kmaehashi
Copy link
Author

Thank you!

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

No branches or pull requests

3 participants