Skip to content

Support Recording Classmethods That are Overriden by Instance Methods #287

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 3 commits into from
May 19, 2025

Conversation

peterallenwebb
Copy link
Contributor

@peterallenwebb peterallenwebb commented May 16, 2025

Recording code was crashing when attempting to wrap a method override, specifically when the method on the parent class was a classmethod, but the override is an instance method. Such an override is a poor programming practice, and we should look at removing them, but we also shouldn't crash during recording.

This change makes recording work as well as possible in such cases, and avoids a crash.

Checklist

@peterallenwebb peterallenwebb requested a review from a team as a code owner May 16, 2025 17:38
@cla-bot cla-bot bot added the cla:yes label May 16, 2025
Copy link

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@codecov-commenter
Copy link

codecov-commenter commented May 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.86%. Comparing base (4cdc152) to head (4c2909e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #287   +/-   ##
=======================================
  Coverage   71.86%   71.86%           
=======================================
  Files          52       52           
  Lines        3632     3633    +1     
=======================================
+ Hits         2610     2611    +1     
  Misses       1022     1022           
Flag Coverage Δ
unit 71.86% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@peterallenwebb peterallenwebb added this pull request to the merge queue May 19, 2025
Merged via the queue into main with commit 9b12e7f May 19, 2025
31 of 32 checks passed
@peterallenwebb peterallenwebb deleted the paw/class-to-instance-method-recording branch May 19, 2025 21:39
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.

4 participants