MagicStack / MagicStack/asyncpg
asyncpg does not install with python 3.12-dev
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 8.1k
- 派生
- 468
- PR 合并指标
- 30 天内没有已合并 PR
描述
See [Github CI trace](https://github.com/nackjicholson/aiosql/actions/runs/4150335841/jobs/7279284210)
* **asyncpg version**: latest
* **PostgreSQL version**: latest
* **Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
the issue with a local PostgreSQL install?**: No / Does not apply
* **Python version**: 3.12-dev
* **Platform**: Github CI
* **Do you use pgbouncer?**: No
* **Did you install asyncpg with pip?**: Just trying, it fails.
* **If you built asyncpg locally, which version of Cython did you use?**: 312
* **Can the issue be reproduced under both asyncio and
[uvloop](https://github.com/magicstack/uvloop)?**: I do not know.
Python 3.12, under development, seems to have changed a structure:
```
asyncpg/pgproto/pgproto.c: In function ‘__Pyx_PyInt_As_int’:
asyncpg/pgproto/pgproto.c:40800:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
40800 | const digit* digits = ((PyLongObject*)x)->ob_digit;
| ^~
```
Also, there are two repeated warnings:
```
gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/opt/hostedtoolcache/Python/3.12.0-alpha.5/x64/include/python3.12 -c asyncpg/pgproto/pgproto.c -o build/temp.linux-x86_64-cpython-312/asyncpg/pgproto/pgproto.o -O2 -fsigned-char -Wall -Wsign-compare -Wconversion
asyncpg/pgproto/pgproto.c: In function ‘__pyx_pf_7asyncpg_7pgproto_7pgproto_11WriteBuffer_2__dealloc__’:
asyncpg/pgproto/pgproto.c:3127:5: warning: ‘ma_version_tag’ is deprecated [-Wdeprecated-declarations]
3127 | __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_BufferError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 34, __pyx_L1_error)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/hostedtoolcache/Python/3.12.0-alpha.5/x64/include/python3.12/dictobject.h:90,
from /opt/hostedtoolcache/Python/3.12.0-alpha.5/x64/include/python3.12/Python.h:61,
from asyncpg/pgproto/pgproto.c:31:
/opt/hostedtoolcache/Python/3.12.0-alpha.5/x64/include/python3.12/cpython/dictobject.h:22:34: note: declared here
22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag;
| ^~~~~~~~~~~~~~
/opt/hostedtoolcache/Python/3.12.0-alpha.5/x64/include/python3.12/internal/pycore_code.h:434:41: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
434 | return adaptive_counter_bits(value, backoff);
| ^~~~~~~
```
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从链接的 GitHub CI trace 和失败的生成文件 asyncpg/pgproto/pgproto.c 开始,使用 Python 3.12-dev 重现安装过程。调查报告的 PyLongObject ob_digit 编译错误,并验证 asyncpg 在该 Python 版本上能够成功安装,且不会出现报告中的 build failure。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- postgresql, python
- 领域
- databases
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100