[issue46836] [C API] Move PyFrameObject to the internal C API

2022-03-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset b0f886d1bca499db1118a60b707923fa8e157073 by Victor Stinner in branch 'main': bpo-46836: Add Doc/c-api/frame.rst (GH-32051) https://github.com/python/cpython/commit/b0f886d1bca499db1118a60b707923fa8e157073 --

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-03-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +30140 pull_request: https://github.com/python/cpython/pull/32051 ___ Python tracker ___

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-03-01 Thread STINNER Victor
STINNER Victor added the comment: > Draft PR for Cython: https://github.com/cython/cython/pull/4671 Notes on how Cython access PyFrameObject fields: https://bugs.python.org/issue40421#msg414314 -- ___ Python tracker

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-03-01 Thread STINNER Victor
STINNER Victor added the comment: Draft PR for gevent: https://github.com/gevent/gevent/pull/1872 -- ___ Python tracker ___ ___

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-03-01 Thread STINNER Victor
STINNER Victor added the comment: Draft PR for Cython: https://github.com/cython/cython/pull/4671 -- ___ Python tracker ___ ___

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-03-01 Thread STINNER Victor
STINNER Victor added the comment: Draft PR for greenlet: https://github.com/python-greenlet/greenlet/pull/294 I made these changes close to the Python 3.11 alpha 6 release to be able to test "#if PY_VERSION_HEX < 0x30B00A6" to have code compatible with Python 3.11 alpha 5 and older.

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-03-01 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-03-01 Thread STINNER Victor
STINNER Victor added the comment: I plan to update Cython, greenlet and gevent for this change. -- ___ Python tracker ___ ___

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-03-01 Thread Brandt Bucher
Brandt Bucher added the comment: I'm also very uncomfortable with the lack of review on these PRs. The most recent one (https://github.com/python/cpython/pull/31583) was open for less than 30 minutes before merging, from 6:57 to 7:22 am in my local time zone. --

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-03-01 Thread Brandt Bucher
Brandt Bucher added the comment: Victor, can we please revert these changes? They broke Greenlet, a required dependency for three of our performance benchmarks: https://github.com/python-greenlet/greenlet/issues/288#issuecomment-1055632607 I've already spent considerable effort contributing

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-25 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset 87af12bff33b3e7546fa26158b7d8680ecb6ecec by Victor Stinner in branch 'main': bpo-46836: Rename InterpreterFrame to _PyInterpreterFrame (GH-31583) https://github.com/python/cpython/commit/87af12bff33b3e7546fa26158b7d8680ecb6ecec --

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29706 pull_request: https://github.com/python/cpython/pull/31583 ___ Python tracker ___

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-25 Thread STINNER Victor
STINNER Victor added the comment: I announced the change on the capi-sig mailing list: https://mail.python.org/archives/list/capi-...@python.org/thread/RCT4SB5LY5UPRRRALEOHWEQHIXFNTHYF/ -- ___ Python tracker

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset 18b5dd68c6b616257ae243c0b6bb965ffc885a23 by Victor Stinner in branch 'main': bpo-46836: Move PyFrameObject to pycore_frame.h (GH-31530) https://github.com/python/cpython/commit/18b5dd68c6b616257ae243c0b6bb965ffc885a23 --

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: -29656 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: > PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(PyThreadState *tstate, struct > _interpreter_frame *f, int exc); I created bpo-46850 "[C API] Move _PyEval_EvalFrameDefault() to the internal C API" for this issue. --

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-24 Thread Petr Viktorin
Petr Viktorin added the comment: OK, looking at it more carefully, it makes sense to do the change. -- ___ Python tracker ___ ___

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: Stefan Behnel: > I haven't looked fully into this yet, but I *think* that Cython can get rid > of most of the direct usages of PyFrameObject by switching to the new > InterpreterFrame struct instead. It looks like the important fields have now > been moved

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread Stefan Behnel
Stefan Behnel added the comment: I haven't looked fully into this yet, but I *think* that Cython can get rid of most of the direct usages of PyFrameObject by switching to the new InterpreterFrame struct instead. It looks like the important fields have now been moved over to that. That

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: Petr Viktorin: > So, this will break Cython and gevent, This change doesn't break Cython and gevent: they are already broken. > but (unlike the optimization work that broke f_code/f_frame) it won't provide > any value to users? The problem is that the C

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread Petr Viktorin
Petr Viktorin added the comment: So, this will break Cython and gevent, but (unlike the optimization work that broke f_code/f_frame) it won't provide any value to users? I don't see how that's a good idea. -- ___ Python tracker

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29656 pull_request: https://github.com/python/cpython/pull/31532 ___ Python tracker ___

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: See also the bpo-39947: "[C API] Make the PyThreadState structure opaque (move it to the internal C API)". Recently, I also added helper functions: * PyThreadState_GetFrame(): Python 3.9 and limited C API version 3.10 * PyThreadState_GetID(): Python 3.9 and

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +Mark.Shannon, corona10, erlendaasland, petr.viktorin, scoder ___ Python tracker ___ ___

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: I marked my PR as a draft since this change is an incompatible change. Even if PyFrameObject structure is excluded from the limited C API and not documented, it's used by a few projects. I plan to check how this change impacts these projects before merging

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-45247: [C API] Add explicit support for Cython to the C API. -- ___ Python tracker ___

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-44800 "Code readability: rename InterpreterFrame to _Py_framedata". -- ___ Python tracker ___

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-40421 "[C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API". I added getter functions in recent Python versions: * PyFrame_GetBack(): Python 3.9 * PyFrame_GetCode(): Python 3.9 *

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +29654 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31530 ___ Python tracker ___

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: By the way, Include/cpython/ceval.h uses the "struct _interpreter_frame*" type whereas this type is part of the internal C API: PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(PyThreadState *tstate, struct _interpreter_frame *f, int exc); Maybe we should

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
New submission from STINNER Victor : I propose to move the PyFrameObject structure to the internal C API. -- Between Python 3.10 and Python 3.11, the work on optimizing ceval.c modified deeply the PyFrameObject structure. Examples: * The f_code member has been removed by in bpo-44032 by