Multitoken substitution
还没有人认领这个 Issue。
评估
调研方向
首先在 repository 中定位 tokenization 和 additional_replacements 的处理逻辑,然后对比链接的 httpcore unasync.py 实现。检查 @pytest.mark.trio 如何被拆分为 tokens,并确定应如何匹配 replacement token streams。完成的标准是,所述 replacement 不再变成 no-op,并且相关测试覆盖 multitoken substitutions。
由索引模型根据 Issue 内容生成。
描述
Hey 👋
I recently came across unasync and wanted to commend you on this incredibly promising & useful project.
In that vein, I wanted to note that certain substitutions (notably additional_replacements={"@pytest.mark.trio": ""}) effectively results in a no-op as a result of the tokenization converting @pytest.mark.trio to the tokens @pytest, mark and trio.
Although token-based execution is theoretically superior, it adds a layer of complexity that httpcore's unasync.py doesn't face.
My recommendation would be to also tokenize the additional_replacements and attempt to match the token streams.
Happy to implement it once we're aligned on a solution.
- 主要语言
- Python
- 星标
- 108
- 派生
- 16
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
python-trio/unasync 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 48/100
python-trio/unasync#79 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 32/100
python-trio/unasync#78 · 1 条评论 · 1 个 reaction ·
-
JIT未关闭
难度 5/5 一周以上 新手友好度 20/100
python-trio/unasync#72 · 3 条评论 ·
-
难度 3/5 1-2 天 新手友好度 45/100
python-trio/unasync#69 · 1 条评论 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 35/100
python-trio/unasync#68 · 2 条评论 · 2 个 reaction ·
查看 python-trio/unasync 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
-
good first issue No-AI
难度 2/5 1-3 小时 新手友好度 69/100
-
documentation
难度 2/5 1-3 小时 新手友好度 78/100
-
🐛 Bug: Calendar work items cannot be opened on mobile可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 1/5 1 小时以内 新手友好度 75/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复