Skip to content
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

Fixed #35405 -- Used @cached_property in FieldCacheMixin. #18101

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adamchainz
Copy link
Sponsor Member

Trac ticket number

ticket-35405

Branch description

Optimization as described on ticket.

Checklist

  • This PR targets the main branch.
  • The commit message is written in past tense, mentions the ticket number, and ends with a period.
  • I have checked the "Has patch" ticket flag in the Trac system.
  • I have added or updated relevant tests.
  • I have added or updated relevant docs, including release notes if applicable.
  • I have attached screenshots in both light and dark modes for any UI changes.

Copy link
Contributor

@nessita nessita left a comment

Choose a reason for hiding this comment

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

Thank you @adamchainz for this work! I agree with Simon that the patch looks good but I think this also needs a few tests covering the deprecation paths/messages and how both the old method and new cached property work OK.

@adamchainz adamchainz force-pushed the ticket_35405 branch 2 times, most recently from 973f80f to 86d51aa Compare May 3, 2024 16:17
@adamchainz
Copy link
Sponsor Member Author

I have added some tests specific to the mixin, including for the deprecation path.

co-authored-by: Simon Charette <charette.s@gmail.com>
co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants