Skip to content
Myr

Clean up keyword argument name, using URL.join(url=...), not URL.join(relative_url=...). (#1129)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* URL.join(url=...), not URL.join(relative_url=...) * Fix URL.join()

authored by Tom Christie · committed by GitHub · parent 78cf16a · Browse files · 2 files+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+4 added−4 removed

  • other:+4 added−4 removed

2 files+4 added−4 removed

modified:httpx/_client.py+1 added-1 removed
206 unmodified lines
207 """208 Merge a URL argument together with any 'base_url' on the client,209 to create the URL used for the outgoing request.210 """211 return self.base_url.join(relative_url=url)211 return self.base_url.join(url)212213 def _merge_cookies(214 self, cookies: CookieTypes = None215 ) -> typing.Optional[CookieTypes]:
1285 unmodified lines
modified:httpx/_models.py+3 added-3 removed
181 unmodified lines
182 kwargs["authority"] = authority183184 return URL(self._uri_reference.copy_with(**kwargs).unsplit(),)185186 def join(self, relative_url: URLTypes) -> "URL":186 def join(self, url: URLTypes) -> "URL":187 """188 Return an absolute URL, using given this URL as the base.189 """190 if self.is_relative_url:191 return URL(relative_url)191 return URL(url)192193 # We drop any fragment portion, because RFC 3986 strictly194 # treats URLs with a fragment portion as not being absolute URLs.195 base_uri = self._uri_reference.copy_with(fragment=None)196 relative_url = URL(relative_url)196 relative_url = URL(url)197 return URL(relative_url._uri_reference.resolve_with(base_uri).unsplit())198199 def __hash__(self) -> int:200 return hash(str(self))
999 unmodified lines