bpo-46836: Rename InterpreterFrame to _PyInterpreterFrame#31583
bpo-46836: Rename InterpreterFrame to _PyInterpreterFrame#31583vstinner merged 1 commit intopython:mainfrom vstinner:interp_frame
Conversation
Rename also struct _interpreter_frame to struct _PyInterpreterFrame. Reduce risk of name conflicts if a project includes pycore_frame.h.
|
While most people should not use the internal C API, there are some legit use cases to use pycore_frame.h: mostly debuggers and profilers. |
|
Please stop renaming things without any review. |
|
If any debuggers or profilers were including these headers, then you have just broken them. |
Python 3.11.0 final is not released yet. I prefer to rename it now. |
|
The problem of the Technically, PyInterpreterState is part of the internal C API. So I would say that it's an internal C API. But well, people use it for debuggers. So it's better to make this "internal" API comply with Python C code code: prefix symbols with Py or _Py. See also this private API (private, not internal ;-)): |
|
Moreover, my short term plan to update Cython and gevent for https://bugs.python.org/issue46836 (to port them to Python 3.11 with opaque PyFrameObject type) is to make them use the internal C API pycore_frame.h. I would prefer to not have do that, but https://bugs.python.org/issue40421 is not fixed yet: there are not enough getter and setter functions for PyFrameObject. |
That's fine. There is no backward compatibility on the internal C API (nor on the private C API). |
Rename also struct _interpreter_frame to struct _PyInterpreterFrame. Reduce risk of name conflicts if a project includes pycore_frame.h.
|
That is true, but it makes our life more difficult if those tools are constantly broken, as it can hide real problems. |
Ok, gotcha. |
Rename also struct _interpreter_frame to struct _PyInterpreterFrame.
Reduce risk of name conflicts if a project includes pycore_frame.h.
https://bugs.python.org/issue46836