From 5cee8ca7761829f1ee833d73540dbcca25a842f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20K=C3=B6tter?= Date: Thu, 10 Apr 2025 10:07:35 +0200 Subject: [PATCH 1/3] cli - add --timeout argument to call --- aiopenapi3/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aiopenapi3/cli.py b/aiopenapi3/cli.py index 66f13df2..39a2ad85 100644 --- a/aiopenapi3/cli.py +++ b/aiopenapi3/cli.py @@ -191,6 +191,7 @@ def cmd_convert(args: argparse.Namespace) -> None: cmd.add_argument("-p", "--parameters") cmd.add_argument("-d", "--data") cmd.add_argument("-f", "--format") + cmd.add_argument("-t", "--timeout", type=int, default=15) def cmd_call(args: argparse.Namespace) -> None: loader = loader_prepare(args, session_factory) @@ -311,7 +312,9 @@ def log_(s): tracemalloc.start() def session_factory(*args_, **kwargs) -> httpx.Client: - return httpx.Client(*args_, verify=args.disable_ssl_validation is False, **kwargs) + return httpx.Client( + *args_, verify=args.disable_ssl_validation is False, timeout=httpx.Timeout(args.timeout), **kwargs + ) if args.func: args.func(args) From 3a150799fd2411d586d2eb4fdbf3895727a57988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20K=C3=B6tter?= Date: Thu, 10 Apr 2025 10:09:03 +0200 Subject: [PATCH 2/3] cli - Path.expanduser() for @ prefixed arguments --- aiopenapi3/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiopenapi3/cli.py b/aiopenapi3/cli.py index 39a2ad85..0c15ffee 100644 --- a/aiopenapi3/cli.py +++ b/aiopenapi3/cli.py @@ -199,7 +199,7 @@ def cmd_call(args: argparse.Namespace) -> None: def prepare_arg(value): if value: if value[0] == "@": - with Path(value[1:]).open("rt") as f: + with Path(value[1:]).expanduser().open("rt") as f: data = json.load(f) else: data = json.loads(value) From c6786255b6ec67165e4623e63e59a2a31dac717e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20K=C3=B6tter?= Date: Fri, 11 Apr 2025 14:01:11 +0200 Subject: [PATCH 3/3] ci - dependabot using uv --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 22bfa225..85993df1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,7 +6,7 @@ version: 2 updates: # Python requirements.txt setup.cfg - - package-ecosystem: "pip" + - package-ecosystem: "uv" directory: "/" schedule: interval: "weekly"