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

Deprecate setting values on a view subset #1114

Open
gdementen opened this issue Jul 25, 2024 · 0 comments
Open

Deprecate setting values on a view subset #1114

gdementen opened this issue Jul 25, 2024 · 0 comments

Comments

@gdementen
Copy link
Contributor

A subset sometimes sharing its "parent" data is a not-too-rare source of hard-to-find bugs.

We should detect this case and warn this is deprecated:

>>> a = ndtest(3)
>>> b = a[:'a1']
>>> b['a1'] = 0
>>> a['a1']
0

This is a requirement before we can implement #597 and it should preferably be in place for several releases before we implement #597, so this deprecation warning should come as soon as possible.

Sadly, in some cases, this is the best syntax we currently have (combining a single label subset and a boolean filter, see #1084), so it would be nice if we could fix #1084 before this... But I don't think it is worth delaying the warning because our users very rarely need that (and it is broken for multiple labels anyway), while they not-too-rarely stumble on bugs caused by this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant