Skip to content

bpo-38818: PyInterpreterState.eval_frame now pass tstate #17187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

bpo-38818: PyInterpreterState.eval_frame now pass tstate #17187

wants to merge 1 commit into from

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Nov 16, 2019

PyInterpreterState.eval_frame (PEP 523) now requires a new mandatory
tstate parameter (PyThreadState*).

https://bugs.python.org/issue38818

PyInterpreterState.eval_frame (PEP 523) now requires a new mandatory
tstate parameter (PyThreadState*).
@vstinner
Copy link
Member Author

This change is backward incompatible and changes the PEP 523. I would prefer to have it carefully reviewed ;-)

@shihai1991
Copy link
Member

This change is backward incompatible and changes the PEP 523. I would prefer to have it carefully reviewed ;-)

In order to keep backward compatibility, can we use a new function to do this action?

@vstinner
Copy link
Member Author

In order to keep backward compatibility, can we use a new function to do this action?

PyInterpreterState.eval_frame is a structure field. What do you mean?

Copy link
Member

@corona10 corona10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shihai1991

It can happen from the contributors who are not familiar with the codebase.
@shihai1991 I think that the snippet I attach links below will help your future contribution.

typedef struct _is PyInterpreterState;

_PyFrameEvalFunction eval_frame;

@vstinner
Looks good to me.

@shihai1991
Copy link
Member

In order to keep backward compatibility, can we use a new function to do this action?

PyInterpreterState.eval_frame is a structure field. What do you mean?

Sorry, i didn't express cleary. I just worried about whether we have external user use _PyEval_EvalFrameDefault(struct _frame *f, int exc)(although it's a inner function).

@vstinner
Copy link
Member Author

frame_eval is specified by https://www.python.org/dev/peps/pep-0523/

The question if it should be public or not is discussed at https://bugs.python.org/issue38500

At least, the API (frame_eval) is used by PyCharm to implement their debugger ;-)

@brettcannon
Copy link
Member

brettcannon commented Nov 18, 2019

I don't think this should go in until bpo-38500 is resolved.

@vstinner
Copy link
Member Author

I included this change into PR #17340. I close this PR.

@vstinner vstinner closed this Mar 10, 2020
@vstinner vstinner deleted the eval_frame_tstate branch March 10, 2020 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants