Skip to content
Myr

Drop fullpath setter (#1069)

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

authored by Tom Christie · committed by GitHub · parent 0641606 · Browse files · 2 files+0 added−17 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+0 added−17 removed

  • tests:+0 added−7 removed
  • other:+0 added−10 removed

2 files+0 added−17 removed

modified:httpx/_models.py-10 removed
85 unmodified lines
86 raise InvalidURL("No scheme included in URL.")87 if not self.host:88 raise InvalidURL("No host included in URL.")8990 # Allow setting full_path to custom attributes requests91 # like OPTIONS, CONNECT, and forwarding proxy requests.92 self._full_path: typing.Optional[str] = None9390 @property91 def scheme(self) -> str:92 return self._uri_reference.scheme or ""93
39 unmodified lines
133 return self._uri_reference.query or ""134135 @property136 def full_path(self) -> str:141 if self._full_path is not None:142 return self._full_path137 path = self.path138 if self.query:139 path += "?" + self.query140 return path141148 @full_path.setter149 def full_path(self, value: typing.Optional[str]) -> None:150 self._full_path = value151142 @property143 def fragment(self) -> str:144 return self._uri_reference.fragment or ""145
1039 unmodified lines
modified:tests/models/test_url.py-7 removed
175 unmodified lines
176177 assert all(url in urls for url in url_set)178179180def test_url_full_path_setter():181 url = URL("http://example.org")182183 url.full_path = "http://example.net"184 assert url.full_path == "http://example.net"185186180def test_origin_from_url_string():181 origin = Origin("https://example.com")182 assert origin.scheme == "https"183 assert origin.is_ssl
29 unmodified lines