From a13fbe55d3df2dee8a449391171ec2ceb6991aed Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mar 18 2024 15:07:00 +0000 Subject: 2270031 - hp-firmware: module 'locale' not longer provides method 'format', causing traceback --- diff --git a/hplip-locale-format.patch b/hplip-locale-format.patch new file mode 100644 index 0000000..32fba1e --- /dev/null +++ b/hplip-locale-format.patch @@ -0,0 +1,13 @@ +diff --git a/base/utils.py b/base/utils.py +index e2de550..55848b8 100644 +--- a/base/utils.py ++++ b/base/utils.py +@@ -474,7 +474,7 @@ def sort_dict_by_value(d): + + + def commafy(val): +- return locale.format("%s", val, grouping=True) ++ return locale.format_string("%s", val, grouping=True) + + + def format_bytes(s, show_bytes=False): diff --git a/hplip.spec b/hplip.spec index 0e06590..f477533 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.23.12 -Release: 4%{?dist} +Release: 5%{?dist} # most files (base/*, *, ui*/...) - GPL2+ # prnt/hpijs/ jpeg related files - IJG # prnt/* - BSD-3-Clause-HP - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 @@ -238,6 +238,9 @@ Patch70: hplip-use-raw-strings.patch # FTBFS GCC 14 # https://bugs.launchpad.net/hplip/+bug/2048780 Patch71: hplip-hpaio-gcc14.patch +# format is no longer method in locale module +# https://bugs.launchpad.net/hplip/+bug/2045507 +Patch72: hplip-locale-format.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -595,6 +598,9 @@ done # FTBFS GCC 14 # https://bugs.launchpad.net/hplip/+bug/2048780 %patch -P 71 -p1 -b .hpaio-gcc14 +# format is no longer method in locale module +# https://bugs.launchpad.net/hplip/+bug/2045507 +%patch -P 72 -p1 -b .locale-format # Fedora specific patches now, don't put a generic patches under it %if 0%{?fedora} || 0%{?rhel} <= 8 @@ -966,6 +972,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Mon Mar 18 2024 Zdenek Dohnal - 3.23.12-5 +- 2270031 - hp-firmware: module 'locale' not longer provides method 'format', causing traceback + * Wed Jan 24 2024 Fedora Release Engineering - 3.23.12-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild