pyo3 icon indicating copy to clipboard operation
pyo3 copied to clipboard

Rename `pyo3::prepare_freethreaded_python` to something more meaningful

Open peterjoel opened this issue 9 months ago • 2 comments

The name is confusing now that there is "free-threading" available in Python 3.13. A better name could be prepare_freestanding_python.

peterjoel avatar Apr 09 '25 18:04 peterjoel

I agree, I've been thinking this needs renaming for a while. I was thinking maybe pyo3::initialize_python(), or it could even go on the Python type as Python::initialize(). (The underlying C API is called Py_Initialize.)

For what it's worth, if there's any work going on to this API I'd love to also have many of the existing embedding issues explored at the same time, e.g. #1896 #1741

I suspect an API for building an initialization config would go a long way towards solving these problems.

davidhewitt avatar Apr 09 '25 19:04 davidhewitt

Python::initialize() is good!

peterjoel avatar Apr 09 '25 19:04 peterjoel

Done in #5247. Thanks @olp-cs !

davidhewitt avatar Aug 01 '25 15:08 davidhewitt