Backing store enumeration returns internal tracking tuples instead of stored lists
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 85/100
Hướng nghiên cứu
Đọc phần triển khai InMemoryBackingStore.enumerate_() và tài liệu giao diện BackingStore về quy ước giá trị trả về. Kiểm tra các assertion hiện có được đề cập trong issue đang mong đợi wrapper, sau đó bổ sung kiểm thử cho các mục có giá trị là danh sách và xác minh rằng thao tác liệt kê trả về danh sách đã lưu ở cả hai chế độ giá trị đã thay đổi. Hoàn tất khi các assertion đó và những bài kiểm thử trừu tượng liên quan đều chạy thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 31
- Fork
- 48
- Merge trung bình
- 16 giờ 36 phút
- Pull request đã merge (30 ngày)
- 73
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/kiota-python
-
JSON numeric getters accept booleans as integers and floatsCó thể đã có người làm @pradeep-ramola đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/kiota-python#935 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ensure 304 response code does not throwCó thể làm lại được @nightcityblade đã nhận 92 ngày trước và không có pull request nào đang mở. Đang mởhelp wanted type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/kiota-python#477 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
microsoft/kiota-python#901 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 18/100
microsoft/kiota-python#898 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
type:breaking-change
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
microsoft/kiota-python#777 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/kiota-python
Issue tương tự
-
backend: claude chore dependencies
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
briandconnelly/amicus#606 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
semantica-agi/semantica#2320 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
vllm-project/vllm-omni#11465 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
jxxghp/MoviePilot#7699 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
vllm-project/vllm-ascend#24010 ·
Maintainer thường phản hồi trong vòng 1 ngày