Repository navigation
Support PathLike inputs. - #10231
Support PathLike inputs.#10231
Conversation
76a5e1c to
89a130f
Compare
efiring
left a comment
There was a problem hiding this comment.
miscellaneous comment: if this is intended to support python 2.7 then I suggest changing "file" to "_file" or some such, since "file" is a builtin in python 2. It doesn't feel right to hijack its name.
|
changed file -> fh. |
b5e9b69 to
aa4ca11
Compare
|
|
||
| The following functions now support `~.PathLike` inputs on Python 3.6+: | ||
| On Python 3.6+, `~matplotlib.pyplot.savefig`, `~matplotlib.pyplot.imsave`, | ||
| `~matplotlib.pyplot.imread`, and animation writers now accept `~os.PathLike`\s |
There was a problem hiding this comment.
The end of this sentence is a repeat of the beginning.
| PathLike support | ||
| ```````````````` | ||
|
|
||
| The following functions now support `~.PathLike` inputs on Python 3.6+: |
There was a problem hiding this comment.
Not sure you should use ~ since this is an external reference and os. is pretty short anyway.
| if (format == 'png' | ||
| or (format is None | ||
| and isinstance(fname, six.string_types) | ||
| and fname.lower().endswith('.png'))): |
There was a problem hiding this comment.
This precedence is something changed in another PR, right?
|
Hi, I'm using 2.2.0 installed with Anaconda on Jupyter notebook. I'm not sure whether this PR has been already implemented in my version or not, but I came across a related issue to this. |
|
fixed in 2.2.1 by #10754. |
PR Summary
My take on PathLike support.
Alternate for #8481; marked as release critical only in the sense that one of the two PRs should go in...
Also xref #10048.
PR Checklist