Skip to content

test: document desugared classmethod binding bugs - #5048

Closed
asukaminato0721 wants to merge 1 commit into
meta:mainfrom
asukaminato0721:tests-only-pr-4796
Closed

asukaminato0721 wants to merge 1 commit into
meta:mainfrom
asukaminato0721:tests-only-pr-4796

Conversation

@asukaminato0721

@asukaminato0721 asukaminato0721 commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Desugared classmethod assignments retain instance binding. The test expects the current incorrect diagnostics and documents class binding, subclass-aware results, and class attribute initialization as the intended behavior.

The testcase! regressions use bug = markers and comments documenting the correct behavior. These are passing tests of known bugs, following the repository test guidance.

The complete implementation and regression tests remain in PR #4796. Related issue: #3362.

Validation

Based on upstream main at ef6de648bce0dc6dcca0a21a9fbb7490f23ecce8.

  • cargo test -p pyrefly --lib -- test_desugared_classmethod — passed.
  • python3 test.py --no-test --no-tensor-shapes --no-conformance --no-jsonschema --no-extension — passed.

@meta-codesync

meta-codesync Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D122390395. (Because this pull request was imported automatically, there will not be any future comments.)

@codspeed

codspeed Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 35 untouched benchmarks
⏩ 9 skipped benchmarks1


Comparing asukaminato0721:tests-only-pr-4796 (264ce53) with main (ae32011)

Open in CodSpeed

Footnotes

  1. 9 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@github-actions

This comment has been minimized.

@github-actions
github-actions Bot requested a review from kinto0 September 30, 2026 09:21
@github-actions github-actions Bot added size/s and removed size/s labels Oct 2, 2026
@asukaminato0721 asukaminato0721 changed the title test: cover desugared classmethod assignments test: document desugared classmethod binding bugs Oct 2, 2026
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions github-actions Bot added the stale label Oct 22, 2026
@github-actions

Copy link
Copy Markdown

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@github-actions github-actions Bot removed the stale label Oct 23, 2026

@kinto0 kinto0 left a comment

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.

Review automatically exported from Phabricator review in Meta.

@kinto0 kinto0 left a comment

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.

thank you for splitting this. sorry it took a while, I wanted to verify this actually reproduced the bug and it looks like it does. I'll merge this for now

@meta-codesync meta-codesync Bot closed this in 906d9a2 Oct 23, 2026
@meta-codesync meta-codesync Bot added the Merged label Oct 23, 2026
@meta-codesync

meta-codesync Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

This pull request has been merged in 906d9a2.

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.

2 participants