Skip to content

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

Closed
itholic wants to merge 4 commits into
apache:masterfrom
itholic:ipython_followup
Closed

[SPARK-48764][PYTHON] Filtering out IPython-related frames from user stack#47159
itholic wants to merge 4 commits into
apache:masterfrom
itholic:ipython_followup

Conversation

@itholic
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

itholic commented Jul 1, 2024

cc @grundprinzip @HyukjinKwon

Copy link
Copy Markdown
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
Copy Markdown
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