gh-140938: Raise ValueError for infinite inputs to stdev/pstdev#141531
Merged
gpshead merged 8 commits intopython:mainfrom Nov 14, 2025
Merged
gh-140938: Raise ValueError for infinite inputs to stdev/pstdev#141531gpshead merged 8 commits intopython:mainfrom
gpshead merged 8 commits intopython:mainfrom
Conversation
gpshead
reviewed
Nov 13, 2025
picnixz
reviewed
Nov 13, 2025
| expected = self.func(data) | ||
| self.assertEqual(self.func(iter(data)), expected) | ||
|
|
||
|
|
Member
There was a problem hiding this comment.
I think this line removal wasn't intended.
Misc/NEWS.d/next/Library/2025-11-13-14-51-30.gh-issue-140938.kXsHHv.rst
Outdated
Show resolved
Hide resolved
Misc/NEWS.d/next/Library/2025-11-13-14-51-30.gh-issue-140938.kXsHHv.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…XsHHv.rst Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…XsHHv.rst Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
gpshead
approved these changes
Nov 14, 2025
|
Thanks @rhettinger for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Nov 14, 2025
…pythonGH-141531) Raise ValueError for infinite inputs to stdev/pstdev (cherry picked from commit f0a8bc7) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com> --- Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
GH-141575 is a backport of this pull request to the 3.14 branch. |
|
Sorry, @rhettinger and @gpshead, I could not cleanly backport this to |
gpshead
added a commit
that referenced
this pull request
Nov 15, 2025
GH-141531) (#141575) gh-140938: Raise ValueError for infinite inputs to stdev/pstdev (GH-141531) Raise ValueError for infinite inputs to stdev/pstdev (cherry picked from commit f0a8bc7) --- Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com> Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
gpshead
added a commit
to gpshead/cpython
that referenced
this pull request
Nov 15, 2025
…pythonGH-141531) Raise ValueError for infinite inputs to stdev/pstdev --- Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com> Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> (cherry picked from commit f0a8bc7)
|
GH-141584 is a backport of this pull request to the 3.13 branch. |
gpshead
added a commit
that referenced
this pull request
Nov 15, 2025
GH-141531) (#141584) gh-140938: Raise ValueError for infinite inputs to stdev/pstdev (GH-141531) Raise ValueError for infinite inputs to stdev/pstdev --- (cherry picked from commit f0a8bc7) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
StanFromIreland
pushed a commit
to StanFromIreland/cpython
that referenced
this pull request
Dec 6, 2025
…pythonGH-141531) Raise ValueError for infinite inputs to stdev/pstdev --- Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Greg, does this seem like a reasonable fix?
statistics.stdev()raisesAttributeErrorwhen data contains infinity #140938