python-hyper / python-hyper/uritemplate

Potential bug/Unspecified behaviour

オープン
#34 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
246
フォーク
39
平均マージ
13時間 38分
マージ済み PR(30日)
1

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Issue にある URITemplate.expand の例と RFC 6570 のプレフィックス修飾子の規則から始め、次にスカラー値とリスト値の展開を比較します。Issue ではリポジトリのファイルも既存のテストも指定されていません。完了とは、リスト値について合意された解釈と、両方の形式に対する回帰カバレッジが得られていることを意味します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
backend-api-design
issue の種類
バグ
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。