Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

[Feature Request]: PyContextVar_Reset() is missing

已關閉
#1,185 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
22/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
c, java, python
領域
compilers

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

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

主要語言
Python
星號
1.7k
分支
163
平均合併
1 天 3 小時
30 天內合併 PR
50

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

oracle/graalpython 的其他 Issue

查看 oracle/graalpython 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。