New submission from STINNER Victor <vstin...@python.org>:

In Python 3.10, _PyEval_EvalFrameDefault() has the API:

PyObject* _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int 
throwflag);

In Python 3.11, bpo-44590 (commit ae0a2b756255629140efcbe57fc2e714f0267aa3 
"Lazily allocate frame objects (GH-27077)") changed it to:

PyObject* _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame 
*frame, int throwflag);

Problem: InterpreterFrame is part of the internal C API.

By the way, PyInterpreterState.eval_frame type (_PyFrameEvalFunction) also 
changed. This field type already changed in Python 3.9:

* ``PyInterpreterState.eval_frame`` (:pep:`523`) now requires a new mandatory
  *tstate* parameter (``PyThreadState*``).
  (Contributed by Victor Stinner in :issue:`38500`.)

Maybe the Python 3.11 change should be documented in What's New in Python 3.11, 
as it was in What's New in Python 3.9.


I propose to move most _PyEval private functions to the internal C API to 
clarify that they must be used.

----------
components: C API
messages: 413918
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Move _PyEval_EvalFrameDefault() to the internal C API
versions: Python 3.11

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46850>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to