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

[SPARK-48764][PYTHON] Filtering out IPython-related frames from user stack #47159

Closed
wants to merge 4 commits into from

Conversation

itholic
Copy link
Contributor

@itholic itholic commented Jul 1, 2024

What changes were proposed in this pull request?

This PR proposes to fix internal function _capture_call_site for filtering out IPython-related frames from user stack.

Why are the changes needed?

IPython-related frames are unnecessarily polluting the user stacks so it harms debuggability of IPython Notebook.

For example, there are some garbage stacks recorded from IPython and ipykernel such as:

  • ...lib/python3.9/site-packages/IPython/core/interactiveshell.py...
  • ...lib/python3.9/site-packages/ipykernel/zmqshell.py...

Does this PR introduce any user-facing change?

No API changes, but the user stack from IPython will be cleaned up as below:

Before
Screenshot 2024-07-01 at 3 26 45 PM

After
Screenshot 2024-07-01 at 3 25 07 PM

How was this patch tested?

The existing CI should pass

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions bot added the PYTHON label Jul 1, 2024
@itholic
Copy link
Contributor Author

itholic commented Jul 1, 2024

cc @grundprinzip @HyukjinKwon

Copy link
Contributor

@allisonwang-db allisonwang-db left a comment

Choose a reason for hiding this comment

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

awesome!

@HyukjinKwon
Copy link
Member

Merged to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants