Docs Examples Focus on Outdated Single-Phase Init Modules and Static Types
未关闭
还没有人认领这个 Issue。
docs
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- PR 合并指标
- PR 指标待抓取
描述
A variety of pages show examples (or provide explanations) around single-phase init modules and static types, but should focus on the newer, recommended alternatives. For example:
- https://docs.python.org/3/extending/extending.html#intermezzo-errors-and-exceptions
https://github.com/python/cpython/blob/main/Doc/extending/extending.rst?plain=1#L206-L265 - https://docs.python.org/3/extending/extending.html#the-module-s-method-table-and-initialization-function
https://github.com/python/cpython/blob/main/Doc/extending/extending.rst?plain=1#L355-L379 - https://docs.python.org/3/extending/newtypes_tutorial.html
https://github.com/python/cpython/blob/main/Doc/extending/newtypes_tutorial.rst - https://docs.python.org/3/extending/newtypes.html
https://github.com/python/cpython/blob/main/Doc/extending/newtypes.rst - https://docs.python.org/3/extending/embedding.html#extending-embedded-python
https://github.com/python/cpython/blob/main/Doc/extending/embedding.rst?plain=1#L225
For reference:
- https://docs.python.org/3/howto/isolating-extensions.html#isolating-extensions-howto
- https://docs.python.org/3/c-api/module.html
- https://docs.python.org/3/c-api/type.html#creating-heap-allocated-types
Linked PRs
- gh-134296
- gh-134753
- gh-134754
- gh-134764
- gh-134773
- gh-134775
- gh-134827
- gh-134828
- gh-134932
- gh-134983
- gh-135126
- gh-135174
- gh-135213
- gh-135214
- gh-135470
- gh-140214
- gh-140664
- gh-142314
- gh-144183
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,将 Doc/extending/extending.rst、newtypes_tutorial.rst、newtypes.rst 和 embedding.rst 中引用的章节与 isolating extensions、module 和 type 的相关引用进行比较。确定哪些示例和说明仍在使用单阶段初始化或静态类型,然后将其更新为推荐的替代方案,并验证列出的所有文档页面是否一致。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- c, python
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100