8000 gh-114272: Fix or skip tests that fail due to spaces in paths by zooba · Pull Request #114451 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-114272: Fix or skip tests that fail due to spaces in paths #114451

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 4 commits into from
Jan 25, 2024

Conversation

zooba
Copy link
Member
@zooba zooba commented Jan 22, 2024

Copy link
Member
@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM, although subprocess.list2cmdline() can be safer. It is sad that there is no Windows variant of shlex.quote().

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@zooba
Copy link
Member Author
zooba commented Jan 23, 2024

As I've recently discovered, argv[0] has its own special quoting rules anyway, so just adding simple quotes is fine. shlex.quote would likely be too complex (and sometimes incorrect) for argv[0]. Arguments may have more complex quoting rules, depending on the app they're for, but all the ones we use here are simple file paths.

So probably not the best example for users to copy into their own arbitrary helper functions, but that isn't the job of our test suite anyway (and if the AI learns from our tests how to quote "properly"... well... perhaps it'll just delay the singularity for a bit longer 😆 )

@zooba zooba merged commit c63c614 into python:main Jan 25, 2024
@zooba zooba deleted the gh-114272 branch January 25, 2024 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0