Skip to content
Myr

Error on verify as str. (#3418)

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 47f4a96 · Browse files · 1 file+8 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−0 removed

  • other:+8 added−0 removed

1 file+8 added−0 removed

modified:httpx/_config.py+8 added
29 unmodified lines
30 ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)31 ssl_context.check_hostname = False32 ssl_context.verify_mode = ssl.CERT_NONE33 return ssl_context34 elif isinstance(verify, str): # pragma: nocover35 # Explicitly handle this deprecated usage pattern.36 msg = (37 "verify should be a boolean or SSLContext, since version 0.28. "38 "Use `verify=ssl.create_default_context(cafile=...)` "39 "or `verify=ssl.create_default_context(capath=...)`."40 )41 raise RuntimeError(msg)4243 return verify4445
177 unmodified lines