Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package asciidoc for openSUSE:Factory checked in at 2022-06-25 10:23:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/asciidoc (Old) and /work/SRC/openSUSE:Factory/.asciidoc.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "asciidoc" Sat Jun 25 10:23:47 2022 rev:52 rq:984828 version:10.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/asciidoc/asciidoc.changes 2022-06-24 08:45:34.187156600 +0200 +++ /work/SRC/openSUSE:Factory/.asciidoc.new.1548/asciidoc.changes 2022-06-25 10:23:50.838638211 +0200 @@ -1,0 +2,17 @@ +Thu Jun 23 11:33:12 UTC 2022 - Dominique Leuenberger <[email protected]> + +- Update to version 10.2.0: + + Future feature: + - As part of the intended 10.3.0 release, the following + document attribute flags will be reserved for modifying + asciidoc-py runtime behavior: + . future-compat + . legacy-compat + . compat-mode + - Please see GH issue #254 for more information. + + Bug fixes: Fix verbose output not working when using a2x or + asciidoc entry points. + + Miscellaneous: Automate publishing asciidoc-py website as part + of release process. + +------------------------------------------------------------------- Old: ---- asciidoc-10.1.4.tar.gz New: ---- asciidoc-10.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ asciidoc.spec ++++++ --- /var/tmp/diff_new_pack.pfqV7C/_old 2022-06-25 10:23:51.298638868 +0200 +++ /var/tmp/diff_new_pack.pfqV7C/_new 2022-06-25 10:23:51.302638874 +0200 @@ -22,7 +22,7 @@ %endif Name: asciidoc%{?name_suffix} -Version: 10.1.4 +Version: 10.2.0 Release: 0 Summary: Text-Based Document Generation License: GPL-2.0-or-later ++++++ asciidoc-10.1.4.tar.gz -> asciidoc-10.2.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/CHANGELOG.adoc new/asciidoc-10.2.0/CHANGELOG.adoc --- old/asciidoc-10.1.4/CHANGELOG.adoc 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/CHANGELOG.adoc 2022-05-22 19:05:42.000000000 +0200 @@ -3,6 +3,23 @@ :website: https://asciidoc-py.github.io/ +Version 10.2.0 (2022-05-22) +--------------------------- +.Future feature +As part of the intended 10.3.0 release, the following document attribute flags will be reserved for modifying asciidoc-py runtime behavior: + +- `future-compat` +- `legacy-compat` +- `compat-mode` + +Please see https://github.com/asciidoc-py/asciidoc-py/issues/254[GH issue #254] for more information. + +.Bug fixes +- Fix verbose output not working when using a2x or asciidoc entry points + +.Miscellaneous +- Automate publishing asciidoc-py website as part of release process + Version 10.1.4 (2022-03-01) --------------------------- .Bug fixes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/MANIFEST new/asciidoc-10.2.0/MANIFEST --- old/asciidoc-10.1.4/MANIFEST 2022-03-01 16:50:54.000000000 +0100 +++ new/asciidoc-10.2.0/MANIFEST 2022-05-22 19:07:27.000000000 +0200 @@ -478,6 +478,7 @@ tests/inputs/utf8-bom-test.txt tests/inputs/utf8-examples.txt tests/__init__.py +tests/conftest.py tests/test_a2x.py tests/test_asciidoc.py tests/test_attrs.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/README.md new/asciidoc-10.2.0/README.md --- old/asciidoc-10.1.4/README.md 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/README.md 2022-05-22 19:05:42.000000000 +0200 @@ -60,11 +60,3 @@ 1. doctests: `python3 -m asciidoc.asciidoc --doctest` 1. unit tests: `python3 -m pytest` 1. integration tests: `python3 tests/testasciidoc.py` - -## LICENSE - -Copyright (C) 2002-2013 Stuart Rackham. -Copyright (C) 2013-2021 AsciiDoc.py Contributors. - -Free use of this software is granted under the terms of the GNU General -Public License version 2 (GPLv2). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/asciidoc/__init__.py new/asciidoc-10.2.0/asciidoc/__init__.py --- old/asciidoc-10.1.4/asciidoc/__init__.py 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/asciidoc/__init__.py 2022-05-22 19:05:42.000000000 +0200 @@ -3,7 +3,37 @@ import sys from .__metadata__ import VERSION, __version__ -__all__ = ['VERSION', '__version__'] +__all__ = [ + 'VERSION', + '__version__', + 'set_legacy_compat', + 'set_future_compat', + 'set_compat_mode', + 'get_compat_mode', +] + +COMPAT_MODE = 1 + + +def set_legacy_compat() -> None: + set_compat_mode(1) + + +def set_future_compat() -> None: + set_compat_mode(2) + + +def set_compat_mode(mode: int) -> None: + if mode < 1 or mode > 2: + raise ValueError('compat mode must be 1 <= mode <= 2') + + global COMPAT_MODE + COMPAT_MODE = mode + + +def get_compat_mode() -> int: + return COMPAT_MODE + # If running as a script, we avoid these imports to avoid a circular # RuntimeWarning, which is fine as we don't use them in that case. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/asciidoc/__metadata__.py new/asciidoc-10.2.0/asciidoc/__metadata__.py --- old/asciidoc-10.1.4/asciidoc/__metadata__.py 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/asciidoc/__metadata__.py 2022-05-22 19:05:42.000000000 +0200 @@ -1,5 +1,5 @@ """Module containing metadata about asciidoc.""" -VERSION = (10, 1, 4) +VERSION = (10, 2, 0) __version__ = '.'.join(map(str, VERSION)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/asciidoc/a2x.py new/asciidoc-10.2.0/asciidoc/a2x.py --- old/asciidoc-10.1.4/asciidoc/a2x.py 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/asciidoc/a2x.py 2022-05-22 19:05:42.000000000 +0200 @@ -4,6 +4,27 @@ a2x - A toolchain manager for AsciiDoc (converts Asciidoc text files to other file formats) +Please note, the a2x was originally licensed under the MIT license. Any changes +on or after 12/31/2021 are licensed under the GPLv2+. See below for licenses, and +due to sub-licensing, this file MUST carry both licenses unless all MIT code has +been rewritten. + +----- + +Copyright (C) 2021-2022 AsciiDoc Contributors. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +---- + Free use of this software is granted under the terms of the MIT license. Copyright (C) 2002-2013 Stuart Rackham. @@ -983,6 +1004,7 @@ def cli(): global OPTIONS + asciidoc.set_caller("__main__") argv, opts, args = parse_args(sys.argv) opts = eval(str(opts)) # Convert optparse.Values to dict. a2x = A2X(opts) @@ -1000,5 +1022,4 @@ ##################################################################### if __name__ == "__main__": - asciidoc.set_caller(__name__) cli() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/asciidoc/asciidoc.py new/asciidoc-10.2.0/asciidoc/asciidoc.py --- old/asciidoc-10.1.4/asciidoc/asciidoc.py 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/asciidoc/asciidoc.py 2022-05-22 19:05:42.000000000 +0200 @@ -6,8 +6,13 @@ Copyright (C) 2002-2013 Stuart Rackham. Copyright (C) 2013-2022 AsciiDoc Contributors. -Free use of this software is granted under the terms of the GNU General -Public License version 2 (GPLv2). +Free use of this software is granted under the terms of the GNU General Public +License as published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. """ # Please note, the contents of this module are considered "private" with the @@ -32,13 +37,14 @@ from collections import OrderedDict +# from . import set_future_compat, set_legacy_compat +from . import utils from .attrs import parse_attributes from .blocks.table import parse_table_span_spec, Cell, Column from .collections import AttrDict, InsensitiveDict from .exceptions import EAsciiDoc from .message import Message from .plugin import Plugin -from . import utils CONF_DIR = os.path.join(os.path.dirname(__file__), 'resources') METADATA = {} @@ -5649,6 +5655,12 @@ # Set the default embedded icons directory. if 'data-uri' in document.attributes and not os.path.isdir(document.attributes['iconsdir']): document.attributes['iconsdir'] = os.path.join(document.attributes['asciidoc-confdir'], 'icons') + # Set compat mode + # TODO: Enable this in 10.3 (see https://github.com/asciidoc-py/asciidoc-py/issues/254) + # if 'future-compat' in document.attributes: + # set_future_compat() + # if 'legacy-compat' in document.attributes or 'compat-mode' in document.attributes: + # set_legacy_compat() # Configuration is fully loaded. config.expand_all_templates() # Check configuration for consistency. @@ -5859,6 +5871,7 @@ def cli(argv=None): + set_caller("__main__") if argv is None: argv = sys.argv # Process command line options. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/asciidoc/attrs.py new/asciidoc-10.2.0/asciidoc/attrs.py --- old/asciidoc-10.1.4/asciidoc/attrs.py 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/asciidoc/attrs.py 2022-05-22 19:05:42.000000000 +0200 @@ -1,6 +1,7 @@ import re import typing +from . import get_compat_mode from .utils import get_args, get_kwargs @@ -15,16 +16,85 @@ output_dict: {} attrs: 'hello,world' - output_dict: {'2': 'world', '0': 'hello,world', '1': 'hello'} + output_dict: {'0': 'hello,world', '1': 'hello', '2': 'world',} attrs: '"hello", planet="earth"' - output_dict: {'planet': 'earth', '0': '"hello", planet="earth"', '1': 'hello'} + output_dict: {'0': '"hello", planet="earth"', '1': 'hello' 'planet': 'earth', } """ if not attrs: return output_dict['0'] = attrs # Replace line separators with spaces so line spanning works. s = re.sub(r'\s', ' ', attrs) + d = legacy_parse(s) if get_compat_mode() == 1 else future_parse(s) + output_dict.update(d) + assert len(d) > 0 + + +def future_parse(s: str) -> dict: + d = {} + key = '' + value = '' + count = 1 + quote = None + in_quotes = False + had_quotes = False + + def add_value(): + nonlocal count, d, key, value + key = key.strip() + value = value.strip() + if had_quotes: + value = value[1:-1] + + if not value and not had_quotes: + value = None + + if key: + d[key] = value if value else '' + key = '' + else: + d["{}".format(count)] = value + count += 1 + value = '' + + for i in range(len(s)): + char = s[i] + + if char == ',' and not in_quotes: + add_value() + had_quotes = False + elif value and char == '=' and not in_quotes: + key = value + value = '' + elif not in_quotes and (char == '"' or char == "'") \ + and (i == 0 or s[i - 1] != '\\'): + in_quotes = True + quote = char + value += char + elif in_quotes and char == quote and (i == 0 or s[i - 1] != '\\'): + in_quotes = False + had_quotes = True + quote = None + value += char + elif char == '\\' and i < len(s) - 1 and (s[i + 1] == '"' or s[i + 1] == "'"): + pass + else: + value += char + + if key and key[0] == '=' and not value: + value = key + "=" + key = "" + + if not value and s.rstrip()[-1] == ',': + value = ' ' + + if had_quotes or value or key: + add_value() + return d + + +def legacy_parse(s: str) -> dict: d = {} try: d.update(get_args(s)) @@ -47,5 +117,4 @@ for k in list(d.keys()): # Drop any empty positional arguments. if d[k] == '': del d[k] - output_dict.update(d) - assert len(d) > 0 + return d diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/asciidoc/resources/filters/code/code-filter.py new/asciidoc-10.2.0/asciidoc/resources/filters/code/code-filter.py --- old/asciidoc-10.1.4/asciidoc/resources/filters/code/code-filter.py 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/asciidoc/resources/filters/code/code-filter.py 2022-05-22 19:05:42.000000000 +0200 @@ -50,7 +50,13 @@ Copyright (C) 2013-2022 AsciiDoc Contributors. Free use of this software is granted under the terms of the GNU General - Public License version 2 (GPLv2). + Public License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. ''' import os diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/asciidoc/resources/filters/graphviz/graphviz2png.py new/asciidoc-10.2.0/asciidoc/resources/filters/graphviz/graphviz2png.py --- old/asciidoc-10.1.4/asciidoc/resources/filters/graphviz/graphviz2png.py 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/asciidoc/resources/filters/graphviz/graphviz2png.py 2022-05-22 19:05:42.000000000 +0200 @@ -48,8 +48,16 @@ LICENSE Copyright (C) 2008-2009 Gouichi Iisaka. - Free use of this software is granted under the terms of - the GNU General Public License (GPL). + Copyright (C) 2013-2022 AsciiDoc Contributors. + + Free use of this software is granted under the terms of the GNU General + Public License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. ''' import os diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/asciidoc/resources/filters/latex/latex2img.py new/asciidoc-10.2.0/asciidoc/resources/filters/latex/latex2img.py --- old/asciidoc-10.1.4/asciidoc/resources/filters/latex/latex2img.py 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/asciidoc/resources/filters/latex/latex2img.py 2022-05-22 19:05:42.000000000 +0200 @@ -58,7 +58,13 @@ Copyright (C) 2013-2022 AsciiDoc Contributors. Free use of this software is granted under the terms of the GNU General - Public License version 2 (GPLv2). + Public License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. ''' import os diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/asciidoc/resources/filters/music/music2png.py new/asciidoc-10.2.0/asciidoc/resources/filters/music/music2png.py --- old/asciidoc-10.1.4/asciidoc/resources/filters/music/music2png.py 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/asciidoc/resources/filters/music/music2png.py 2022-05-22 19:05:42.000000000 +0200 @@ -50,7 +50,13 @@ Copyright (C) 2013-2022 AsciiDoc Contributors. Free use of this software is granted under the terms of the GNU General - Public License version 2 (GPLv2). + Public License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. ''' import os diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/asciidoc/resources/help.conf new/asciidoc-10.2.0/asciidoc/resources/help.conf --- old/asciidoc-10.1.4/asciidoc/resources/help.conf 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/asciidoc/resources/help.conf 2022-05-22 19:05:42.000000000 +0200 @@ -197,7 +197,13 @@ Copyright (C) 2013-2022 AsciiDoc Contributors. Free use of this software is granted under the terms of the GNU General - Public License version 2 (GPLv2). + Public License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. [syntax] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/asciidoc/resources/lang-cs.conf new/asciidoc-10.2.0/asciidoc/resources/lang-cs.conf --- old/asciidoc-10.1.4/asciidoc/resources/lang-cs.conf 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/asciidoc/resources/lang-cs.conf 2022-05-22 19:05:42.000000000 +0200 @@ -1,7 +1,6 @@ # # AsciiDoc Czech language configuration file. -# (C) 2012 Petr Kl??ma <[email protected]> -# License: GNU Free Documentation License, ver. 1.3 or later version, see http://fsf.org/ +# Originally written by Petr Kl??ma <[email protected]> [attributes] # Left and right single and double quote characters. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/asciidoc/resources/lang-pl.conf new/asciidoc-10.2.0/asciidoc/resources/lang-pl.conf --- old/asciidoc-10.1.4/asciidoc/resources/lang-pl.conf 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/asciidoc/resources/lang-pl.conf 2022-05-22 19:05:42.000000000 +0200 @@ -1,3 +1,6 @@ +# Note: This builtin file will be removed in asciidoc-py 11.0.0 due to licensing incompatibility. +# Currently, you can install this separately from https://github.com/asciidoc-py/extra-resources +# as a new delivery mechanism is worked out. # # AsciiDoc Polish language configuration file. # (C) 2015 Kerusey Karyu <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/configure.ac new/asciidoc-10.2.0/configure.ac --- old/asciidoc-10.1.4/configure.ac 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/configure.ac 2022-05-22 19:05:42.000000000 +0200 @@ -1,6 +1,6 @@ -AC_INIT(asciidoc, 10.1.4) +AC_INIT(asciidoc, 10.2.0) -AC_SUBST([PACKAGE_DATE], ['01 March 2022']) +AC_SUBST([PACKAGE_DATE], ['22 May 2022']) AC_CONFIG_FILES(Makefile) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/doc/a2x.1 new/asciidoc-10.2.0/doc/a2x.1 --- old/asciidoc-10.1.4/doc/a2x.1 2022-03-01 16:50:53.000000000 +0100 +++ new/asciidoc-10.2.0/doc/a2x.1 2022-05-22 19:07:27.000000000 +0200 @@ -2,12 +2,12 @@ .\" Title: a2x .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> -.\" Date: 03/01/2022 +.\" Date: 05/22/2022 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "A2X" "1" "03/01/2022" "\ \&" "\ \&" +.TH "A2X" "1" "05/22/2022" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -751,4 +751,6 @@ .sp Copyright (C) 2013\-2022 AsciiDoc Contributors\&. .sp -Free use of this software is granted under the terms of the MIT license\&. +Free use of this software is granted under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version\&. +.sp +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/doc/a2x.1.txt new/asciidoc-10.2.0/doc/a2x.1.txt --- old/asciidoc-10.1.4/doc/a2x.1.txt 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/doc/a2x.1.txt 2022-05-22 19:05:42.000000000 +0200 @@ -377,5 +377,12 @@ Copyright \(C) 2013-2022 AsciiDoc Contributors. -Free use of this software is granted under the terms of the MIT license. +Free use of this software is granted under the terms of the GNU General +Public License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/doc/asciidoc.1 new/asciidoc-10.2.0/doc/asciidoc.1 --- old/asciidoc-10.1.4/doc/asciidoc.1 2022-03-01 16:50:52.000000000 +0100 +++ new/asciidoc-10.2.0/doc/asciidoc.1 2022-05-22 19:07:26.000000000 +0200 @@ -2,12 +2,12 @@ .\" Title: asciidoc .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> -.\" Date: 03/01/2022 +.\" Date: 05/22/2022 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "ASCIIDOC" "1" "03/01/2022" "\ \&" "\ \&" +.TH "ASCIIDOC" "1" "05/22/2022" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -356,4 +356,6 @@ .sp Copyright (C) 2013\-2022 AsciiDoc Contributors\&. .sp -Free use of this software is granted under the terms of the GNU General Public License version 2 (GPLv2)\&. +Free use of this software is granted under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version\&. +.sp +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/doc/asciidoc.1.txt new/asciidoc-10.2.0/doc/asciidoc.1.txt --- old/asciidoc-10.1.4/doc/asciidoc.1.txt 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/doc/asciidoc.1.txt 2022-05-22 19:05:42.000000000 +0200 @@ -233,5 +233,11 @@ Copyright \(C) 2013-2022 AsciiDoc Contributors. Free use of this software is granted under the terms of the GNU General -Public License version 2 (GPLv2). +Public License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/doc/asciidoc.txt new/asciidoc-10.2.0/doc/asciidoc.txt --- old/asciidoc-10.1.4/doc/asciidoc.txt 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/doc/asciidoc.txt 2022-05-22 19:05:42.000000000 +0200 @@ -6082,14 +6082,14 @@ [appendix] License ------- -AsciiDoc is free software; you can redistribute it and/or modify it -under the terms of the 'GNU General Public License version 2' (GPLv2) -as published by the Free Software Foundation. +Free use of this software is granted under the terms of the GNU General +Public License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. -AsciiDoc is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License version 2 for more details. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. Copyright (C) 2002-2013 Stuart Rackham. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/doc/testasciidoc.1 new/asciidoc-10.2.0/doc/testasciidoc.1 --- old/asciidoc-10.1.4/doc/testasciidoc.1 2022-03-01 16:50:53.000000000 +0100 +++ new/asciidoc-10.2.0/doc/testasciidoc.1 2022-05-22 19:07:27.000000000 +0200 @@ -2,12 +2,12 @@ .\" Title: testasciidoc .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> -.\" Date: 03/01/2022 +.\" Date: 05/22/2022 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "TESTASCIIDOC" "1" "03/01/2022" "\ \&" "\ \&" +.TH "TESTASCIIDOC" "1" "05/22/2022" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/setup.py new/asciidoc-10.2.0/setup.py --- old/asciidoc-10.1.4/setup.py 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/setup.py 2022-05-22 19:05:42.000000000 +0200 @@ -82,12 +82,11 @@ ], }, include_package_data=True, - license='GPLv2', + license='GPLv2+', classifiers=[ # Trove classifiers # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers - 'License :: OSI Approved :: GNU General Public License v2 (GPLv2)', - 'License :: OSI Approved :: MIT License', + 'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/tests/conftest.py new/asciidoc-10.2.0/tests/conftest.py --- old/asciidoc-10.1.4/tests/conftest.py 1970-01-01 01:00:00.000000000 +0100 +++ new/asciidoc-10.2.0/tests/conftest.py 2022-05-22 19:05:42.000000000 +0200 @@ -0,0 +1,9 @@ +from asciidoc import set_future_compat, set_legacy_compat +import pytest + + [email protected] +def enable_future_compat() -> None: + set_future_compat() + yield + set_legacy_compat() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoc-10.1.4/tests/test_attrs.py new/asciidoc-10.2.0/tests/test_attrs.py --- old/asciidoc-10.1.4/tests/test_attrs.py 2022-03-01 16:49:15.000000000 +0100 +++ new/asciidoc-10.2.0/tests/test_attrs.py 2022-05-22 19:05:42.000000000 +0200 @@ -2,9 +2,31 @@ import pytest [email protected]( - "input,expected", - ( +testcases = { + # these test cases fail under future mode + "pure_legacy": ( + # In future mode, all values are always strings + ( + 'height=100,caption="",link="images/octocat.png"', + { + '0': 'height=100,caption="",link="images/octocat.png"', + 'height': 100, + 'caption': '', + 'link': 'images/octocat.png', + }, + ), + ( + "height=100,caption='',link='images/octocat.png'", + { + '0': "height=100,caption='',link='images/octocat.png'", + 'height': 100, + 'caption': '', + 'link': 'images/octocat.png', + }, + ), + ), + # these test cases pass under both legacy and future modes + "legacy": ( # docstring tests ('', {}), ('hello,world', {'0': 'hello,world', '1': 'hello', '2': 'world'}), @@ -14,19 +36,13 @@ ), # tests taken from # https://github.com/asciidoctor/asciidoctor/blob/main/test/attribute_list_test.rb - # commented out tests are currently supported by asciidoc.py ('quote', {'0': 'quote', '1': 'quote'}), ('"quote"', {'0': '"quote"', '1': 'quote'}), ('""', {'0': '""', '1': ''}), - # ('"ba\"zaar"', {'0': '"ba\"zaar"', '1': 'ba"zaar'}), ("'quote'", {'0': "'quote'", '1': 'quote'}), ("''", {'0': "''", '1': ''}), ('\'', {'0': '\'', '1': '\''}), - # ('name=\'', {'0': 'name=\'', 'name': '\''}), - # ('name=\'{val}', {'0': 'name=\'{val}', 'name': '\'{val}'}), ('\'ba\\\'zaar\'', {'0': '\'ba\\\'zaar\'', '1': 'ba\'zaar'}), - # ('quote , ', {'0': 'quote , ', '1': 'quote', '2': None}), - # (', John Smith', {'0': ', John Smith', '1': None, '2': 'John Smith'}), ( 'first, second one, third', { @@ -35,85 +51,113 @@ '2': 'second one', '3': 'third', }, ), - # ( - # 'first,,third,', - # {'0': 'first,,third,', '1': 'first', '2': None, '3': 'third', '4': None} - # ), ('=foo=', {'0': '=foo=', '1': '=foo='}), - # ('foo=bar', {'0': 'foo=bar', 'foo': 'bar'}), ('foo="bar"', {'0': 'foo="bar"', 'foo': 'bar'}), + + ('foo=\'bar\'', {'0': 'foo=\'bar\'', 'foo': 'bar'}), + + ), + # these tests only pass under future mode + # tests taken from + # https://github.com/asciidoctor/asciidoctor/blob/main/test/attribute_list_test.rb + "future": ( + ('"ba\"zaar"', {'0': '"ba\"zaar"', '1': 'ba"zaar'}), + ('name=\'', {'0': 'name=\'', 'name': '\''}), + ('name=\'{val}', {'0': 'name=\'{val}', 'name': '\'{val}'}), + ('quote , ', {'0': 'quote , ', '1': 'quote', '2': None}), + (', John Smith', {'0': ', John Smith', '1': None, '2': 'John Smith'}), + ( + 'first,,third,', + {'0': 'first,,third,', '1': 'first', '2': None, '3': 'third', '4': None} + ), + ('foo=bar', {'0': 'foo=bar', 'foo': 'bar'}), + ('foo=', {'0': 'foo=', 'foo': ''}), + ('foo=,bar=baz', {'0': 'foo=,bar=baz', 'foo': '', 'bar': 'baz'}), ( 'height=100,caption="",link="images/octocat.png"', { '0': 'height=100,caption="",link="images/octocat.png"', - 'height': 100, + 'height': '100', 'caption': '', 'link': 'images/octocat.png', }, ), - ('foo=\'bar\'', {'0': 'foo=\'bar\'', 'foo': 'bar'}), ( "height=100,caption='',link='images/octocat.png'", { '0': "height=100,caption='',link='images/octocat.png'", - 'height': 100, + 'height': '100', 'caption': '', 'link': 'images/octocat.png', }, ), - # ('foo=', {'0': 'foo=', 'foo': ''}), - # ('foo=,bar=baz', {'0': 'foo=,bar=baz', 'foo': '', 'bar': 'baz'}), - # ( - # 'first=value, second=two, third=3', - # { - # '0': 'first=value, second=two, third=3', - # 'first': 'value', - # 'second': 'two', - # 'third': '3', - # }, - # ), - # ( - # 'first=\'value\', second="value two", third=three', - # { - # '0': 'first=\'value\', second="value two", third=three', - # 'first': 'value', - # 'second': 'value two', - # 'third': 'three', - # }, - # ), - # ( - # " first = 'value', second =\"value two\" , third= three ", # noqa: E501 - # { - # '0': " first = 'value', second =\"value two\" , third= three ", # noqa: E501 - # 'first': 'value', - # 'second': 'value two', - # 'third': 'three', - # }, - # ), - # ( - # 'first, second="value two", third=three, Sherlock Holmes', - # { - # '0': 'first, second="value two", third=three, Sherlock Holmes', - # '1': 'first', - # 'second': 'value two', - # 'third': 'three', - # '4': 'Sherlock Holmes', - # }, - # ), - # ( - # 'first,,third=,,fifth=five', - # { - # '0': 'first,,third=,,fifth=five', - # '1': 'first', - # '2': None, - # 'third': '', - # '4': None, - # 'fifth': 'five', - # }, - # ), + ( + 'first=value, second=two, third=3', + { + '0': 'first=value, second=two, third=3', + 'first': 'value', + 'second': 'two', + 'third': '3', + }, + ), + ( + 'first=\'value\', second="value two", third=three', + { + '0': 'first=\'value\', second="value two", third=three', + 'first': 'value', + 'second': 'value two', + 'third': 'three', + }, + ), + ( + " first = 'value', second =\"value two\" , third= three ", # noqa: E501 + { + '0': " first = 'value', second =\"value two\" , third= three ", # noqa: E501 + 'first': 'value', + 'second': 'value two', + 'third': 'three', + }, + ), + ( + 'first, second="value two", third=three, Sherlock Holmes', + { + '0': 'first, second="value two", third=three, Sherlock Holmes', + '1': 'first', + 'second': 'value two', + 'third': 'three', + '4': 'Sherlock Holmes', + }, + ), + ( + 'first,,third=,,fifth=five', + { + '0': 'first,,third=,,fifth=five', + '1': 'first', + '2': None, + 'third': '', + '4': None, + 'fifth': 'five', + }, + ), ) +} + + [email protected]( + "input,expected", + testcases["legacy"] + testcases["pure_legacy"], ) def test_parse_attributes(input, expected): output = dict() attrs.parse_attributes(input, output) assert output == expected + + [email protected]( + "input,expected", + testcases['legacy'] + testcases["future"], +) +def test_parse_future_attributes(enable_future_compat, input, expected): + output = dict() + attrs.parse_attributes(input, output) + assert output == expected
