From 6770299bbca4ef9def6f9089b2f5eeb3899cb4c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 5 Feb 2021 11:55:12 +0100 Subject: [PATCH] Update to 4.0.0 --- .gitignore | 1 + 174.patch | 23 ----------------------- python-chardet.spec | 17 +++++++++++------ sources | 2 +- 4 files changed, 13 insertions(+), 30 deletions(-) delete mode 100644 174.patch diff --git a/.gitignore b/.gitignore index 403b5b8..c0db42f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ python2-chardet-2.0.1.tgz /chardet-2.2.1.tar.gz /chardet-2.3.0.tar.gz /chardet-3.0.4.tar.gz +/chardet-4.0.0.tar.gz diff --git a/174.patch b/174.patch deleted file mode 100644 index eef88e9..0000000 --- a/174.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0561ddcedcd12ea1f98b7ddedb93686ed8a5ffa4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Tue, 12 Mar 2019 18:44:36 +0100 -Subject: [PATCH] Support pytest 4, don't apply marks directly to parameters - -Fixes https://github.com/chardet/chardet/issues/173 ---- - test.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test.py b/test.py -index 9833307..ad2b753 100644 ---- a/test.py -+++ b/test.py -@@ -59,7 +59,7 @@ def gen_test_params(): - full_path = join(path, file_name) - test_case = full_path, encoding - if full_path in EXPECTED_FAILURES: -- test_case = pytest.mark.xfail(test_case) -+ test_case = pytest.param(*test_case, marks=pytest.mark.xfail) - yield test_case - - diff --git a/python-chardet.spec b/python-chardet.spec index 5a1c4d1..d56763d 100644 --- a/python-chardet.spec +++ b/python-chardet.spec @@ -1,15 +1,12 @@ %global pypi_name chardet Name: python-%{pypi_name} -Version: 3.0.4 -Release: 19%{?dist} +Version: 4.0.0 +Release: 1%{?dist} Summary: Character encoding auto-detection in Python License: LGPLv2 URL: https://github.com/%{pypi_name}/%{pypi_name} Source0: %pypi_source -# pytest 4 support -Patch1: https://github.com/chardet/chardet/pull/174.patch - BuildArch: noarch BuildRequires: python3-devel @@ -36,7 +33,10 @@ Summary: %{summary} %prep %autosetup -p1 -n %{pypi_name}-%{version} -sed -ie '1d' %{pypi_name}/cli/chardetect.py + +# Remove useless shebangs +# https://github.com/chardet/chardet/commit/1e94b33329 +grep -lr "^#\!/usr/bin/env python" chardet/ | xargs sed -i "1d" %build %py3_build @@ -58,6 +58,11 @@ sed -ie '1d' %{pypi_name}/cli/chardetect.py %changelog +* Fri Feb 05 2021 Miro HronĨok - 4.0.0-1 +- Update to 4.0.0 +- Fixes: rhbz#1906585 +- Fixes: rhbz#1923076 + * Wed Jan 27 2021 Fedora Release Engineering - 3.0.4-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 53fca90..dad62a1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (chardet-3.0.4.tar.gz) = 61a03b23447a2bfe52ceed4dd1b9afdb5784da1933a623776883ee9f297e341f633e27f0ce0230bd5fdc5fdb5382105ab42736a74a417ddeb9f83af57455dba5 +SHA512 (chardet-4.0.0.tar.gz) = ebd7f420e1094445270db993f6373ffe7370419e002b0bb13299dc6c9b0f7c4e77b0f44f871fba6371e6869e7c86728514367db377e3137487a3acf50cb81e96