Skip to content

Remove bad generic sqrt method #2068

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 1 commit into from
May 6, 2025
Merged

Remove bad generic sqrt method #2068

merged 1 commit into from
May 6, 2025

Conversation

fingolfin
Copy link
Member

Method dispatch does not take keyword arguments into account. Therefore the kind of dispatch used by this method is risky and can result in an infinite recursion.

Discovered while looking at test failures in PR #2051

Method dispatch does not take keyword arguments into account.
Therefore the kind of dispatch used by this method is risky
and can result in an infinite recursion.
Copy link

codecov bot commented May 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.38%. Comparing base (9e2da0e) to head (31ee918).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2068      +/-   ##
==========================================
+ Coverage   88.37%   88.38%   +0.01%     
==========================================
  Files         125      125              
  Lines       31585    31580       -5     
==========================================
- Hits        27913    27912       -1     
+ Misses       3672     3668       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@lgoettgens lgoettgens left a comment

Choose a reason for hiding this comment

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

This changes a StackOverflowError to a MethodError for the cases that dispatched to this method, so IMO a clear improvement (and non-breaking as it just replaces on error by another one)

@lgoettgens lgoettgens added the release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes label May 6, 2025
@lgoettgens lgoettgens merged commit 555b258 into master May 6, 2025
30 checks passed
@lgoettgens lgoettgens deleted the mh/sqrt branch May 6, 2025 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants