Skip to content
Myr

Deprecate URL.is_ssl (#1128)

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 3205536 · Browse files · 2 files+4 added−1 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−1 removed

  • tests:+2 added−1 removed
  • other:+2 added−0 removed

2 files+4 added−1 removed

modified:httpx/_models.py+2 added
138 unmodified lines
139 )140141 @property142 def is_ssl(self) -> bool:143 message = 'URL.is_ssl() is pending deprecation. Use url.scheme == "https"'144 warnings.warn(message, DeprecationWarning)145 return self.scheme == "https"146147 @property148 def is_absolute_url(self) -> bool:
1053 unmodified lines
modified:tests/client/test_client.py+2 added-1 removed
176 unmodified lines
177def test_merge_absolute_url():178 client = httpx.Client(base_url="https://www.example.com/")179 request = client.build_request("GET", "http://www.example.com/")180 assert request.url == httpx.URL("http://www.example.com/")181 with pytest.warns(DeprecationWarning):181 assert not request.url.is_ssl182 assert not request.url.is_ssl183184185def test_merge_relative_url():186 client = httpx.Client(base_url="https://www.example.com/")
24 unmodified lines