Skip to content
Myr

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 file

Take it

The walk stopped after 200 commits: lines older than 0ccc3fa point at it.

📌 Pin development requirements (#1721)Marcelo Trylesinskibefore adoption0ccc3fa

lines 1–3why, one step back
1import contextlib
2import logging3import os

Typing: enable disallow_incomplete_defs (#2476)Martijn Pietersbefore adoption049afe5

line 4why, one step back
4import typing

📌 Pin development requirements (#1721)Marcelo Trylesinskibefore adoption0ccc3fa

lines 5–9why, one step back
5
6from httpx import _utils789@contextlib.contextmanager

Typing: enable disallow_incomplete_defs (#2476)Martijn Pietersbefore adoption049afe5

line 10why, one step back
10def override_log_level(log_level: str) -> typing.Iterator[None]:

📌 Pin development requirements (#1721)Marcelo Trylesinskibefore adoption0ccc3fa

lines 11–21why, one step back
11 os.environ["HTTPX_LOG_LEVEL"] = log_level
1213 # 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 = []