bolkedebruin commented on code in PR #35747: URL: https://github.com/apache/airflow/pull/35747#discussion_r1398787330
########## airflow/io/path.py: ########## @@ -123,20 +120,14 @@ def __new__(cls: type[PT], *args: str | os.PathLike, **kwargs: typing.Any) -> PT url = stringify_path(other) parsed_url: SplitResult = urlsplit(url) - protocol: str | None = split_protocol(url)[0] or parsed_url.scheme - - # allow override of protocol - protocol = kwargs.get("scheme", protocol) - for key in ["scheme", "url"]: - val = kwargs.pop(key, None) - if val: - parsed_url = parsed_url._replace(**{key: val}) + if scheme: # allow override of protocol + parsed_url = parsed_url._replace(scheme=scheme) Review Comment: Not really. This is ported from upath and made to look the same as much as possible. So I haven't looked at all the angles. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org