python / python/cpython

Exceptions raised while parsing _interpreters configs do not name the offending key

Open
#148,818 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.