Skip to content
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

feat(profiling): Use co_qualname in python 3.11 #1831

Merged

Conversation

Zylphrex
Copy link
Member

The get_frame_name implementation works well for <3.11 but 3.11 introduced a co_qualname that works like our implementation of get_frame_name and handles some cases better.


def get_frame_name(frame):
# type: (FrameType) -> str
return frame.f_code.co_qualname # type: ignore
Copy link
Member Author

Choose a reason for hiding this comment

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

@Zylphrex Zylphrex force-pushed the txiao/feat/use-co_qualname-in-python-3.11-for-profiling branch from a64fc18 to 93b9fd4 Compare January 11, 2023 20:43
The `get_frame_name` implementation works well for <3.11 but 3.11 introduced a
`co_qualname` that works like our implementation of `get_frame_name` and handles
some cases better.
@Zylphrex Zylphrex force-pushed the txiao/feat/use-co_qualname-in-python-3.11-for-profiling branch from 93b9fd4 to fa14e20 Compare January 11, 2023 20:58
@antonpirker
Copy link
Member

@Zylphrex could you fix the conflicts?

@Zylphrex Zylphrex merged commit 086e385 into master Jan 19, 2023
@Zylphrex Zylphrex deleted the txiao/feat/use-co_qualname-in-python-3.11-for-profiling branch January 19, 2023 15:40
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.

None yet

3 participants