Skip to content

Commit

Permalink
Drop fullpath setter (#1069)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchristie authored Jul 23, 2020
1 parent 0641606 commit 8ed7e52
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
10 changes: 0 additions & 10 deletions httpx/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@ def __init__(
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 ""
Expand Down Expand Up @@ -138,17 +134,11 @@ def query(self) -> str:

@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 ""
Expand Down
7 changes: 0 additions & 7 deletions tests/models/test_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 8ed7e52

Please sign in to comment.