From b7799d8e8aebd94009c52f197dcc4dd7fd2c6791 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 6 Jun 2023 07:41:47 -0400 Subject: [PATCH] Replace python3-chardet with python3-charset-normalizer This is the last consumer of chardet in the ELN package set. Other consumers having already switched to charset-normalizer, which provides a compatible "detect" method for easy porting. --- cups-genppdupdate.py.in | 4 ++-- gutenprint.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cups-genppdupdate.py.in b/cups-genppdupdate.py.in index ef4b879..22d4f82 100755 --- a/cups-genppdupdate.py.in +++ b/cups-genppdupdate.py.in @@ -256,10 +256,10 @@ def parse_options(): return args def check_encoding(filename): - import chardet + import charset_normalizer with open(filename, 'rb') as f: - charenc = chardet.detect(f.read())['encoding'] + charenc = charset_normalizer.detect(f.read())['encoding'] if debug & 1: print("File encoding: {}".format(charenc)) diff --git a/gutenprint.spec b/gutenprint.spec index e01f092..b47b94b 100644 --- a/gutenprint.spec +++ b/gutenprint.spec @@ -20,7 +20,7 @@ Name: gutenprint Summary: Printer Drivers Package Version: 5.3.4 -Release: 10%{?dist} +Release: 11%{?dist} URL: http://gimp-print.sourceforge.net/ Source0: http://downloads.sourceforge.net/gimp-print/%{name}-%{version}.tar.xz # Post-install script to update CUPS native PPDs. @@ -154,7 +154,7 @@ Requires: cups Requires: %{name}%{?_isa} = %{version}-%{release} # for cups-genppdupdate python script Requires: python3 -Requires: python3-chardet +Requires: python3-charset-normalizer %description cups This package contains native CUPS support for a wide range of Canon, @@ -314,6 +314,9 @@ exit 0 %{_mandir}/man8/cups-genppd*8*.gz %changelog +* Tue Jun 06 2023 Yaakov Selkowitz - 5.3.4-11 +- Replace python3-chardet with python3-charset-normalizer + * Wed Apr 05 2023 Zdenek Dohnal - 5.3.4-11 - GTK2 is not in CentOS Stream 10, dont ship libs-ui subpackage there - Add other licenses to License tag and use SPDX identifiers to comply with FPG