Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Revive sanitizing default filenames extracted from UI window titles #28275

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

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

tacaswell
Copy link
Member

@tacaswell tacaswell commented May 22, 2024

This is a rebase of #9057 [edited to fix xref]

@tacaswell tacaswell added this to the v3.10.0 milestone May 22, 2024
@tacaswell tacaswell changed the title Revive filenames Revive sanitizing default filenames extracted from UI window titles May 22, 2024
@anntzer
Copy link
Contributor

anntzer commented May 22, 2024

Linked the wrong pr number.

anntzer and others added 2 commits June 11, 2024 10:39
I would actually think that we should not do any sanitization ("you get
what you asked for"), but given that there was some opposition last time
I tried to restore the space in the default filename ("Figure 1.png"),
even though the space is totally innocuous for the filesystem, we may as
well fix the filenames that are *actually* problematic.

Co-authored-by: Greg Lucas <[email protected]>

MNT: remove unneeded access of savefig.directory
This makes the default suggested filename independent of the OS.
@tacaswell
Copy link
Member Author

The failures were real and the tests caught a behavior change (this method should really return a file name not the full path and the save_dir was only used for the de-duplication logic that has also been subsequently removed.

@greglucas greglucas merged commit 14a04a0 into matplotlib:main Jun 11, 2024
41 of 42 checks passed
@tacaswell tacaswell deleted the revive_filenames branch June 11, 2024 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants