Exceptions raised while parsing _interpreters configs do not name the offending key
Open
Nobody has claimed this yet.
interpreter-core
topic-subinterpreters
type-feature
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Errors from _interpreters.create on a bad config (wrong type, bad string) don't say which key failed, making multi-field configs hard to debug.
Per @picnixz on #148799, add a PEP 678 note via _PyErr_FormatNote at each error site in Python/interpconfig.c.
Related: gh-148798.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Python/interpconfig.c at the error paths used by _interpreters.create, especially failures caused by an invalid type or string. Trace each configuration-key check and verify that errors from bad multi-field configs include the offending key through a PEP 678 note.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, python
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100