From adf930ee426b122b4858ccc5bb567366123b5a05 Mon Sep 17 00:00:00 2001 From: Beni ~HB9HNT <11706262+hb9hnt@users.noreply.github.com> Date: Wed, 22 May 2024 21:27:31 +0200 Subject: [PATCH] awxkit: replace deprecated locale.format() with locale.format_string() to fix human output on Python 3.12 (#15170) Replace deprecated locale.format with locale.format_string This will be removed in Python 3.12 and will break human output unless fixed. --- awxkit/awxkit/cli/format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awxkit/awxkit/cli/format.py b/awxkit/awxkit/cli/format.py index e7629a4b69..de2de47262 100644 --- a/awxkit/awxkit/cli/format.py +++ b/awxkit/awxkit/cli/format.py @@ -185,7 +185,7 @@ def format_human(output, fmt): def format_num(v): try: - return locale.format("%.*f", (0, int(v)), True) + return locale.format_string("%.*f", (0, int(v)), True) except (ValueError, TypeError): if isinstance(v, (list, dict)): return json.dumps(v)