Update to 4.0.0

This commit is contained in:
Miro Hrončok 2021-02-05 11:55:12 +01:00
parent 1f30dbfcea
commit 6770299bbc
4 changed files with 13 additions and 30 deletions

1
.gitignore vendored
View File

@ -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

View File

@ -1,23 +0,0 @@
From 0561ddcedcd12ea1f98b7ddedb93686ed8a5ffa4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
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

View File

@ -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 <mhroncok@redhat.com> - 4.0.0-1
- Update to 4.0.0
- Fixes: rhbz#1906585
- Fixes: rhbz#1923076
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (chardet-3.0.4.tar.gz) = 61a03b23447a2bfe52ceed4dd1b9afdb5784da1933a623776883ee9f297e341f633e27f0ce0230bd5fdc5fdb5382105ab42736a74a417ddeb9f83af57455dba5
SHA512 (chardet-4.0.0.tar.gz) = ebd7f420e1094445270db993f6373ffe7370419e002b0bb13299dc6c9b0f7c4e77b0f44f871fba6371e6869e7c86728514367db377e3137487a3acf50cb81e96