[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-02-25 Thread STINNER Victor
STINNER Victor added the comment: This issue has been fixed by bpo-46836: New changeset 18b5dd68c6b616257ae243c0b6bb965ffc885a23 by Victor Stinner in branch 'main': bpo-46836: Move PyFrameObject to pycore_frame.h (GH-31530) -- resolution: -> fixed stage: -> resolved status: open

[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-02-23 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-46836: "[C API] Move PyFrameObject to the internal C API". -- ___ Python tracker ___

[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-01-12 Thread STINNER Victor
STINNER Victor added the comment: > I don't know how we can stop people from using them though. The first option is to promote helper functions to abstract access to the PyFrameObject structure. The second option is to make the whole structure opaque and enforce the usage of helper

[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-01-12 Thread Mark Shannon
Mark Shannon added the comment: f_lineno is not part of the API. No field in PyFrameObject is. I don't know how we can stop people from using them though. If they don't know better than pulling data out of undocumented internal struct, then I'm not sure an underscore prefix is going to

[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-01-12 Thread Silver Jublee Gaming
Silver Jublee Gaming added the comment: This must be normal -- nosy: +silverjubleegaming ___ Python tracker ___ ___

[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-01-12 Thread STINNER Victor
STINNER Victor added the comment: It's unclear to me if the ability to read directly the PyFrameObject.f_lineno member is a deliberate use case, or if we should enforce the usage of PyFrame_GetLineNumber(). -- ___ Python tracker

[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-01-12 Thread STINNER Victor
New submission from STINNER Victor : C extensions written for Python 3.10 and older which access directly to the PyFrameObject.f_back member build successfully on Python 3.11, but they can fail because f_back must not be read directly. f_back can be NULL even if the frame has an outer frame.