Skip to content

Conversation

@Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Nov 24, 2025

Closes #2985

@Skn0tt Skn0tt marked this pull request as ready for review November 24, 2025 12:52
@Skn0tt Skn0tt requested a review from dgozman November 24, 2025 12:52
) -> None:
await self._click(**locals_to_params(locals()))

async def _click(
Copy link
Contributor

Choose a reason for hiding this comment

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

This is unfortunate!

Copy link
Member Author

Choose a reason for hiding this comment

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

true that! but without this separation, we'd have a frame.click(steps=) param

def ensure_trailing_slash(url: str) -> str:
split = url.split("://", maxsplit=1)
if len(split) == 2:
# URL parser doesn't like strange/unknown schemes, so we replace it for parsing, then put it back
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this comment incorrect? Could it be python-version-specific?

Copy link
Member Author

@Skn0tt Skn0tt Nov 24, 2025

Choose a reason for hiding this comment

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

I'm not sure if it was incorrect. Certainly not version specific, urlparse didn't change much in the past years: https://github.com/python/cpython/blob/3.14/Lib/urllib/parse.py

The implementation definitely wasn't correct for the my.custom.protocol test cases. And I figured that instead of trying to understand its behaviour, I just implement the WHATWG spec.

@Skn0tt Skn0tt merged commit 3d1b875 into microsoft:main Nov 24, 2025
40 of 42 checks passed
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.

[Ports]: Backport client side changes for 1.57

2 participants