This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Raise a SystemError if frame is NULL in PyEval_GetGlobals
Type: Stage: resolved
Components: C API Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: shreyanavigyan
Priority: normal Keywords: patch

Created on 2021-05-16 15:34 by shreyanavigyan, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 26166 closed shreyanavigyan, 2021-05-16 15:45
Messages (3)
msg393745 - (view) Author: Shreyan Avigyan (shreyanavigyan) * Date: 2021-05-16 15:34
Currently, PyEval_GetGlobals just returns NULL if frame is NULL while PyEval_GetLocals raises a runtime error and then returns NULL if frame is NULL. Raising a RuntimeError and then returning NULL from PyEval_GetGlobals if frame is NULL would be a better idea.
msg393746 - (view) Author: Shreyan Avigyan (shreyanavigyan) * Date: 2021-05-16 15:37
Sorry, it's SystemError not RuntimeError
msg393748 - (view) Author: Shreyan Avigyan (shreyanavigyan) * Date: 2021-05-16 16:15
I don't know much about ceval.c functions, so is there a reason PyEval_GetGlobals doesn't raise an error? I'm sorry for creating noise about it if the current behavior is intended. I'll close the issue and the PR then.
History
Date User Action Args
2022-04-11 14:59:45adminsetgithub: 88314
2021-05-17 08:32:53shreyanavigyansetstatus: open -> closed
stage: patch review -> resolved
2021-05-16 16:15:06shreyanavigyansetmessages: + msg393748
2021-05-16 15:45:18shreyanavigyansetkeywords: + patch
stage: patch review
pull_requests: + pull_request24797
2021-05-16 15:37:45shreyanavigyansetmessages: + msg393746
title: Raise a RuntimeError if frame is NULL in PyEval_GetGlobals -> Raise a SystemError if frame is NULL in PyEval_GetGlobals
2021-05-16 15:34:49shreyanavigyancreate