Skip to content

Commit 9d81d47

Browse files
committed
WIP
1 parent 332dc9a commit 9d81d47

11 files changed

Lines changed: 266 additions & 164 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ env:
44
# Current supported uv version. The uv documentation recommends pinning
55
# this. The version should match the version used in .pre-commit-config.yaml
66
# and frozen in uv.lock. It is updated by make update-deps.
7-
UV_VERSION: "0.10.10"
7+
UV_VERSION: "0.10.11"
88

99
"on":
1010
merge_group: {}

.github/workflows/periodic-ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ env:
99
# Current supported uv version. The uv documentation recommends pinning
1010
# this. The version should match the version used in .pre-commit-config.yaml
1111
# and frozen in uv.lock. It is updated by make update-deps.
12-
UV_VERSION: "0.10.10"
12+
UV_VERSION: "0.10.11"
1313

1414
"on":
1515
schedule:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ repos:
2121
args: [-l, '79']
2222

2323
- repo: https://github.com/astral-sh/uv-pre-commit
24-
rev: 0.10.10
24+
rev: 0.10.11
2525
hooks:
2626
- id: uv-lock

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ classifiers = [
2020
]
2121
requires-python = ">=3.13"
2222
dependencies = [
23+
"anyio >= 4.12.1",
2324
"httpx[http2]>=0.27",
2425
]
2526
dynamic = ["version"]
@@ -36,6 +37,7 @@ build-backend = "setuptools.build_meta"
3637

3738
[dependency-groups]
3839
dev = [
40+
"pyfakefs",
3941
"pytest",
4042
"pytest-asyncio",
4143
"pytest-cov",

src/parallel_http_client/_cli.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ def _parse_args() -> argparse.Namespace:
4848
type=int,
4949
help=("Chunk size to read per HTTP request [default: 1048576]"),
5050
)
51+
parser.add_argument(
52+
"-b",
53+
"--benchmark",
54+
action="store_true",
55+
help=("Report download speed when finished [default: False]"),
56+
)
5157
parser.add_argument(
5258
"-r",
5359
"--report",
@@ -82,7 +88,7 @@ def _xform_args(args: argparse.Namespace) -> argparse.Namespace:
8288
if isinstance(args.url, str):
8389
args.url = httpx.URL(args.url)
8490
if args.output is None:
85-
args.output = Path(str(args.url)).name
91+
args.output = Path.cwd().resolve() / Path(str(args.url)).name
8692
else:
8793
args.output = Path(args.output)
8894
if args.working_dir is not None:
@@ -104,6 +110,7 @@ def parallel_fetch() -> None:
104110
max_threads=args.threads,
105111
max_procs=args.processes,
106112
chunk_size=args.chunksize,
113+
benchmark=args.benchmark,
107114
report=args.report,
108115
debug=args.debug,
109116
byte_range=args.byte_range,

0 commit comments

Comments
 (0)