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

Unable to build on Python 3.12 #24

Open
robd003 opened this issue Oct 14, 2023 · 1 comment
Open

Unable to build on Python 3.12 #24

robd003 opened this issue Oct 14, 2023 · 1 comment

Comments

@robd003
Copy link

robd003 commented Oct 14, 2023

Getting a lot of these errors when trying to build https://github.com/MagicStack/asyncpg on Python 3.12:

  asyncpg/pgproto/pgproto.c:40800:55: error: no member named 'ob_digit' in 'struct _longobject'
              const digit* digits = ((PyLongObject*)x)->ob_digit;
                                    ~~~~~~~~~~~~~~~~~~  ^
  asyncpg/pgproto/pgproto.c:40855:55: error: no member named 'ob_digit' in 'struct _longobject'
              const digit* digits = ((PyLongObject*)x)->ob_digit;
                                    ~~~~~~~~~~~~~~~~~~  ^
  asyncpg/pgproto/pgproto.c:41034:55: error: no member named 'ob_digit' in 'struct _longobject'
              const digit* digits = ((PyLongObject*)x)->ob_digit;
                                    ~~~~~~~~~~~~~~~~~~  ^

I believe this can be solved by converting ((PyLongObject*)x)->ob_digit to ((PyLongObject*)x)->long_value->ob_digit

@robd003
Copy link
Author

robd003 commented Oct 14, 2023

Checking to see if cython 3.0.4 fixes this...

Upgrading cython to >=3.0.0 fixes this and no more compilation errors.

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

1 participant