Skip to content

Remove Expr._required_attribute#799

Merged
phofl merged 2 commits intodask:mainfrom
rjzamora:remove-required-attribute
Jan 29, 2024
Merged

Remove Expr._required_attribute#799
phofl merged 2 commits intodask:mainfrom
rjzamora:remove-required-attribute

Conversation

@rjzamora
Copy link
Copy Markdown
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
Copy Markdown
Member Author

Note that CI failures are unrelated: #801

@phofl phofl merged commit b2956e9 into dask:main Jan 29, 2024
@phofl
Copy link
Copy Markdown
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