Update to 0.19

This commit is contained in:
Karolina Surma 2022-10-24 15:47:25 +02:00
parent 9a0cd70dab
commit 5e62abe8cb
4 changed files with 14 additions and 94 deletions

1
.gitignore vendored
View File

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

View File

@ -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 <ksurma@redhat.com> - 0.19-1
- Update to 0.19
Resolves: rhbz#2099884
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

View File

@ -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,
-"""\
-<document source="test data">
- <system_message level="3" line="1" source="test data" type="ERROR">
- <paragraph>
- Error with CSV data in "csv-table" directive:
- %s
- <literal_block xml:space="preserve">
- .. csv-table:: bad encoding
- :file: %s
- :encoding: latin-1
- <paragraph>
- (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,
+"""\
+<document source="test data">
+ <system_message level="3" line="1" source="test data" type="ERROR">
+ <paragraph>
+ Error with CSV data in "csv-table" directive:
+ %s
+ <literal_block xml:space="preserve">
+ .. csv-table:: bad encoding
+ :file: %s
+ :encoding: latin-1
+ <paragraph>
+ (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

View File

@ -1 +1 @@
SHA512 (docutils-0.18.1.tar.gz) = 44404a6cc9d4c1e79c73a6ffee2898e459c9925ab9661e5d41394e13b3d861334cf0c5efcd18e87eb03041374e326cfd00539a6b2ec5979678889e8a536c9542
SHA512 (docutils-0.19.tar.gz) = fb904a899f2b6f3c07c5079577bd7c52a3182cb85f6a4149391e523498df15bfa317f0c04095b890beeb3f89c2b444875a2a609d880ac4d7fbc3125e46b37ea5