]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-96512: Move int_max_str_digits setting to PyConfig (#96944)
authorGregory P. Smith <greg@krypto.org>
Mon, 3 Oct 2022 20:55:45 +0000 (13:55 -0700)
committerGitHub <noreply@github.com>
Mon, 3 Oct 2022 20:55:45 +0000 (13:55 -0700)
commitb0f89cb4311b696f875e58f14258ce315be09bce
treec387a1482f5b7c1a12061cf0f755835cf95a6a71
parentcfbc7dd91059cb663c7fe13c661665943495ed7f
gh-96512: Move int_max_str_digits setting to PyConfig (#96944)

It had to live as a global outside of PyConfig for stable ABI reasons in
the pre-3.12 backports.

This removes the `_Py_global_config_int_max_str_digits` and gets rid of
the equivalent field in the internal `struct _is PyInterpreterState` as
code can just use the existing nested config struct within that.

Adds tests to verify unique settings and configs in subinterpreters.
13 files changed:
Doc/c-api/init_config.rst
Include/cpython/initconfig.h
Include/internal/pycore_initconfig.h
Include/internal/pycore_interp.h
Lib/test/test_capi.py
Lib/test/test_cmd_line.py
Lib/test/test_embed.py
Lib/test/test_int.py
Misc/NEWS.d/next/C API/2022-09-20-01-04-57.gh-issue-96512.msZTjF.rst [new file with mode: 0644]
Objects/longobject.c
Programs/_testembed.c
Python/initconfig.c
Python/sysmodule.c