From af14b356e533f1bddb2f260ed6a333c2f6899086 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Aug 02 2019 02:41:39 +0000 Subject: Update to 0.15.2 --- diff --git a/.gitignore b/.gitignore index 89c2893..e853632 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ docutils-0.7.tar.gz /docutils-0.12.tar.gz /docutils-0.13.1.tar.gz /docutils-0.14.tar.gz +/docutils-0.15.2.tar.gz diff --git a/docutils-0.9.1-pyxml-upstream.patch b/docutils-0.9.1-pyxml-upstream.patch deleted file mode 100644 index 27df368..0000000 --- a/docutils-0.9.1-pyxml-upstream.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up docutils-0.10/docutils/writers/docutils_xml.py.bak docutils-0.10/docutils/writers/docutils_xml.py ---- docutils-0.10/docutils/writers/docutils_xml.py.bak 2012-07-30 20:57:20.000000000 -0700 -+++ docutils-0.10/docutils/writers/docutils_xml.py 2012-08-14 07:51:20.389219183 -0700 -@@ -11,6 +11,19 @@ http://docutils.sourceforge.net/docs/ref - __docformat__ = 'reStructuredText' - - import sys -+ -+# Work around broken PyXML and obsolete python stdlib behaviour (The -+# stdlib replaces its own xml module with the unmaintained PyXML if PyXML -+# is installed.) Reverse the order in which xml module and submodules are -+# searched to import stdlib modules if they exist and PyXML modules if they -+# do not exist in the stdlib. -+# -+# See http://sourceforge.net/tracker/index.php?func=detail&aid=3552403&group_id=38414&atid=422030 -+# and http://lists.fedoraproject.org/pipermail/python-devel/2012-July/000406.html -+import xml -+if "_xmlplus" in xml.__path__[0]: # PyXML sub-module -+ xml.__path__.reverse() # If both are available, prefer stdlib over PyXML -+ - import xml.sax.saxutils - from StringIO import StringIO - diff --git a/docutils-0.9.1-unicode.patch b/docutils-0.9.1-unicode.patch deleted file mode 100644 index e19ad13..0000000 --- a/docutils-0.9.1-unicode.patch +++ /dev/null @@ -1,30 +0,0 @@ -Index: docutils-0.9.1/docutils/parsers/rst/directives/misc.py -=================================================================== ---- docutils-0.9.1.orig/docutils/parsers/rst/directives/misc.py -+++ docutils-0.9.1/docutils/parsers/rst/directives/misc.py -@@ -10,6 +10,7 @@ import sys - import os.path - import re - import time -+import locale - from docutils import io, nodes, statemachine, utils - from docutils.error_reporting import SafeString, ErrorString - from docutils.parsers.rst import Directive, convert_directive_function -@@ -474,6 +475,17 @@ class Date(Directive): - 'a substitution definition.' % self.name) - format = '\n'.join(self.content) or '%Y-%m-%d' - text = time.strftime(format) -+ if sys.version_info< (3, 0): -+ try: -+ text = unicode(text, locale.getpreferredencoding()) -+ except UnicodeError: -+ try: -+ text = unicode(text, 'utf-8') -+ except UnicodeError: -+ # Fallback to something that can decode all bytes to -+ # something. Alternative fallback would be to decode -+ # with errors='replace' -+ text = unicode(text, 'latin-1') - return [nodes.Text(text)] - - diff --git a/docutils-unicode-traceback.patch b/docutils-unicode-traceback.patch deleted file mode 100644 index 41ac072..0000000 --- a/docutils-unicode-traceback.patch +++ /dev/null @@ -1,49 +0,0 @@ -Index: docutils-0.8.1/docutils/frontend.py -=================================================================== ---- docutils-0.8.1.orig/docutils/frontend.py -+++ docutils-0.8.1/docutils/frontend.py -@@ -33,6 +33,7 @@ import sys - import warnings - import ConfigParser as CP - import codecs -+import locale - import optparse - from optparse import SUPPRESS_HELP - import docutils -@@ -193,7 +194,36 @@ def make_paths_absolute(pathdict, keys, - value = make_one_path_absolute(base_path, value) - pathdict[key] = value - -+def _bytes_path_to_unicode(path): -+ '''Change a byte str path segment into unicode -+ -+ Note that this is arguably wrong for Unix systems. Unix filesystem paths -+ are bytes that programs interpret as characters. Filesystem paths are in -+ no way guaranteed to be decodable into unicode. So this could traceback -+ if the locale_encoding can't deal with any byte string and it could give -+ wrong values if the locale_encoding does not match the encoding of -+ a single one of the path component's values. -+ -+ However, the rest of docutils is turning command line args containing -+ filenames into unicode so switching to unicode is more inline with the -+ strategy taken by the rest of docutils. -+ ''' -+ # converting to Unicode (Python 3 does this automatically): -+ if sys.version_info < (3,0): -+ # TODO: make this failsafe and reversible -+ # locale.getpreferredencoding is not to be preferred to getlocale or -+ # getdefaultlocale but it is preferred to hardcoding a value. We end -+ # with latin-1 because it's one of the encodings that is valid for -+ # every byte. -+ encoding = locale_encoding or locale.getpreferredencoding() or 'latin-1' -+ path = unicode(path, encoding) -+ return path -+ - def make_one_path_absolute(base_path, path): -+ if isinstance(base_path, unicode) and not isinstance(path, unicode): -+ path = _bytes_path_to_unicode(path) -+ elif isinstance(path, unicode) and not isinstance(base_path, unicode): -+ base_path = _bytes_path_to_unicode(base_path) - return os.path.abspath(os.path.join(base_path, path)) - - def filter_settings_spec(settings_spec, *exclude, **replace): diff --git a/fix-dict-ordering.patch b/fix-dict-ordering.patch deleted file mode 100644 index 5e48953..0000000 --- a/fix-dict-ordering.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -up docutils-0.10/docutils/writers/latex2e/__init__.py.py33 docutils-0.10/docutils/writers/latex2e/__init__.py ---- docutils-0.10/docutils/writers/latex2e/__init__.py.py33 2012-08-07 14:57:41.057751711 -0400 -+++ docutils-0.10/docutils/writers/latex2e/__init__.py 2012-08-07 14:57:46.730751705 -0400 -@@ -379,7 +379,7 @@ class Babel(object): - - def __call__(self): - """Return the babel call with correct options and settings""" -- languages = self.otherlanguages.keys() -+ languages = sorted(self.otherlanguages.keys()) - languages.append(self.language or 'english') - self.setup = [r'\usepackage[%s]{babel}' % ','.join(languages)] - if 'spanish' in languages: -diff -up docutils-0.10/docutils/writers/xetex/__init__.py.py33 docutils-0.10/docutils/writers/xetex/__init__.py ---- docutils-0.10/docutils/writers/xetex/__init__.py.py33 2012-08-07 14:42:22.041753020 -0400 -+++ docutils-0.10/docutils/writers/xetex/__init__.py 2012-08-07 14:44:51.983751704 -0400 -@@ -117,7 +117,7 @@ class Babel(latex2e.Babel): - r'\setdefaultlanguage{%s}' % self.language] - if self.otherlanguages: - setup.append(r'\setotherlanguages{%s}' % -- ','.join(self.otherlanguages.keys())) -+ ','.join(sorted(self.otherlanguages.keys()))) - return '\n'.join(setup) - - -diff -up docutils-0.10/test/functional/expected/standalone_rst_latex.tex.py33 docutils-0.10/test/functional/expected/standalone_rst_latex.tex -diff -up docutils-0.10/test/functional/expected/standalone_rst_xetex.tex.py33 docutils-0.10/test/functional/expected/standalone_rst_xetex.tex ---- docutils-0.10/test/functional/expected/standalone_rst_xetex.tex.py33 2012-08-07 14:52:09.929751238 -0400 -+++ docutils-0.10/test/functional/expected/standalone_rst_xetex.tex 2012-08-07 14:52:30.932751704 -0400 -@@ -7,7 +7,7 @@ - \usepackage{amsmath} - \usepackage{polyglossia} - \setdefaultlanguage{english} --\setotherlanguages{german,british,french} -+\setotherlanguages{british,french,german} - \usepackage{color} - \usepackage{float} % float configuration - \floatplacement{figure}{H} % place figures here definitely diff --git a/fix-failing-tests.patch b/fix-failing-tests.patch deleted file mode 100644 index 18c94cf..0000000 --- a/fix-failing-tests.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 54f4b07302ce3ced064f7093d86b00c2fe1e81c0 Mon Sep 17 00:00:00 2001 -From: Charalampos Stratakis -Date: Thu, 5 May 2016 17:48:26 +0200 -Subject: [PATCH] Fix failing tests - ---- - test/test_parsers/test_rst/test_directives/test_code.py | 6 +++--- - test/test_parsers/test_rst/test_directives/test_code_long.py | 2 +- - test/test_parsers/test_rst/test_interpreted.py | 2 +- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/test/test_parsers/test_rst/test_directives/test_code.py b/test/test_parsers/test_rst/test_directives/test_code.py -index 219a975..8168357 100644 ---- a/test/test_parsers/test_rst/test_directives/test_code.py -+++ b/test/test_parsers/test_rst/test_directives/test_code.py -@@ -107,10 +107,10 @@ totest['code-parsing'] = [ - - print - \n\ -- -+ - 'hello world' - \n\ -- -+ - # to stdout - """], - ["""\ -@@ -155,7 +155,7 @@ totest['code-parsing'] = [ - - 11 \n\ - \n\ -- -+ - # and now for something completely different - \n\ - -diff --git a/test/test_parsers/test_rst/test_directives/test_code_long.py b/test/test_parsers/test_rst/test_directives/test_code_long.py -index 6adf631..d2e5dbb 100644 ---- a/test/test_parsers/test_rst/test_directives/test_code_long.py -+++ b/test/test_parsers/test_rst/test_directives/test_code_long.py -@@ -60,7 +60,7 @@ totest['code-parsing-long'] = [ - - 11 \n\ - \n\ -- -+ - # and now for something completely different - \n\ - -diff --git a/test/test_parsers/test_rst/test_interpreted.py b/test/test_parsers/test_rst/test_interpreted.py -index 7beab09..a9227e2 100755 ---- a/test/test_parsers/test_rst/test_interpreted.py -+++ b/test/test_parsers/test_rst/test_interpreted.py -@@ -283,7 +283,7 @@ Python code :python:`print("The end")`. - print - - ( -- -+ - "The end" - - ) --- -2.5.5 - diff --git a/python-docutils.spec b/python-docutils.spec index 376a33d..655722f 100644 --- a/python-docutils.spec +++ b/python-docutils.spec @@ -1,8 +1,8 @@ %global srcname docutils Name: python-%{srcname} -Version: 0.14 -Release: 7%{?dist} +Version: 0.15.2 +Release: 1%{?dist} Summary: System for processing plaintext documentation # See COPYING.txt for information @@ -163,6 +163,9 @@ done %changelog +* Fri Aug 02 2019 Kevin Fenzi - 0.15.2-1 +- Update to 0.15.2 + * Fri Jul 26 2019 Fedora Release Engineering - 0.14-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 9d77bbe..a885781 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (docutils-0.14.tar.gz) = 1ed72c2ef7d2ca38d1c6f3154b7986ea46f599d9bd826405a5257fdd7740c8626957d6298aa95fb0edea8a24515de22f1ad9b2ecbd59341a1ab7a2bab30f500c +SHA512 (docutils-0.15.2.tar.gz) = e7fb82ad1d1957edc9d7ecf589ac7d36b9a68905f8efd81f8d14867a7ffca6a884e2588aa0eacea5d456ddd5927c131bcfbf08fb89ecfbdf4979c3666ec9eeca