diff --git a/yarl/_url.py b/yarl/_url.py index cd77ffb3..b4f637c2 100644 --- a/yarl/_url.py +++ b/yarl/_url.py @@ -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."""