Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Feature Request]: PyContextVar_Reset() is missing

Đã đóng
#1,185 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
3-5 ngày
Mức phù hợp với người mới
22/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c, java, python
Lĩnh vực
compilers

Hướng nghiên cứu

Start in GraalPy's C API layer (the cext module under com.oracle.graal.python), where PyContextVar_New/Get/Set wrappers already exist, and follow them to the Python-level contextvars implementation they delegate to. Mirror CPython's PyContextVar_Reset semantics for resetting a var to its previous value/token, export the new symbol, and check the gmpy2 PR 721 use case builds. Done means C extensions can call it and existing contextvars tests still pass.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement
Describe the feature

I'm trying to port gmpy2 extension (https://github.com/gmpy2/gmpy2/pull/721). One problem is lack of this function, it used to implement context managers.

Expected behavior

PyContext structure and co are opaque. Hence, I don't think that it's possible to provide an alternative to this API in applications. I appreciate, if this function will be available in GraalPy.

Additional context

No response

Ngôn ngữ chính
Python
Star
1.7k
Fork
155
Merge trung bình
6 giờ 26 phút
Pull request đã merge (30 ngày)
53

Chuẩn bị môi trường

Mở trong Codespaces

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.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của oracle/graalpython

Tất cả issue của oracle/graalpython

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.