Docs for --without-doc-strings argument to configure should mention that builtins can't have their signatures analyzed
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 36k
- PR 合并指标
- PR 指标待抓取
描述
Documentation
In the documentation for ./configure the --without-doc-strings option does not mention that removing docstrings also makes it impossible to use the inspect module to get the signature for builtins.
This seems to be an intentional limitation:
- https://github.com/python/cpython/blob/main/Lib/test/test_capi/test_misc.py#L164
- https://github.com/python/cpython/blob/main/Lib/inspect.py#L2528-L2534
I opened a ticket about a downstream problem due to this in the Django project and there was some confusion about what this compile-time option does.
Can the documentation be improved to mention this? The current docs discuss the docstrings limitation but unless you know about the internals of CPython it can be unclear why this would also make it impossible to inspect builtins.
I’m happy to file an PR to update the text in the docs to discuss this limitation, though I may not fully understand the scope of the problem or what else should be mentioned there.
Linked PRs
- gh-144746
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 Doc/using/configure.rst 中的 --without-doc-strings 选项开始,然后检查所引用的 Lib/inspect.py 和 Lib/test/test_capi/test_misc.py 部分。更新该选项的文档,以说明其对检查内置函数签名的影响,并使用相关的文档检查或构建来验证文档。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 1/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 35/100