Skip to content

Conversation

@aisk
Copy link
Contributor

@aisk aisk commented May 5, 2025

Before this PR, the url would become something like file://somerandomhost.ontheinternet.comC:\Users\xxxxx\Source\cpython\build\test_python_worker_4676æ/@test_4676_tmpæ on Windows, which would fail (more details in the linked issue).

In this PR, the url becomes file://somerandomhost.ontheinternet.com/Users/xxxxx/Source/cpython/build/test_python_worker_4676æ/@test_4676_tmpæ, which is valid and expected.

@sharktide
Copy link
Contributor

@aisk NB: The review would go a lot faster if you were to add a short PR description of your changes

@aisk
Copy link
Contributor Author

aisk commented May 6, 2025

@sharktide Thanks for noticing, updated!

Copy link
Contributor

@sharktide sharktide left a comment

Choose a reason for hiding this comment

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

I know this is kinda a stupid question, but have you tested this new version of your test script on a windows long path? (I know people who wouldn't not saying its you just trying to expedite the core review process then) :)

*GitHub Actions won't fail because it is a short path.

@aisk
Copy link
Contributor Author

aisk commented Jun 15, 2025

I know this is kinda a stupid question, but have you tested this new version of your test script on a windows long path? (I know people who wouldn't not saying its you just trying to expedite the core review process then) :)

*GitHub Actions won't fail because it is a short path.

Sorry I just missed this. This bug is found on my local machine with a longer checkout path, and after this change it has been fixed.

Copy link
Contributor

@sharktide sharktide left a comment

Choose a reason for hiding this comment

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

I think it’s good! Looking forward to see this being rolled out after a core review! ( I’m especially interested because I use windows too and am thinking of turning my old pc into a python server)

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.

This test tries to create two invalid file URLs: with a port after "localhost", and with random internet host. It does not work correctly on Windows, but the fix is not correct either. The drive name should not be ignored, and some escaping is needed. pathname2url() can be used to create a valid URL which should then be mutilated.

Also note that the test creates the file in a loop -- this is not necessary.

@bedevere-app
Copy link

bedevere-app bot commented Sep 3, 2025

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.

@aisk
Copy link
Contributor Author

aisk commented Sep 5, 2025

This test tries to create two invalid file URLs: with a port after "localhost", and with random internet host. It does not work correctly on Windows, but the fix is not correct either. The drive name should not be ignored, and some escaping is needed. pathname2url() can be used to create a valid URL which should then be mutilated.

Also note that the test creates the file in a loop -- this is not necessary.

Thanks for the view, updated!

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.

3 participants