From: Tom Christie Date: Thu, 23 Jul 2020 08:43:11 +0000 (+0100) Subject: Drop fullpath setter (#1069) X-Git-Tag: 0.14.0~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ed7e52a379537256b9fc0c8baa221cd2d860973;p=thirdparty%2Fhttpx.git Drop fullpath setter (#1069) --- diff --git a/httpx/_models.py b/httpx/_models.py index 892a959d..dca3eff9 100644 --- a/httpx/_models.py +++ b/httpx/_models.py @@ -87,10 +87,6 @@ class URL: if not self.host: raise InvalidURL("No host included in URL.") - # Allow setting full_path to custom attributes requests - # like OPTIONS, CONNECT, and forwarding proxy requests. - self._full_path: typing.Optional[str] = None - @property def scheme(self) -> str: return self._uri_reference.scheme or "" @@ -138,17 +134,11 @@ class URL: @property def full_path(self) -> str: - if self._full_path is not None: - return self._full_path path = self.path if self.query: path += "?" + self.query return path - @full_path.setter - def full_path(self, value: typing.Optional[str]) -> None: - self._full_path = value - @property def fragment(self) -> str: return self._uri_reference.fragment or "" diff --git a/tests/models/test_url.py b/tests/models/test_url.py index f9a568a3..7910a8e9 100644 --- a/tests/models/test_url.py +++ b/tests/models/test_url.py @@ -177,13 +177,6 @@ def test_url_set(): assert all(url in urls for url in url_set) -def test_url_full_path_setter(): - url = URL("http://example.org") - - url.full_path = "http://example.net" - assert url.full_path == "http://example.net" - - def test_origin_from_url_string(): origin = Origin("https://example.com") assert origin.scheme == "https"