Skip to content
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

gh-94018: Remove trailing spaces in _sanitize_windows_name #94040

Merged
merged 10 commits into from
Jun 28, 2022

Conversation

Rygone
Copy link
Contributor

@Rygone Rygone commented Jun 20, 2022

@cpython-cla-bot
Copy link

cpython-cla-bot bot commented Jun 20, 2022

All commit authors signed the Contributor License Agreement.
CLA signed

@hauntsaninja
Copy link
Contributor

You'll want to rename your PR to "gh-94018 [...]" instead of "hg-94018"

@Rygone Rygone changed the title hg-94018: Remove trailing spaces in _sanitize_windows_name gh-94018: Remove trailing spaces in _sanitize_windows_name Jun 20, 2022
@Rygone Rygone changed the title gh-94018: Remove trailing spaces in _sanitize_windows_name [gh-94018](https://github.com/python/cpython/issues/94018): Remove trailing spaces in _sanitize_windows_name Jun 20, 2022
@Rygone Rygone changed the title [gh-94018](https://github.com/python/cpython/issues/94018): Remove trailing spaces in _sanitize_windows_name gh-94018: Remove trailing spaces in _sanitize_windows_name Jun 20, 2022
@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

…cC3A.rst

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Copy link
Member

@zware zware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be one or more tests added for this. See Lib/test/test_zipfile.py.

The change itself looks reasonable enough to me, but this should be reviewed by someone who is more versed in the inner workings of zip files before it is merged.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@Rygone
Copy link
Contributor Author

Rygone commented Jun 23, 2022

I have made the requested changes; please review again

@bedevere-bot
Copy link

Thanks for making the requested changes!

@zware: please review the changes made to this pull request.

@bedevere-bot bedevere-bot requested a review from zware June 23, 2022 14:57
Copy link
Member

@zware zware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I'm not comfortable merging without an OK from one of our zipfile maintainers.

@ambv
Copy link
Contributor

ambv commented Jun 28, 2022

LGTM. Leading or trailing spaces (ASCII 0x20) are indeed not allowed on Windows and those characters are silently removed by the OS:
https://docs.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/file-folder-name-whitespace-characters

@ambv ambv merged commit 176fd55 into python:main Jun 28, 2022
gvanrossum pushed a commit to gvanrossum/cpython that referenced this pull request Jun 30, 2022
…honGH-94040)

Closes python#94018.

Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants