Add Py_NewInterpreterFromConfig() and PyInterpreterConfig to the Public API #98733
Closed
2 tasks done
Labels
3.12
bugs and security fixes
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
topic-subinterpreters
type-feature
A feature request or enhancement
In gh-98609 we added
_Py_NewInterpreterFromConfig()
and the_PyInterpreterConfig
struct. We should consider adding them to the public API:This isn't an urgent need, since the API is unlikely to be in high demand. However, currently there isn't any way for users to currently configure a new interpreter (via
Py_NewInterpreter()
). This function will give them a supported way. Furthermore, PEP 684 ("A Per-Interpreter GIL") will likely specify that the two will be added to the public API.The only question is if
Py_NewInterpreterFromConfig()
andPyInterpreterConfig
are an appropriate (I hesitate to say "best") API for users. I think it is, given the simplicity, how easy it will be to add more settings in the future, and the parallel withPy_InitializeFromConfig()
/PyConfig
.The text was updated successfully, but these errors were encountered: