Skip to content

Commit

Permalink
Merge pull request #213 from openzim/small_changes
Browse files Browse the repository at this point in the history
Small changes for mindtouch
  • Loading branch information
benoit74 authored Nov 8, 2024
2 parents 7b41b04 + f5f0412 commit e89899c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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

0 comments on commit e89899c

Please sign in to comment.