Skip to content

Cython 3.0.x required to build on Python 3.12 #1090

New issue

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

By clicking “No 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? No Sign in to your account

Closed
robd003 opened this issue Oct 14, 2023 · 2 comments
Closed

Cython 3.0.x required to build on Python 3.12 #1090

robd003 opened this issue Oct 14, 2023 · 2 comments

Comments

@robd003
Copy link

robd003 commented Oct 14, 2023

  • asyncpg version: 0.29.0b0
  • PostgreSQL version: Postgres 15 / CrateDB 5.4.3
  • Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
    the issue with a local PostgreSQL install?
    : Tested against AWS RDS & local deployments
  • Python version: 3.12
  • Platform: Linux aarch64
  • Do you use pgbouncer?: No
  • Did you install asyncpg with pip?: No
  • If you built asyncpg locally, which version of Cython did you use?: 3.0.3
  • Can the issue be reproduced under both asyncio and
    uvloop?
    : uvloop works just fine

asyncpg will not compile for Python 3.12 without updating the cython dependency. I merely did a version bump to cython >= 3.0.0 and it compiled just fine.

@elprans
Copy link
Member

elprans commented Oct 16, 2023

I don't think it's true. The master branch is building and running against 3.12 just fine.

@elprans elprans closed this as completed Oct 16, 2023
@robd003
Copy link
Author

robd003 commented Oct 16, 2023

Weird... I'm seeing the following when trying to compile from master on macOS:

  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;
                                    ~~~~~~~~~~~~~~~~~~  ^
  asyncpg/pgproto/pgproto.c:41089:55: error: no member named 'ob_digit' in 'struct _longobject'
              const digit* digits = ((PyLongObject*)x)->ob_digit;
                                    ~~~~~~~~~~~~~~~~~~  ^
  asyncpg/pgproto/pgproto.c:41230:55: error: no member named 'ob_digit' in 'struct _longobject'
              const digit* digits = ((PyLongObject*)x)->ob_digit;
                                    ~~~~~~~~~~~~~~~~~~  ^
  asyncpg/pgproto/pgproto.c:41285:55: error: no member named 'ob_digit' in 'struct _longobject'
              const digit* digits = ((PyLongObject*)x)->ob_digit;
                                    ~~~~~~~~~~~~~~~~~~  ^
  asyncpg/pgproto/pgproto.c:41426:55: error: no member named 'ob_digit' in 'struct _longobject'
              const digit* digits = ((PyLongObject*)x)->ob_digit;
                                    ~~~~~~~~~~~~~~~~~~  ^
  asyncpg/pgproto/pgproto.c:41481:55: error: no member named 'ob_digit' in 'struct _longobject'
              const digit* digits = ((PyLongObject*)x)->ob_digit;
                                    ~~~~~~~~~~~~~~~~~~  ^
  asyncpg/pgproto/pgproto.c:41736:55: error: no member named 'ob_digit' in 'struct _longobject'
              const digit* digits = ((PyLongObject*)x)->ob_digit;
                                    ~~~~~~~~~~~~~~~~~~  ^
  asyncpg/pgproto/pgproto.c:41791:55: error: no member named 'ob_digit' in 'struct _longobject'
              const digit* digits = ((PyLongObject*)x)->ob_digit;

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

No branches or pull requests

2 participants