utils.py
This file
Path
tests/utils.py
21 lines · 502 bytes · Python
Last changed by
Typing: enable disallow_incomplete_defs (#2476)Martijn Pietersbefore adoption049afe5
History of this fileTake it
The walk stopped after 200 commits: lines older than b4f6069 point at it.
Version 0.21 release notes (#1938)Tom Christiebefore adoptionb4f6069
lines 1–3why, one step back1import contextlib2import logging3import osTyping: enable disallow_incomplete_defs (#2476)Martijn Pietersbefore adoption049afe5
line 4why, one step back4import typingVersion 0.21 release notes (#1938)Tom Christiebefore adoptionb4f6069
lines 5–9why, one step back56from httpx import _utils789@contextlib.contextmanagerTyping: enable disallow_incomplete_defs (#2476)Martijn Pietersbefore adoption049afe5
line 10why, one step back10def override_log_level(log_level: str) -> typing.Iterator[None]:Version 0.21 release notes (#1938)Tom Christiebefore adoptionb4f6069
lines 11–21why, one step back11 os.environ["HTTPX_LOG_LEVEL"] = log_level1213 # Force a reload on the logging handlers14 _utils._LOGGER_INITIALIZED = False15 _utils.get_logger("httpx")1617 try:18 yield19 finally:20 # Reset the logger so we don't have verbose output in all unit tests21 logging.getLogger("httpx").handlers = []