Skip to content

gh-111277: In summarize_stats.py, don't fail fast on invalid ratios #111278

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

Merged
merged 2 commits into from
Oct 31, 2023

Conversation

mdboom
Copy link
Contributor

@mdboom mdboom commented Oct 24, 2023

@markshannon
Copy link
Member

Don't we want to fail if the denominator is zero? That seems like a logic bug to me.

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

I'll merge. Do you need this backported?

@gvanrossum
Copy link
Member

Actually let me wait until you have answered Mark's question about den == 0 being an error.

@mdboom
Copy link
Contributor Author

mdboom commented Oct 30, 2023

Don't we want to fail if the denominator is zero? That seems like a logic bug to me.

I thought so too, but the tricky bit is that logic bug, if it happens, happens way over during stats collection at Python runtime. If we fail hard here, we don't get any stats out at all. With this change, we know there is an error (the !!), but we can at least see everything else and attempt to fix the error within CPython.

@gvanrossum gvanrossum merged commit 9495bca into python:main Oct 31, 2023
FullteaR pushed a commit to FullteaR/cpython that referenced this pull request Nov 3, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
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