From 5e62abe8cb5f0f2bb0e90bdd5876e46a8b55c689 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 24 Oct 2022 15:47:25 +0200 Subject: [PATCH] Update to 0.19 --- .gitignore | 1 + python-docutils.spec | 17 ++-- ...n3.11-skip-null-bytes-exception-test.patch | 88 ------------------- sources | 2 +- 4 files changed, 14 insertions(+), 94 deletions(-) delete mode 100644 python3.11-skip-null-bytes-exception-test.patch diff --git a/.gitignore b/.gitignore index 4f5f5f5..1ccf04f 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ docutils-0.7.tar.gz /docutils-0.16.tar.gz /docutils-0.17.1.tar.gz /docutils-0.18.1.tar.gz +/docutils-0.19.tar.gz diff --git a/python-docutils.spec b/python-docutils.spec index 1a9c274..fd12fb6 100644 --- a/python-docutils.spec +++ b/python-docutils.spec @@ -1,6 +1,6 @@ Name: python-docutils -Version: 0.18.1 -Release: 2%{?dist} +Version: 0.19 +Release: 1%{?dist} Summary: System for processing plaintext documentation # See COPYING.txt for information @@ -8,9 +8,6 @@ License: Public Domain and BSD and Python and GPLv3+ URL: https://docutils.sourceforge.net Source0: https://sourceforge.net/projects/docutils/files/docutils/%{version}/docutils-%{version}.tar.gz -# https://sourceforge.net/p/docutils/bugs/436/ -Patch1: python3.11-skip-null-bytes-exception-test.patch - BuildArch: noarch BuildRequires: pyproject-rpm-macros @@ -45,6 +42,11 @@ sed -i -e '/#! *\/usr\/bin\/.*/{1D}' $(grep -Erl '^#!.+python' docutils) # We want the licenses but don't need this build file rm -f licenses/docutils.conf +# docutils's upstream generates HTML files from the txt files, which affects +# some of the egg-info's files too. We don't want those files in our package +# Reported upstream: https://sourceforge.net/p/docutils/bugs/461/ +rm -v *.egg-info/*.html + %generate_buildrequires %pyproject_buildrequires -r @@ -72,9 +74,14 @@ export PYTHONPATH=%{buildroot}%{python3_sitelib} %license COPYING.txt licenses/* %doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt THANKS.txt %{_bindir}/rst* +%{_bindir}/docutils %changelog +* Mon Oct 24 2022 Karolina Surma - 0.19-1 +- Update to 0.19 +Resolves: rhbz#2099884 + * Fri Jul 22 2022 Fedora Release Engineering - 0.18.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/python3.11-skip-null-bytes-exception-test.patch b/python3.11-skip-null-bytes-exception-test.patch deleted file mode 100644 index 8211578..0000000 --- a/python3.11-skip-null-bytes-exception-test.patch +++ /dev/null @@ -1,88 +0,0 @@ -diff --git a/test/test_parsers/test_rst/test_directives/test_tables.py b/test/test_parsers/test_rst/test_directives/test_tables.py -index 2e11131..cf9f097 100755 ---- a/test/test_parsers/test_rst/test_directives/test_tables.py -+++ b/test/test_parsers/test_rst/test_directives/test_tables.py -@@ -55,17 +55,6 @@ csv_unknown_url = "'bogus.csv'" - if sys.version_info < (3, 0): - csv_unknown_url = "bogus.csv" - -- --def null_bytes(): -- with open(utf_16_csv, 'rb') as f: -- csv_data = f.read() -- csv_data = unicode(csv_data, 'latin1').splitlines() -- reader = csv.reader([tables.CSVTable.encode_for_csv(line + '\n') -- for line in csv_data]) -- next(reader) -- --null_bytes_exception = DocutilsTestSupport.exception_data(null_bytes)[0] -- - totest = {} - - totest['table'] = [ -@@ -1025,26 +1014,6 @@ u"""\ - good, csv, data - """ % csv_eod_error_str], - ["""\ --.. csv-table:: bad encoding -- :file: %s -- :encoding: latin-1 -- --(7- and 8-bit text encoded as UTF-16 has lots of null/zero bytes.) --""" % utf_16_csv, --"""\ -- -- -- -- Error with CSV data in "csv-table" directive: -- %s -- -- .. csv-table:: bad encoding -- :file: %s -- :encoding: latin-1 -- -- (7- and 8-bit text encoded as UTF-16 has lots of null/zero bytes.) --""" % (null_bytes_exception, utf_16_csv)], --["""\ - .. csv-table:: good encoding - :file: %s - :encoding: utf-16 -@@ -1459,6 +1428,38 @@ totest['list-table'] = [ - """], - ] - -+if sys.version_info < (3, 11): -+ def null_bytes(): -+ with open(utf_16_csv, 'rb') as f: -+ csv_data = f.read() -+ csv_data = unicode(csv_data, 'latin1').splitlines() -+ reader = csv.reader([tables.CSVTable.encode_for_csv(line + '\n') -+ for line in csv_data]) -+ next(reader) -+ -+ null_bytes_exception = DocutilsTestSupport.exception_data(null_bytes)[0] -+ -+ totest['table'].append(["""\ -+.. csv-table:: bad encoding -+ :file: %s -+ :encoding: latin-1 -+ -+(7- and 8-bit text encoded as UTF-16 has lots of null/zero bytes.) -+""" % utf_16_csv, -+"""\ -+ -+ -+ -+ Error with CSV data in "csv-table" directive: -+ %s -+ -+ .. csv-table:: bad encoding -+ :file: %s -+ :encoding: latin-1 -+ -+ (7- and 8-bit text encoded as UTF-16 has lots of null/zero bytes.) -+""" % (null_bytes_exception, utf_16_csv)]) -+ - - if __name__ == '__main__': - import unittest diff --git a/sources b/sources index df8e550..63a24fb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (docutils-0.18.1.tar.gz) = 44404a6cc9d4c1e79c73a6ffee2898e459c9925ab9661e5d41394e13b3d861334cf0c5efcd18e87eb03041374e326cfd00539a6b2ec5979678889e8a536c9542 +SHA512 (docutils-0.19.tar.gz) = fb904a899f2b6f3c07c5079577bd7c52a3182cb85f6a4149391e523498df15bfa317f0c04095b890beeb3f89c2b444875a2a609d880ac4d7fbc3125e46b37ea5