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