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 weakref handling #144

Merged
merged 1 commit into from
Apr 27, 2024
Merged

simplify weakref handling #144

merged 1 commit into from
Apr 27, 2024

Conversation

davidism
Copy link
Member

Use the built-in WeakMethod and inspect.ismethod instead of a custom implementation.
Build a cleanup callback from an id, rather than storing the id on an annnotatable_weakref subclass.
Simplify the private Symbol class implementation.
Use the built-in cached_property instead of a custom implementation.
Use positional-only argument for send(sender) instead of *args hack.
This simplified the type annotations, which pass with pyright as well now.

Use the built-in `WeakMethod` and `inspect.ismethod` instead of a custom implementation.
Build a cleanup callback from an id, rather than storing the id on an `annnotatable_weakref` subclass.
Simplify the private `Symbol` class implementation.
Use the built-in `cached_property` instead of a custom implementation.
Use positional-only argument for `send(sender)` instead of `*args` hack.
This simplified the type annotations, which pass with pyright as well now.
@davidism davidism closed this Apr 27, 2024
@davidism davidism reopened this Apr 27, 2024
@davidism davidism merged commit 64423df into main Apr 27, 2024
14 checks passed
@davidism davidism deleted the simplify-refs branch April 27, 2024 02:45
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant