[C API] Add `PyFrozenWriter` C API to create a `frozenset` object
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Read the C API implementation of PyFrozenSet_New() and the listed callers in Modules/_abc.c, Modules/_ssl.c, Modules/_asynciomodule.c, Modules/_hashopenssl.c, and Modules/marshal.c. Check the linked PR gh-160154 first to see the current implementation direction. Done means the C API can create a frozenset for these use cases without calling PySet_Add() on an immutable object.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
In the current C API, PyFrozenSet_New(iterable) allows creating a frozenset object from an iterable object. This API is nice, but it doesn't cover all use cases.
For other use cases, PySet_Add(frozenset, item) can be called to modify an immutable frozenset which is a bit unfortunate, since frozenset objects are supposed to be immutable. Examples of functions creating an immutable frozenset using PySet_Add():
- Modules/_abc.c:
compute_abstract_methods()for abstract - Modules/_ssl.c:
parseKeyUsage()for retval - Modules/_asynciomodule.c:
_asyncio.Future._asyncio_awaited_by - Modules/_hashopenssl.c:
hashlib_md_meth_names()for state.set - Modules/marshal.c:
r_object()
Linked PRs
- gh-160154
- Ngôn ngữ chính
- Python
- Star
- 77.7k
- Fork
- 38.3k
- Merge trung bình
- 12 giờ 27 phút
- Pull request đã merge (30 ngày)
- 710
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 python/cpython
-
3.16 build type-bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
python/cpython#160829 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
dependencies infra topic-ensurepip
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
symtable: repr() of a Symbol raises TypeError under -X lazy_imports=allCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởstdlib topic-lazy-imports type-bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
python/cpython#160810 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tarfile: extractfile(member).read() of a sparse member is slow due to repeated bytes concatenationĐang mởperformance stdlib triaged type-bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
python/cpython#160774 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tests topic-profiling type-bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
python/cpython#160334 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của python/cpython
Issue tương tự
-
area/profiles comp/cli P3 type/feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
NousResearch/hermes-agent#146372 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] OpenAI-compatible embedding model alias breaks embedder constructionCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[oblt-aw][autodoc] Document obs-aw-automerge contract and fix automerge doc inconsistenciesCó thể đã có người làm @github-actions đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
GeoSeries scale and skew tests fail with pytest 9.2.0Có thể đã có người làm @jiayuasu đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
admission-deferred priority: medium status: ready work-class: scoped
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
melodic-software/claude-code-plugins#10887 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày