pull_requests: 18759550
This data as json
id | node_id | number | state | locked | title | user | body | created_at | updated_at | closed_at | merged_at | merge_commit_sha | assignee | milestone | draft | head | base | author_association | auto_merge | repo | url | merged_by |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18759550 | MDExOlB1bGxSZXF1ZXN0MTg3NTk1NTA= | 188 | closed | 0 | Dataset context manager and close() method | 1217238 | With this PR, it is possible to close the data store from which a dataset was loaded via `ds.close()` or automatically when a dataset is used with a context manager: ``` python with xray.open_dataset('data.nc') as ds: ... ``` The ability to cleanly close files opened from disk is pretty essential -- we probably should have had this a while ago. It should not be necessary to use the low-level/unstable datastore API to get this functionality. **Implementation question**: With this current implementation, calling `ds.close()` on (and using a context manager with) a dataset not linked to any file objects is a no-op. Should we raise an exception instead? Something like `IOError('no file object to close')`? CC @ToddSmall | 2014-07-23T07:03:49Z | 2014-07-29T19:47:46Z | 2014-07-29T19:44:30Z | 2014-07-29T19:44:30Z | 8e9c9ab7cd23507c0644207d5de1713d7a49c22c | 650893 | 0 | d1e739f27bec53f1c77d4625ffc5ddc44a2ac1e1 | 6c394b14ecc04a53d804893060ed33cadfde688e | MEMBER | 13221727 | https://github.com/pydata/xarray/pull/188 |
Links from other tables
- 3 rows from pull_requests_id in labels_pull_requests