Backing store enumeration returns internal tracking tuples instead of stored lists
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
InMemoryBackingStore.enumerate_()の実装と、戻り値の契約に関するBackingStoreインターフェースのドキュメントを読む。ラッパーを期待する、issueで言及されている既存のアサーションを確認し、リスト値のエントリーを対象とするテストを追加して、変更値の両方のモードで列挙結果が保存済みのリストを返すことを検証する。これらのアサーションと関連する抽象化のテストが通れば完了。
索引モデルが issue の本文から書いたものです。
説明
Environment
- Python 3.14.5
- Windows
microsoft-kiota-abstractions1.19.0, current main atee58dcfcf10fdc65dfde5f598236220aaef4c86d
Describe the bug
InMemoryBackingStore.enumerate_() returns an internal _Collection(items, size) tuple for list-valued entries rather than the list stored through set(). get() returns the original list, so the two read APIs disagree.
The BackingStore interface documents enumeration as returning the stored values, filtered according to return_only_changed_values. Scalars and tuples are already returned as the actual values.
To reproduce
from kiota_abstractions.store import InMemoryBackingStore
store = InMemoryBackingStore()
store.is_initialization_completed = True
items = [1, 2]
store.set("items", items)
for changed_only in (False, True):
store.return_only_changed_values = changed_only
print(store.enumerate_())
print(dict(store.enumerate_())["items"] is items)
Actual in both modes:
[('items', _Collection(items=[1, 2], size=2))]
False
Expected:
[('items', [1, 2])]
True
This also affects empty lists, nested lists, and lists of backed models. A resized list still returns the tracking wrapper after its dirty state is refreshed.
Additional context
A focused fix can return val unconditionally in the final enumeration projection. The existing collection-size refresh and changed-value filtering do not need to change.
I checked existing issues and PRs. This is separate from #901's detached-model subscription lifecycle issue; no subscription behavior is changed. Two existing assertions currently depend on the wrapper and need to be corrected to assert actual list values.
I verified 20 new parameterized cases against unchanged source: 11 fail on list-valued results and nine pass as controls. With the candidate fix, all 307 abstractions tests and 239 JSON serialization tests pass. Strict mypy passes all 48 abstractions source files. No claim of an HTTP serialization failure is made here.
Implementation and tests were prepared with AI assistance and validated locally.
- 主要言語
- Python
- スター
- 31
- フォーク
- 48
- 平均マージ
- 16時間 36分
- マージ済み PR(30日)
- 73
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/kiota-python のほかの issue
-
JSON numeric getters accept booleans as integers and floats対応中かも @pradeep-ramola が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/kiota-python#935 ·
メンテナーはふだん 1 日以内に返信
-
ensure 304 response code does not throw再び着手できるかも @nightcityblade が 92 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンhelp wanted type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/kiota-python#477 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
microsoft/kiota-python#901 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
microsoft/kiota-python#898 ·
メンテナーはふだん 1 日以内に返信
-
type:breaking-change
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
microsoft/kiota-python#777 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
microsoft/kiota-python の issue をすべて見る
似ている issue
-
backend: claude chore dependencies
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
briandconnelly/amicus#606 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
semantica-agi/semantica#2320 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
vllm-project/vllm-omni#11465 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
jxxghp/MoviePilot#7699 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
vllm-project/vllm-ascend#24010 ·
メンテナーはふだん 1 日以内に返信