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

Simplify recursion in ObjCClass method loading #547

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

samschott
Copy link
Member

@samschott samschott commented Dec 6, 2024

This PR simplifies and documents the recursive approach to method loading for an ObjCClass:

  1. Document for instance_method_ptrs, instance_methods, and partial_methods what they contain and when they are populated.
  2. Accommodate changes to class hierarchy during init.
  3. Limit recursive method loading to ObjCClass._load_methods only.

I still want to test this with toga to see if there are any edge cases which are not covered by Rubicon's test suite.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@samschott
Copy link
Member Author

It looks like there are some issues with getattr returning an ObjCBoundMethod instead of performing attribute access in some cases: https://github.com/beeware/toga/actions/runs/12198109536/job/34029274391?pr=2978

@samschott samschott mentioned this pull request Dec 6, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant