MagicStack / MagicStack/asyncpg
Cursor cannot be used with externally-managed transaction
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 8.1k
- 派生
- 468
- PR 合并指标
- 30 天内没有已合并 PR
描述
Asyncpg 0.31.0, installed from pip and running against a local pg database. This is not a deployment issue, but rather an issue w/the check performed by Cursor._check_ready().
Working on implementing streaming results for Peewee and I'm running into an issue w/the Cursor _check_ready(). Currently it requires an asyncpg-managed transaction in order to proceed. Is there a reason it doesn't do a similar check to the one here, where it queries is_in_transaction()?
I'd like to be able to use server-side cursors with Peewee's library-managed transactions.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 asyncpg/cursor.py 中的 Cursor._check_ready() 开始,然后将其事务检查与 connection.py 中的 is_in_transaction() 进行比较。确定就绪状态是否能够识别外部管理的事务,同时不破坏 asyncpg 管理的游标;完成标准是服务器端游标能够与 Peewee 的库管理事务一起工作。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- postgresql, python
- 领域
- database
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100