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

Refactor write_to function #581

Closed
drdavella opened this issue Oct 29, 2018 · 4 comments
Closed

Refactor write_to function #581

drdavella opened this issue Oct 29, 2018 · 4 comments

Comments

@drdavella
Copy link
Contributor

There are some shenanigans in there that should be addressed. Namely, the manipulation of self._fd is a cause for concern:

https://github.com/spacetelescope/asdf/blob/32abe89ce024ec93b838bdf684a74662a83ee0f0/asdf/asdf.py#L1088-L1095

@drdavella
Copy link
Contributor Author

Bottom line is I think we should strive for writing to be an idempotent operation.

@drdavella
Copy link
Contributor Author

It also might make sense to deprecate the uri argument to AsdfFile (I'm not sure how much this is used anyway) and instead make it an optional argument to AsdfFile.write_to. Then we should attempt to explicitly pass the URI to all places where it is required instead of making it an attribute of the AsdfFile object.

@drdavella
Copy link
Contributor Author

This is related to #119.

@asdf-format asdf-format deleted a comment from stscijgbot Aug 6, 2019
@braingram
Copy link
Contributor

I believe this was addressed in the block management rewrite #1537

Please feel free to reopen this issue if the asdf 3.0.1+ still has this issue.

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

No branches or pull requests

2 participants