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

move backend append logic to the prepare_variable methods #1799

Merged
merged 4 commits into from
Dec 28, 2017
Merged

move backend append logic to the prepare_variable methods #1799

merged 4 commits into from
Dec 28, 2017

Conversation

jhamman
Copy link
Member

@jhamman jhamman commented Dec 21, 2017

if LooseVersion(dask.__version__) > LooseVersion('0.8.1'):
da.store(self.sources, self.targets, lock=self.lock)
else:
da.store(self.sources, self.targets)
Copy link
Member Author

Choose a reason for hiding this comment

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

we now have a minimum dask version of 0.9 so this check is no longer needed.

@@ -232,11 +227,8 @@ def set_variables(self, variables, check_encoding_set,
for vn, v in iteritems(variables):
name = _encode_variable_name(vn)
check = vn in check_encoding_set
if vn not in self.variables:
Copy link
Member

Choose a reason for hiding this comment

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

Can we deprecate the variables property as part of this change? That would help avoid this in the future. In general it's a bad idea for adapter layers (like our backend classes) to hold state.

Copy link
Member Author

Choose a reason for hiding this comment

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

@shoyer - done. I actually removed the the attrs and dimensions properties too since they weren't really used. I left a deprecation error in there for now but can remove it assuming all the tests pass.

@shoyer
Copy link
Member

shoyer commented Dec 24, 2017

I'm glad to see we weren't using this properties very much internally :). Let's keep them as FutureWarning for now since there is a decent chance some third party backend subclass is using them, and there's no reason why we need to make things more difficult than necessary.

@jhamman
Copy link
Member Author

jhamman commented Dec 28, 2017

@shoyer - this should be good to go following my last two commits. I'm not sure how to write a regression test for this but if you think its needed, I can try to whip something up.

Copy link
Member

@shoyer shoyer left a comment

Choose a reason for hiding this comment

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

This looks good to me. Feel free to merge when you're ready.

@jhamman jhamman merged commit 6eac857 into pydata:master Dec 28, 2017
@jhamman jhamman deleted the fix/append_without_load branch December 28, 2017 05:40
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