Skip to content

Commit

Permalink
write out new for join
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Oct 30, 2024
1 parent 4a798f2 commit 0ff04a4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion yarl/_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,14 @@ def join(self, url: "URL") -> "URL":
path = path[1:]
path = normalize_path(path) if "." in path else path

return self._from_tup((scheme, self._netloc, path, query, fragment))
url = object.__new__(URL)
url._scheme = scheme
url._netloc = self._netloc
url._path = path
url._query = query
url._fragment = fragment
url._cache = {}
return url

def joinpath(self, *other: str, encoded: bool = False) -> "URL":
"""Return a new URL with the elements in other appended to the path."""
Expand Down

0 comments on commit 0ff04a4

Please sign in to comment.