[issue40421] [C API] Add public getter functions for the internal PyFrameObject structure

2022-04-08 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +30442
pull_request: https://github.com/python/cpython/pull/32417

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40421] [C API] Add public getter functions for the internal PyFrameObject structure

2022-04-08 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +30439
pull_request: https://github.com/python/cpython/pull/32413

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40421] [C API] Add public getter functions for the internal PyFrameObject structure

2022-04-06 Thread STINNER Victor


STINNER Victor  added the comment:

The PyFrameObject structure was made opaque by bpo-46836.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40421] [C API] Add public getter functions for the internal PyFrameObject structure

2022-04-06 Thread STINNER Victor


STINNER Victor  added the comment:

IMO the initial goal is now reached. I close the issue. Thanks to everyone who 
helped implementing these changes!

The PyFrameObject structure is now opaque in Python 3.11. New getter functions 
of the Python 3.11 C API:

* PyFrame_GetBuiltins()
* PyFrame_GetGenerator()
* PyFrame_GetGlobals()
* PyFrame_GetLocals()

Finally, the PyFrameObject structure now has its own page in the C API 
documentation:
https://docs.python.org/dev/c-api/frame.html

As explained in previous comments, the work is not done: Cython, greenlet, 
gevent and coverage still need more getter and/or setter functions. Adding more 
functions is being discussed in this external issue:
https://github.com/faster-cpython/ideas/issues/309

I propose to open new specific issues to add new functions. For example, open 
an issue to add a getter for the f_lasti member.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40421] [C API] Add public getter functions for the internal PyFrameObject structure

2022-04-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 14a9b4895b61bcd46ed968c43c5eec27670a0aac by Victor Stinner in 
branch 'main':
bpo-40421: test_capi uses assertEqual(), not assertEquals() (GH-32361)
https://github.com/python/cpython/commit/14a9b4895b61bcd46ed968c43c5eec27670a0aac


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40421] [C API] Add public getter functions for the internal PyFrameObject structure

2022-04-06 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +30410
pull_request: https://github.com/python/cpython/pull/32361

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40421] [C API] Add public getter functions for the internal PyFrameObject structure

2022-03-31 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 74b95d86e0f14603f878c4df3133bc8a93f8f80a by Mark Shannon in 
branch 'main':
bpo-40421: Add missing getters for frame object attributes to C-API. (GH-32114)
https://github.com/python/cpython/commit/74b95d86e0f14603f878c4df3133bc8a93f8f80a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40421] [C API] Add public getter functions for the internal PyFrameObject structure

2022-03-25 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +30190
pull_request: https://github.com/python/cpython/pull/32114

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40421] [C API] Add public getter functions for the internal PyFrameObject structure

2022-03-22 Thread STINNER Victor


STINNER Victor  added the comment:

Issue title: "[C API] Add getter functions for PyFrameObject and maybe move 
PyFrameObject to the internal C API"

bpo-46836 moved PyFrameObject to the internal C API. I update the issue title.

--
title: [C API] Add getter functions for PyFrameObject and maybe move 
PyFrameObject to the internal C API -> [C API] Add public getter functions for 
the internal PyFrameObject structure
versions: +Python 3.11 -Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com