Potential bug/Unspecified behaviour
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- python
调研方向
先从 issue 中的 URITemplate.expand 示例和 RFC 6570 的前缀修饰符规则开始,然后比较标量和值列表的展开方式。该 issue 没有指定 repository 文件或现有测试;完成应意味着对列表值达成一致的解释,并为两种形式提供回归覆盖。
由索引模型根据 Issue 内容生成。
描述
Let's look at a template like this:
http://example.com/dictionary/{term:1}
We have two different behaviours depending upon the value used to expand term.
>>> import uritemplate
>>> u = uritemplate.URITemplate('http://example.com/dictionary/{term:1}')
>>> u.expand(term='foo')
'http://example.com/dictionary/f'
>>> u.expand(term=['foo', 'bar', 'bogus'])
'http://example.com/dictionary/foo,bar,bogus'
A simplified version of this is simply
{term:1}
In other words:
>>> import uritemplate
>>> u = uritemplate.URITemplate('{term:1}')
>>> u.expand(term='foo')
'f'
>>> u.expand(term=['foo', 'bar', 'bogus'])
'foo,bar,bogus'
All versions of uritemplate (and uritemplate.py) exhibit this behaviour and the RFC does not provide clear guidance.
I have not investigated how other implementations in other languages handle this, though. There do not appear to be any examples in the RFC that combine lists with length limitations.
- 主要语言
- Python
- 星标
- 246
- 派生
- 41
- 平均合并
- 8 小时 20 分钟
- 30 天内合并 PR
- 3
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
python-hyper/uritemplate 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
python-hyper/uritemplate#164 ·
-
难度 2/5 1-3 小时 新手友好度 85/100
python-hyper/uritemplate#163 ·
-
难度 3/5 1-2 天 新手友好度 35/100
python-hyper/uritemplate#51 ·
-
Provide an API for validating URI Templates可能已有人在做 @sigmavirus24 于 3380 天前认领。 未关闭
难度 5/5 一周以上 新手友好度 35/100
python-hyper/uritemplate#33 · 9 条评论 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 45/100
python-hyper/uritemplate#15 ·
查看 python-hyper/uritemplate 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
aws-samples/sample-per-model-bedrock#464 ·
维护者通常 1 天内回复
-
lesson-submission pending-review
难度 2/5 1-3 小时 新手友好度 67/100
Ikalus1988/MisakaNet#3789 ·
维护者通常 1 天内回复
-
Python Volcengine provider returns failures instead of raising them可能已有人在做 @Ricardo-M-L 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 79/100
agent-infra/sandbox#248 ·
-
[Bug] cloud JSON directory loading assumes a Key field in fsspec listings可能已有人在做 @Ricardo-M-L 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
hiyouga/LlamaFactory#10910 ·
维护者通常 1 天内回复
-
Bundled uv is never updated and trusts the compromised eMudhra certificates可能已有人在做 @FabienDanieau 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 76/100