-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Return filename from save_figure #27766
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join us on gitter for real-time discussion.
For details on testing, writing docs, and our review process, please see the developer guide
We strive to be a welcoming and open project. Please follow our Code of Conduct.
62fe3f4
to
1ec4655
Compare
We can probably use a closure / I agree we the webagg one looks like a big lift because I don't think we currently have a response back over the websocket. Even if we added that, it is not super clear it would be useful as the filesystems that the client (in a browser possibly on a different machine) is in general not the filesystem that the server sees. There is also a good case we should not leak anything about the client file system back to the server. |
If we want to differentiate between "I did not save a file" and "I can not tell you if a file was saved" we could return a different sentinel in the "I did not save a file case". The simplest thing (from an implement ion point of view...typing this proposal would be hard) would be to add |
That is a good idea. I'll do that. |
Usually the FileDialogs (from Qt, Gtk etc...) return |
f8a3028
to
c474811
Compare
64b6642
to
20c4e55
Compare
Hello, |
"power-cycled" to re-trigger CI. |
Unfortunately, this is failing on the newly-added test. |
The failure is gtk setting itself up on python313:
|
Thanks @Zybulon and congratulations on your first contribution to Matplotlib. 🎉 We hope to hear from you again! |
The failing tests were not fixed yet... |
which one? I thought the gtk3 python313 issue mentioned above is unrelated - Ok, my understanding: While it is unrelated, the intoduced test exercises a new gtk3 code path, which is broken. |
Closes #27744
PR summary
This PR adresses issue #27744.
save_figure functions from the NavigationToolbar return the filename of the saved figure.
If no figure is save then it returns None.
For GTK4 backend and Web backend I could not get the filename so the function still returns None.
PR checklist