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

Remove Expr._required_attribute #799

Merged
merged 2 commits into from
Jan 29, 2024
Merged

Conversation

rjzamora
Copy link
Member

The _required_attribute check was meant to avoid infinite AttributeError recursion. However, we can also avoid this recursion by expanding the current "_meta" check in Expr.__getattr__ to throw a RuntimeError when the key is anything that starts with "_meta" (e.g. "_meta_chunk").

This PR also consolidates the redundant dask_expr._expr.Expr.__getattr__ and dask_expr._core.Expr.__getattr__ logic in once place. However, I can revert that change if there were two nearly-identical definitions for a reason.

@rjzamora rjzamora mentioned this pull request Jan 23, 2024
@rjzamora
Copy link
Member Author

Note that CI failures are unrelated: #801

@phofl phofl merged commit b2956e9 into dask:main Jan 29, 2024
5 of 7 checks passed
@phofl
Copy link
Collaborator

phofl commented Jan 29, 2024

thx

@rjzamora rjzamora deleted the remove-required-attribute branch January 29, 2024 14:45
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.

2 participants