MagicStack / MagicStack/py-pgproto
Unable to build on Python 3.12
- Dominant language
- Cython
- Stars
- 38
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
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`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Python 3.12 build errors in asyncpg/pgproto/pgproto.c, especially the lines accessing PyLongObject.ob_digit. Compare the reported access with the proposed long_value->ob_digit change, then rebuild py-pgproto on Python 3.12 and confirm those errors are resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100