MagicStack / MagicStack/asyncpg
Compatibility Issue with asyncpg 0.30.0 in Gino 1.0.1
未关闭
@fantix 已经在做这个了。
开始于 2025年11月24日。
- 主要语言
- Python
- 星标
- 8.1k
- 派生
- 468
- PR 合并指标
- 30 天内没有已合并 PR
描述
- asyncpg version: 0.30.0
- PostgreSQL version: 16.1
- Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
the issue with a local PostgreSQL install?: No - Python version: 3.13
- Platform: MacOS
- Do you use pgbouncer?: No
- Did you install asyncpg with pip?: Yes
- If you built asyncpg locally, which version of Cython did you use?:
- Can the issue be reproduced under both asyncio and
uvloop?: Yes
Hi there! I am using gino 1.0.1 and unfortunately, this project is no longer being updated. For migrating to Python 3.13 I install asyncpg 0.30.0 and found, that gino (await Model.insert().gino.all([{...}, {...}])] can't work with current version. Issue occurs when calling bind_execute_many Gino expects 4 arguments, but in version 0.30.0, a new argument return_rows was added.
How to gino using asyncpg:
def executor(state, timeout_):
if many:
return _protocol.bind_execute_many(state, args, "", timeout_)
else:
return _protocol.bind_execute(state, args, "", limit, True, timeout_)
My suggestion: add True as the default value for the return_rows argument:
async def bind_execute_many(
self,
state: PreparedStatementState,
args,
portal_name: str,
timeout,
return_rows: bool = True,
)
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。