-
Notifications
You must be signed in to change notification settings - Fork 57
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 mode argument to asdf.open #578
Comments
+1 on this. Looks like it should always remain |
I'm not sure if Also I'm not sure why it shouldn't be possible to write back to an Maybe instead of deprecating the mode argument, we just need to enforce the following behavior: if |
Better yet, I think the default should be |
Makes much sense. The only situation when the code breaks is when the file is open readonly, |
Actually it might actually be better to force This is just a turning into a giant pain, and I've dealt with this kind of thing in other libraries. This is the price we pay for having a generalized |
We can always detect the mode of the file object and print a runtime warning where we set |
You'll notice though that |
Closing since we're no longer deprecating the mode, but instead we will add readonly protections when accessing memory-mapped arrays and the underlying file handle is readonly. See #579. |
As far as I can tell, this argument does not serve any useful purpose, but only allows for buggy behavior related to memory maps (see the discussion in #575 and #576).
For these reasons, I propose to remove it entirely. For the next few releases, using this argument will result in a warning. By 3.0, it should be removed entirely.
cc @vmarkovtsev
The text was updated successfully, but these errors were encountered: