{{ message }}
Commit 7115bfd
committed
gh-98417: Stop modifying PyConfig in sys.set_int_max_str_digits()
PyConfig is an input to interpreter initialization; the copy stored on
PyInterpreterState records how the interpreter was initialized. The
runtime int<->str digit limit already lives in
PyInterpreterState.long_state.max_str_digits and that is what all
readers use, so drop the write-back into
interp->config.int_max_str_digits from _PySys_SetIntMaxStrDigits().
As a consequence, interpreters created after a runtime limit change now
start from the initially-configured limit instead of inheriting the
current runtime value.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 384abb7 commit 7115bfd
3 files changed
Lines changed: 23 additions & 3 deletions
File tree
- Lib/test
- Misc/NEWS.d/next/Core_and_Builtins
- Python
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |

0 commit comments