pull_requests: 762236874
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
762236874 | PR_kwDOAMm_X84tbs_K | 5879 | closed | 0 | Check for path-like objects rather than Path type, use os.fspath | 895458 | This PR generally changes (e.g.) `isinstance(filename, pathlib.Path)` to `isinstance(filename, os.PathLike)`, and uses `os.fspath` to convert it to (usually) `str` type. (If it is vital these are always `str`, then should [`os.fsdecode`](https://docs.python.org/3/library/os.html#os.fsdecode) be considered? `bytes` paths are not common, and only possible on some platforms). If other path-like objects are used e.g. [py.path](https://py.readthedocs.io/en/latest/path.html) used by the [tmpdir pytest fixture](https://docs.pytest.org/en/6.2.x/tmpdir.html#the-tmpdir-fixture), an error message is shown: > ValueError: can only read bytes or file-like objects with engine='scipy' or 'h5netcdf' This PR allows other path-like objects to be used. A few typing objects are also adjusted too. --- Be aware there are [file-like](https://docs.python.org/3/glossary.html#term-file-like-object) and [path-like](https://docs.python.org/3/glossary.html#term-path-like-object) object terms used in the core Python glossary. In light of this, some "file-like" wordings may need to be adjusted, such as the error message described above. This can be done in this PR if anyone aggrees. | 2021-10-20T11:05:56Z | 2022-03-31T21:41:32Z | 2021-10-27T22:38:21Z | 2021-10-27T22:38:21Z | 7b93333b1b8f6cd885a3464f02c8166bbd2d9c51 | 0 | 88589cb1d27302e8fc19b4f97469133bc1278990 | df7646182b17d829fe9b2199aebf649ddb2ed480 | CONTRIBUTOR | 13221727 | https://github.com/pydata/xarray/pull/5879 |
Links from other tables
- 0 rows from pull_requests_id in labels_pull_requests