Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-145306: Fix browser open after empty export#150017

Open
ivonastojanovic wants to merge 2 commits into
python:mainpython/cpython:mainfrom
lkollar:tachyon/fix-browser-openlkollar/cpython:tachyon/fix-browser-openCopy head branch name to clipboard
Open

gh-145306: Fix browser open after empty export#150017
ivonastojanovic wants to merge 2 commits into
python:mainpython/cpython:mainfrom
lkollar:tachyon/fix-browser-openlkollar/cpython:tachyon/fix-browser-openCopy head branch name to clipboard

Conversation

@ivonastojanovic

Copy link
Copy Markdown
Contributor

Make sampling exporters report whether output was generated, and only open HTML reports in the browser after a successful export.

Comment thread Lib/profiling/sampling/cli.py Outdated
if args.format in ('flamegraph', 'diff_flamegraph', 'heatmap') and getattr(args, 'browser', False):
if (
export_ok
and args.format in ('flamegraph', 'diff_flamegraph', 'heatmap')

@maurycy maurycy May 19, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, I think introducing BROWSER_COMPATIBLE_FORMATS makes sense here. @lkollar could you make that change?

@picnixz picnixz changed the title gh-145306 Fix browser open after empty export gh-145306: Fix browser open after empty export May 19, 2026
lkollar added 2 commits May 21, 2026 16:49
Make sampling exporters report whether output was generated, and only
open HTML reports in the browser after a successful export.
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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.