Docs for --without-doc-strings argument to configure should mention that builtins can't have their signatures analyzed
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 77.2k
- Forks
- 36k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne in Doc/using/configure.rst bei der Option --without-doc-strings und prüfe anschließend die referenzierten Abschnitte in Lib/inspect.py und Lib/test/test_capi/test_misc.py. Aktualisiere die Dokumentation der Option, um ihre Auswirkung auf die Inspektion von Signaturen eingebauter Funktionen zu erklären, und verifiziere die Dokumentation mit den relevanten Dokumentationsprüfungen oder dem Build.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 35/100