mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-30 22:48:07 -07:00
dev-python/docutils: major improvements.
This commit: * bumps EAPI. * fixes EPYTHON. * removes python3.3. * removes version 0.10 and version 0.9.1-r1. * revision-bumps to version 0.12-r1. * fixes testing: testing was broken both for CPython and PyPy, it was solved by two patches. One is from upstream, the other has been submitted to upstream. Upstream submission: https://sourceforge.net/p/docutils/patches/136/ Gentoo-Bug: https://bugs.gentoo.org/452792 Gentoo-Bug: https://bugs.gentoo.org/451830 Gentoo-Bug: https://bugs.gentoo.org/529930 Gentoo-Bug: https://bugs.gentoo.org/593754 Courtesy of Mathy Vanvoorden <mathy@vanvoorden.be>. Package-Manager: portage-2.3.0 Closes: https://github.com/gentoo/gentoo/pull/2600 Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
This commit is contained in:
committed by
Patrice Clement
parent
a4c1b274a5
commit
37751f69b9
@@ -1,34 +0,0 @@
|
||||
Patch by Arfrever
|
||||
https://sourceforge.net/tracker/?func=detail&aid=3598893&group_id=38414&atid=422030
|
||||
|
||||
Index: docutils/frontend.py
|
||||
===================================================================
|
||||
--- docutils/frontend.py (revision 7578)
|
||||
+++ docutils/frontend.py (working copy)
|
||||
@@ -158,7 +158,7 @@
|
||||
|
||||
def validate_colon_separated_string_list(
|
||||
setting, value, option_parser, config_parser=None, config_section=None):
|
||||
- if isinstance(value, unicode):
|
||||
+ if isinstance(value, basestring):
|
||||
value = value.split(':')
|
||||
else:
|
||||
last = value.pop()
|
||||
@@ -171,7 +171,7 @@
|
||||
"""
|
||||
# `value` is already a list when given as command line option
|
||||
# and "action" is "append"
|
||||
- if isinstance(value, unicode):
|
||||
+ if isinstance(value, basestring):
|
||||
value = [value]
|
||||
# this function is called for every option added to `value`
|
||||
# -> split the last item and apped the result:
|
||||
@@ -731,7 +731,7 @@
|
||||
"""Wrapper around sys.stderr catching en-/decoding errors"""
|
||||
|
||||
def read(self, filenames, option_parser):
|
||||
- if type(filenames) in (str, unicode):
|
||||
+ if isinstance(filenames, basestring):
|
||||
filenames = [filenames]
|
||||
for filename in filenames:
|
||||
try:
|
||||
105
dev-python/docutils/files/docutils-0.12-fix-tests-pygments.patch
Normal file
105
dev-python/docutils/files/docutils-0.12-fix-tests-pygments.patch
Normal file
@@ -0,0 +1,105 @@
|
||||
From c8329f1bca61c203b48f80f01876384a79cceab5 Mon Sep 17 00:00:00 2001
|
||||
From: milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>
|
||||
Date: Sat, 14 May 2016 21:15:00 +0000
|
||||
Subject: [PATCH] Apply #131 (update pygments test to pygments 2.1) by
|
||||
cstratak.
|
||||
|
||||
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7936 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
||||
---
|
||||
.../test_parsers/test_rst/test_directives/test_code.py | 6 +++---
|
||||
.../test_rst/test_directives/test_code_long.py | 2 +-
|
||||
docutils/test/test_parsers/test_rst/test_interpreted.py | 14 +++++++-------
|
||||
3 files changed, 11 insertions(+), 11 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 5e013d4..8affcbe 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'] = [
|
||||
<inline classes="keyword">
|
||||
print
|
||||
\n\
|
||||
- <inline classes="literal string">
|
||||
+ <inline classes="literal string single">
|
||||
'hello world'
|
||||
\n\
|
||||
- <inline classes="comment">
|
||||
+ <inline classes="comment single">
|
||||
# to stdout
|
||||
"""],
|
||||
["""\
|
||||
@@ -155,7 +155,7 @@ totest['code-parsing'] = [
|
||||
<inline classes="ln">
|
||||
11 \n\
|
||||
\n\
|
||||
- <inline classes="comment">
|
||||
+ <inline classes="comment single">
|
||||
# and now for something completely different
|
||||
\n\
|
||||
<inline classes="ln">
|
||||
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 f015357..e6430cc 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'] = [
|
||||
<inline classes="ln">
|
||||
11 \n\
|
||||
\n\
|
||||
- <inline classes="comment">
|
||||
+ <inline classes="comment single">
|
||||
# and now for something completely different
|
||||
\n\
|
||||
<inline classes="ln">
|
||||
diff --git a/test/test_parsers/test_rst/test_interpreted.py b/test/test_parsers/test_rst/test_interpreted.py
|
||||
index f9a1194..87d0a77 100755
|
||||
--- a/test/test_parsers/test_rst/test_interpreted.py
|
||||
+++ b/test/test_parsers/test_rst/test_interpreted.py
|
||||
@@ -119,30 +119,30 @@ totest['basics'] = [
|
||||
:not a role if it contains whitespace:
|
||||
"""],
|
||||
["""\
|
||||
-:title:`` (empty interpteted text not recognized)
|
||||
+:title:`` (empty interpreted text not recognized)
|
||||
""",
|
||||
"""\
|
||||
<document source="test data">
|
||||
<paragraph>
|
||||
- :title:`` (empty interpteted text not recognized)
|
||||
+ :title:`` (empty interpreted text not recognized)
|
||||
"""],
|
||||
["""\
|
||||
-:title:`\ ` (interpteted text containing empty string)
|
||||
+:title:`\ ` (interpreted text containing empty string)
|
||||
""",
|
||||
"""\
|
||||
<document source="test data">
|
||||
<paragraph>
|
||||
<title_reference>
|
||||
- (interpteted text containing empty string)
|
||||
+ (interpreted text containing empty string)
|
||||
"""],
|
||||
["""\
|
||||
-`\ `:title: (interpteted text containing empty string (postfix))
|
||||
+`\ `:title: (interpreted text containing empty string (postfix))
|
||||
""",
|
||||
"""\
|
||||
<document source="test data">
|
||||
<paragraph>
|
||||
<title_reference>
|
||||
- (interpteted text containing empty string (postfix))
|
||||
+ (interpreted text containing empty string (postfix))
|
||||
"""],
|
||||
["""\
|
||||
:title:`\ non-empty`
|
||||
@@ -283,7 +283,7 @@ Python code :python:`print("The end")`.
|
||||
print
|
||||
<inline classes="punctuation">
|
||||
(
|
||||
- <inline classes="literal string">
|
||||
+ <inline classes="literal string double">
|
||||
"The end"
|
||||
<inline classes="punctuation">
|
||||
)
|
||||
--
|
||||
2.7.4.GIT
|
||||
|
||||
51
dev-python/docutils/files/docutils-0.12-fix-tests-pypy.patch
Normal file
51
dev-python/docutils/files/docutils-0.12-fix-tests-pypy.patch
Normal file
@@ -0,0 +1,51 @@
|
||||
diff --git a/test/test_parsers/test_rst/test_directives/test_images.py b/test/test_parsers/test_rst/test_directives/test_images.py
|
||||
index ea3adfa..9743fba 100755
|
||||
--- a/test/test_parsers/test_rst/test_directives/test_images.py
|
||||
+++ b/test/test_parsers/test_rst/test_directives/test_images.py
|
||||
@@ -277,7 +277,7 @@ totest['images'] = [
|
||||
<literal_block xml:space="preserve">
|
||||
.. image:: picture.png
|
||||
:scale: fifty
|
||||
-""" % DocutilsTestSupport.exception_data(int, "fifty")[1][0]],
|
||||
+""" % DocutilsTestSupport.exception_data(int, u"fifty")[1][0]],
|
||||
["""\
|
||||
.. image:: picture.png
|
||||
:scale: 50
|
||||
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 1200ab0..b75844a 100755
|
||||
--- a/test/test_parsers/test_rst/test_directives/test_tables.py
|
||||
+++ b/test/test_parsers/test_rst/test_directives/test_tables.py
|
||||
@@ -12,6 +12,7 @@ from __init__ import DocutilsTestSupport
|
||||
|
||||
import os, sys
|
||||
import csv
|
||||
+import platform
|
||||
from docutils.parsers.rst.directives import tables
|
||||
|
||||
|
||||
@@ -34,9 +35,14 @@ else:
|
||||
|
||||
# some error messages changed in Python 3.3:
|
||||
csv_eod_error_str = 'unexpected end of data'
|
||||
-if sys.version_info < (3,2,4) and not (# backport to 2.7.4
|
||||
- sys.version_info[:2] == (2,7) and sys.version_info[2] > 3):
|
||||
+if sys.version_info < (3,2,4) and (
|
||||
+ # CPython has backported to 2.7.4, PyPy has not
|
||||
+ platform.python_implementation() == 'PyPy' or not (
|
||||
+ sys.version_info[:2] == (2,7) and sys.version_info[2] > 3)):
|
||||
csv_eod_error_str = 'newline inside string'
|
||||
+# pypy adds a line number
|
||||
+if platform.python_implementation() == 'PyPy':
|
||||
+ csv_eod_error_str = 'line 1: ' + csv_eod_error_str
|
||||
csv_unknown_url = "'bogus.csv'"
|
||||
if sys.version_info < (3,3,2):
|
||||
csv_unknown_url = "bogus.csv"
|
||||
@@ -782,7 +788,7 @@ u"""\
|
||||
:widths: 0 0 0
|
||||
\n\
|
||||
some, csv, data
|
||||
-""" % DocutilsTestSupport.exception_data(int, "y")[1][0]],
|
||||
+""" % DocutilsTestSupport.exception_data(int, u"y")[1][0]],
|
||||
["""\
|
||||
.. csv-table:: good delimiter
|
||||
:delim: /
|
||||
Reference in New Issue
Block a user