Resolves: #1655337 - fix deprecation warning
This commit is contained in:
parent
1369e718ca
commit
e2d7d72fa8
172
asciidoc-python3-deprecation-warning.patch
Normal file
172
asciidoc-python3-deprecation-warning.patch
Normal file
@ -0,0 +1,172 @@
|
||||
diff -urNp a/asciidoc.conf b/asciidoc.conf
|
||||
--- a/asciidoc.conf 2018-12-03 13:06:23.377407390 +0100
|
||||
+++ b/asciidoc.conf 2018-12-03 13:07:08.142320548 +0100
|
||||
@@ -29,7 +29,7 @@ empty=
|
||||
sp=" "
|
||||
# Attribute and AttributeList element patterns.
|
||||
attributeentry-pattern=^:(?P<attrname>\w[^.]*?)(\.(?P<attrname2>.*?))?:(\s+(?P<attrvalue>.*))?$
|
||||
-attributelist-pattern=(?u)(^\[\[(?P<id>[\w_:][\w_:.-]*)(,(?P<reftext>.*?))?\]\]$)|(^\[(?P<attrlist>.*)\]$)
|
||||
+attributelist-pattern=(^\[\[(?P<id>[\w_:][\w_:.-]*)(,(?P<reftext>.*?))?\]\]$)|(^\[(?P<attrlist>.*)\]$)
|
||||
# Substitution attributes for escaping AsciiDoc processing.
|
||||
amp=&
|
||||
lt=<
|
||||
@@ -288,10 +288,10 @@ endif::no-inline-literal[]
|
||||
# Block macros
|
||||
#-------------
|
||||
# Macros using default syntax.
|
||||
-(?u)^(?P<name>image|unfloat|toc)::(?P<target>\S*?)(\[(?P<attrlist>.*?)\])$=#
|
||||
+^(?P<name>image|unfloat|toc)::(?P<target>\S*?)(\[(?P<attrlist>.*?)\])$=#
|
||||
|
||||
# Passthrough macros.
|
||||
-(?u)^(?P<name>pass)::(?P<subslist>\S*?)(\[(?P<passtext>.*?)\])$=#
|
||||
+^(?P<name>pass)::(?P<subslist>\S*?)(\[(?P<passtext>.*?)\])$=#
|
||||
|
||||
^'{3,}$=#ruler
|
||||
^<{3,}$=#pagebreak
|
||||
diff -urNp a/asciidoc.py b/asciidoc.py
|
||||
--- a/asciidoc.py 2018-12-03 13:06:23.378407388 +0100
|
||||
+++ b/asciidoc.py 2018-12-03 13:17:41.965990011 +0100
|
||||
@@ -30,7 +30,7 @@ SUBS_NORMAL = ('specialcharacters','quot
|
||||
'specialwords','replacements','macros','replacements2')
|
||||
SUBS_VERBATIM = ('specialcharacters','callouts')
|
||||
|
||||
-NAME_RE = r'(?u)[^\W\d][-\w]*' # Valid section or attribute name.
|
||||
+NAME_RE = r'[^\W\d][-\w]*' # Valid section or attribute name.
|
||||
OR, AND = ',', '+' # Attribute list separators.
|
||||
|
||||
|
||||
@@ -463,7 +463,7 @@ def parse_options(options,allowed,errmsg
|
||||
|
||||
def symbolize(s):
|
||||
"""Drop non-symbol characters and convert to lowercase."""
|
||||
- return re.sub(r'(?u)[^\w\-_]', '', s).lower()
|
||||
+ return re.sub(r'[^\w\-_]', '', s).lower()
|
||||
|
||||
def is_name(s):
|
||||
"""Return True if s is valid attribute, macro or tag name
|
||||
@@ -1746,7 +1746,7 @@ class AttributeEntry:
|
||||
attr.name = attr.name[:-1]
|
||||
attr.value = None
|
||||
# Strip white space and illegal name chars.
|
||||
- attr.name = re.sub(r'(?u)[^\w\-_]', '', attr.name).lower()
|
||||
+ attr.name = re.sub(r'[^\w\-_]', '', attr.name).lower()
|
||||
# Don't override most command-line attributes.
|
||||
if attr.name in config.cmd_attrs \
|
||||
and attr.name not in ('trace','numbered'):
|
||||
@@ -1946,7 +1946,7 @@ class Title:
|
||||
if ul != s[:ul_len]: return False
|
||||
# Don't be fooled by back-to-back delimited blocks, require at
|
||||
# least one alphanumeric character in title.
|
||||
- if not re.search(r'(?u)\w',title): return False
|
||||
+ if not re.search(r'\w',title): return False
|
||||
mo = re.match(Title.pattern, title)
|
||||
if mo:
|
||||
Title.attributes = mo.groupdict()
|
||||
@@ -2104,7 +2104,7 @@ class Section:
|
||||
"""
|
||||
# Replace non-alpha numeric characters in title with underscores and
|
||||
# convert to lower case.
|
||||
- base_id = re.sub(r'(?u)\W+', '_', title).strip('_').lower()
|
||||
+ base_id = re.sub(r'\W+', '_', title).strip('_').lower()
|
||||
if 'ascii-ids' in document.attributes:
|
||||
# Replace non-ASCII characters with ASCII equivalents.
|
||||
import unicodedata
|
||||
@@ -3602,7 +3602,7 @@ class Tables(AbstractBlocks):
|
||||
|
||||
class Macros:
|
||||
# Default system macro syntax.
|
||||
- SYS_RE = r'(?u)^(?P<name>[\\]?\w(\w|-)*?)::(?P<target>\S*?)' + \
|
||||
+ SYS_RE = r'^(?P<name>[\\]?\w(\w|-)*?)::(?P<target>\S*?)' + \
|
||||
r'(\[(?P<attrlist>.*?)\])$'
|
||||
def __init__(self):
|
||||
self.macros = [] # List of Macros.
|
||||
@@ -4478,7 +4478,7 @@ class Config:
|
||||
rdr.open(fname)
|
||||
message.linenos = None
|
||||
self.fname = fname
|
||||
- reo = re.compile(r'(?u)^\[(?P<section>\+?[^\W\d][\w-]*)\]\s*$')
|
||||
+ reo = re.compile(r'^\[(?P<section>\+?[^\W\d][\w-]*)\]\s*$')
|
||||
sections = OrderedDict()
|
||||
section,contents = '',[]
|
||||
while not rdr.eof():
|
||||
diff -urNp a/doc/asciidoc.conf b/doc/asciidoc.conf
|
||||
--- a/doc/asciidoc.conf 2018-12-03 13:06:23.379407386 +0100
|
||||
+++ b/doc/asciidoc.conf 2018-12-03 13:07:32.374272984 +0100
|
||||
@@ -3,5 +3,5 @@
|
||||
#
|
||||
[specialwords]
|
||||
ifndef::doctype-manpage[]
|
||||
-monospacedwords=(?u)\\?\basciidoc\(1\) (?u)\\?\ba2x\(1\)
|
||||
+monospacedwords=\\?\basciidoc\(1\) \\?\ba2x\(1\)
|
||||
endif::doctype-manpage[]
|
||||
diff -urNp a/docbook45.conf b/docbook45.conf
|
||||
--- a/docbook45.conf 2018-12-03 13:06:23.383407378 +0100
|
||||
+++ b/docbook45.conf 2018-12-03 13:07:53.221231766 +0100
|
||||
@@ -47,7 +47,7 @@ latexmath-style=template="latexmathblock
|
||||
[macros]
|
||||
# math macros.
|
||||
(?su)[\\]?(?P<name>latexmath):(?P<subslist>\S*?)\[(?:\$\s*)?(?P<passtext>.*?)(?:\s*\$)?(?<!\\)\]=[]
|
||||
-(?u)^(?P<name>latexmath)::(?P<subslist>\S*?)(\[(?:\\\[\s*)?(?P<passtext>.*?)(?:\s*\\\])?\])$=#[]
|
||||
+^(?P<name>latexmath)::(?P<subslist>\S*?)(\[(?:\\\[\s*)?(?P<passtext>.*?)(?:\s*\\\])?\])$=#[]
|
||||
|
||||
[latexmath-inlinemacro]
|
||||
<inlineequation>
|
||||
diff -urNp a/examples/website/layout1.conf b/examples/website/layout1.conf
|
||||
--- a/examples/website/layout1.conf 2018-12-03 13:06:23.384407377 +0100
|
||||
+++ b/examples/website/layout1.conf 2018-12-03 13:08:17.989182454 +0100
|
||||
@@ -22,7 +22,7 @@
|
||||
# xhtml11 backend stylesheets.
|
||||
|
||||
[specialwords]
|
||||
-monospacedwords=(?u)\\?\basciidoc\(1\) (?u)\\?\ba2x\(1\)
|
||||
+monospacedwords=\\?\basciidoc\(1\) \\?\ba2x\(1\)
|
||||
|
||||
[header]
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||
diff -urNp a/examples/website/layout2.conf b/examples/website/layout2.conf
|
||||
--- a/examples/website/layout2.conf 2018-12-03 13:06:23.384407377 +0100
|
||||
+++ b/examples/website/layout2.conf 2018-12-03 13:08:35.614147145 +0100
|
||||
@@ -24,7 +24,7 @@
|
||||
# xhtml11 backend stylesheets.
|
||||
|
||||
[specialwords]
|
||||
-monospacedwords=(?u)\\?\basciidoc\(1\) (?u)\\?\ba2x\(1\)
|
||||
+monospacedwords=\\?\basciidoc\(1\) \\?\ba2x\(1\)
|
||||
|
||||
[header]
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||
diff -urNp a/html5.conf b/html5.conf
|
||||
--- a/html5.conf 2018-12-03 13:06:23.386407373 +0100
|
||||
+++ b/html5.conf 2018-12-03 13:08:59.231099559 +0100
|
||||
@@ -36,13 +36,13 @@ asciimath-style=template="asciimathblock
|
||||
latexmath-style=template="latexmathblock",subs=(),posattrs=(),filter="unwraplatex.py"
|
||||
|
||||
[macros]
|
||||
-(?u)^(?P<name>audio|video)::(?P<target>\S*?)(\[(?P<attrlist>.*?)\])$=#
|
||||
+^(?P<name>audio|video)::(?P<target>\S*?)(\[(?P<attrlist>.*?)\])$=#
|
||||
# math macros.
|
||||
# Special characters are escaped in HTML math markup.
|
||||
(?su)[\\]?(?P<name>asciimath):(?P<subslist>\S*?)\[(?P<passtext>.*?)(?<!\\)\]=[specialcharacters]
|
||||
-(?u)^(?P<name>asciimath)::(?P<subslist>\S*?)(\[(?P<passtext>.*?)\])$=#[specialcharacters]
|
||||
+^(?P<name>asciimath)::(?P<subslist>\S*?)(\[(?P<passtext>.*?)\])$=#[specialcharacters]
|
||||
(?su)[\\]?(?P<name>latexmath):(?P<subslist>\S*?)\[(?:\$\s*)?(?P<passtext>.*?)(?:\s*\$)?(?<!\\)\]=[specialcharacters]
|
||||
-(?u)^(?P<name>latexmath)::(?P<subslist>\S*?)(\[(?:\\\[\s*)?(?P<passtext>.*?)(?:\s*\\\])?\])$=#[specialcharacters]
|
||||
+^(?P<name>latexmath)::(?P<subslist>\S*?)(\[(?:\\\[\s*)?(?P<passtext>.*?)(?:\s*\\\])?\])$=#[specialcharacters]
|
||||
|
||||
[asciimath-inlinemacro]
|
||||
`{passtext}`
|
||||
diff -urNp a/xhtml11.conf b/xhtml11.conf
|
||||
--- a/xhtml11.conf 2018-12-03 13:06:23.395407355 +0100
|
||||
+++ b/xhtml11.conf 2018-12-03 13:09:18.358060798 +0100
|
||||
@@ -39,9 +39,9 @@ latexmath-style=template="latexmathblock
|
||||
# math macros.
|
||||
# Special characters are escaped in HTML math markup.
|
||||
(?su)[\\]?(?P<name>asciimath):(?P<subslist>\S*?)\[(?P<passtext>.*?)(?<!\\)\]=[specialcharacters]
|
||||
-(?u)^(?P<name>asciimath)::(?P<subslist>\S*?)(\[(?P<passtext>.*?)\])$=#[specialcharacters]
|
||||
+^(?P<name>asciimath)::(?P<subslist>\S*?)(\[(?P<passtext>.*?)\])$=#[specialcharacters]
|
||||
(?su)[\\]?(?P<name>latexmath):(?P<subslist>\S*?)\[(?:\$\s*)?(?P<passtext>.*?)(?:\s*\$)?(?<!\\)\]=[specialcharacters]
|
||||
-(?u)^(?P<name>latexmath)::(?P<subslist>\S*?)(\[(?:\\\[\s*)?(?P<passtext>.*?)(?:\s*\\\])?\])$=#[specialcharacters]
|
||||
+^(?P<name>latexmath)::(?P<subslist>\S*?)(\[(?:\\\[\s*)?(?P<passtext>.*?)(?:\s*\\\])?\])$=#[specialcharacters]
|
||||
|
||||
[asciimath-inlinemacro]
|
||||
`{passtext}`
|
@ -5,7 +5,7 @@
|
||||
Summary: Text based document generation
|
||||
Name: asciidoc
|
||||
Version: 8.6.10
|
||||
Release: 0.7.20180605git%{shortcommit}%{?dist}
|
||||
Release: 0.8.20180605git%{shortcommit}%{?dist}
|
||||
# The python code does not specify a version.
|
||||
# The javascript example code is GPLv2+.
|
||||
License: GPL+ and GPLv2+
|
||||
@ -23,6 +23,10 @@ Patch1: asciidoc-python3.patch
|
||||
# 8369a97 re-add --nonet option
|
||||
Patch2: asciidoc-python3-a2x-decode-fix.patch
|
||||
|
||||
# https://github.com/asciidoc/asciidoc-py3/issues/13
|
||||
# https://github.com/asciidoc/asciidoc-py3/pull/14
|
||||
Patch3: asciidoc-python3-deprecation-warning.patch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: dblatex
|
||||
BuildRequires: docbook-style-xsl
|
||||
@ -182,6 +186,9 @@ cd tests
|
||||
%{_sysconfdir}/asciidoc/filters/music/*.py
|
||||
|
||||
%changelog
|
||||
* Mon Dec 03 2018 Josef Ridky <jridky@redhat.com> - 8.6.10-0.8.20180605git986f99d
|
||||
- Fix deprecation warning (#165537)
|
||||
|
||||
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8.6.10-0.7.20180605git986f99d
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user