]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Drop fullpath setter (#1069)
authorTom Christie <tom@tomchristie.com>
Thu, 23 Jul 2020 08:43:11 +0000 (09:43 +0100)
committerGitHub <noreply@github.com>
Thu, 23 Jul 2020 08:43:11 +0000 (09:43 +0100)
httpx/_models.py
tests/models/test_url.py

index 892a959d65bdbbd16383b1b715eca09ac0df918a..dca3eff9484c3526cd23afba83252f3c874872e6 100644 (file)
@@ -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 ""
index f9a568a31531c1abe06f8fc23e1967524c3db5ca..7910a8e904931c59fd784ad3ae9dda243afd38b3 100644 (file)
@@ -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"