Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/zimscraperlib/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,13 @@ def stream_file(
fpath: pathlib.Path | None = None,
byte_stream: IO[bytes] | None = None,
block_size: int | None = 1024,
proxies: dict | None = None,
proxies: dict[str, str] | None = None,
max_retries: int | None = 5,
headers: dict[str, str] | None = None,
session: requests.Session | None = None,
*,
only_first_block: bool | None = False,
) -> tuple[int, requests.structures.CaseInsensitiveDict]:
) -> tuple[int, requests.structures.CaseInsensitiveDict[str]]:
"""Stream data from a URL to either a BytesIO object or a file
Arguments -
fpath - Path of the file where data is sent
Expand Down
3 changes: 3 additions & 0 deletions src/zimscraperlib/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
from zimscraperlib.constants import NAME

DEFAULT_FORMAT = "[%(name)s::%(asctime)s] %(levelname)s:%(message)s"
DEFAULT_FORMAT_WITH_THREADS = (
"[%(name)s::%(threadName)s::%(asctime)s] %(levelname)s:%(message)s"
)
VERBOSE_DEPENDENCIES = ["urllib3", "PIL", "boto3", "botocore", "s3transfer"]


Expand Down