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

fix: is_valid_cache setter for ProcessNodes #5583

Merged
merged 2 commits into from
Jul 5, 2022

Conversation

ltalirz
Copy link
Member

@ltalirz ltalirz commented Jun 20, 2022

7cea5be introduced an is_valid_cache
setter that, in theory, can be used to invalidate specific process
node instances as far as the cache is concerned:

n=load_node(<PK>)
n.base.caching.is_valid_cache = False

Unfortunately, the setter did not actually work on any ProcessNode
because in Python super() cannot be used to access setters directly
(see e.g. https://stackoverflow.com/a/10810545/1069467).

fixes #5582

7cea5be introduced an `is_valid_cache`
property that, in theory, can be used to invalidate specific process
node instances as far as the cache is concerned:

```
n=load_node(<PK>)
n.base.caching.is_valid_cache = False
```

Unfortunately, the setter did not actually work on any `ProcessNode`
because in Python `super()` cannot be used to access setters directly
(see e.g. https://stackoverflow.com/a/10810545/1069467).
@ltalirz ltalirz marked this pull request as ready for review June 20, 2022 22:23
@ltalirz ltalirz requested a review from chrisjsewell June 20, 2022 22:31
@unkcpz unkcpz self-assigned this Jun 29, 2022
Copy link
Member

@unkcpz unkcpz left a comment

Choose a reason for hiding this comment

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

@ltalirz thanks! Looks all good to me.

@ltalirz ltalirz merged commit 70b4e99 into aiidateam:main Jul 5, 2022
@sphuber sphuber deleted the issue-5582-fix-setter branch July 6, 2022 13:03
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.

is_valid_cache settter is broken for ProcessNodes
2 participants