feat(json_client): headers param on JsonClient.get — If-None-Match → 304 conditional reads
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
Start by reading campus_python/json_client/interface.py and trace JsonClient.get through its concrete implementations and test doubles named in the issue, including CampusRequest. The proposal also mentions Files.get_content, BySlugCollection.get_content, and Files.File.get_content; check their tests before deciding the scope. Done means conditional requests can send If-None-Match and handle 304 as described, with the affected implementations and tests updated.
索引モデルが issue の本文から書いたものです。
説明
Deferred from #125 / PR #164: campus.api /files content responses (by-slug and by-id) emit an ETag ({size}-{updated_at}) and honor If-None-Match with 304 Not Modified, but the SDK cannot send conditional requests — JsonClient.get(path, query=None) has no headers parameter.
Proposal
- Add
headers: Mapping[str, str] | None = NonetoJsonClient.get(and, if wanted, the other verbs) incampus_python/json_client/interface.py. Files.get_content/BySlugCollection.get_content/Files.File.get_contentcould then accept anetagparam: sendIf-None-Match, and on 304 returnNone(caller keeps its cached copy) instead of raising.
Why not now
A signature change on the client ABC ripples into every concrete implementation and test double fleet-wide (CampusRequest, the campus-suite TestCampusRequest, nyxchange/classroom/admin doubles). Content responses already carry max-age=60, so plain HTTP-layer caching works today; conditional revalidation is a nice-to-have that deserves its own coordinated change.
Refs: #125, #164, campus#1007 (server ETag semantics).
- 主要言語
- Python
- スター
- 0
- フォーク
- 0
- 平均マージ
- 50分
- マージ済み PR(30日)
- 48
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nyjc-computing/campus-api-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
nyjc-computing/campus-api-python#19 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
nyjc-computing/campus-api-python の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 73/100
-
day_or=True union silently becomes the ISC cron AND bug when a day field expands to its full range (e.g. '0 0 */1 * */2' fires only Sun/Tue/Thu/Sat)対応中かも @rahul05ranjan が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
pallets-eco/croniter#309 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
chore
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
nyjc-computing/campus-admin#105 ·
メンテナーはふだん 1 日以内に返信
-
bug enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
AOSSIE-Org/Gitcord-GithubDiscordBot#248 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信