@property
def is_ssl(self) -> bool:
+ message = 'URL.is_ssl() is pending deprecation. Use url.scheme == "https"'
+ warnings.warn(message, DeprecationWarning)
return self.scheme == "https"
@property
client = httpx.Client(base_url="https://www.example.com/")
request = client.build_request("GET", "http://www.example.com/")
assert request.url == httpx.URL("http://www.example.com/")
- assert not request.url.is_ssl
+ with pytest.warns(DeprecationWarning):
+ assert not request.url.is_ssl
def test_merge_relative_url():