diff --git a/Genshi-0.7.5.tar.gz b/Genshi-0.7.5.tar.gz deleted file mode 100644 index 6dc8706..0000000 --- a/Genshi-0.7.5.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c12d6c2abf7df0ec661d9ff2e197522eae846e43dc58abd5a36443d05bc41135 -size 266071 diff --git a/Genshi-0.7.7.tar.gz b/Genshi-0.7.7.tar.gz new file mode 100644 index 0000000..ca03f31 --- /dev/null +++ b/Genshi-0.7.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c100520862cd69085d10ee1a87e91289e7f59f6b3d9bd622bf58b2804e6b9aab +size 267206 diff --git a/Genshi-pr39-fix-setuptools-extension.patch b/Genshi-pr39-fix-setuptools-extension.patch deleted file mode 100644 index 15f9993..0000000 --- a/Genshi-pr39-fix-setuptools-extension.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 166f61ad73e486da34ae554107c7cb6e224bf5f8 Mon Sep 17 00:00:00 2001 -From: Eli Schwartz -Date: Wed, 3 Mar 2021 00:18:29 -0500 -Subject: [PATCH] setup: do not use deprecated and removed 'Feature' feature - -Emulate it using environment variables instead. $GENSHI_BUILD_SPEEDUP is -checked for existence and parsed as an integer boolean, with invalid -values defaulting (loudly) to 0. - -Fixes #36 ---- - setup.py | 35 +++++++++++++++++------------------ - 1 file changed, 17 insertions(+), 18 deletions(-) - -Index: Genshi-0.7.5/setup.py -=================================================================== ---- Genshi-0.7.5.orig/setup.py -+++ Genshi-0.7.5/setup.py -@@ -19,11 +19,10 @@ import doctest - from glob import glob - import os - try: -- from setuptools import setup, Extension, Feature -+ from setuptools import setup, Extension - from setuptools.command.bdist_egg import bdist_egg - except ImportError: - from distutils.core import setup, Extension -- Feature = None - bdist_egg = None - import sys - -@@ -64,20 +63,20 @@ available.""") - print(exc) - - --if Feature: -- # Optional C extension module for speeding up Genshi: -- # Not activated by default on: -- # - PyPy (where it harms performance) -- # - CPython >= 3.3 (the new Unicode C API is not supported yet) -- speedups = Feature( -- "optional C speed-enhancements", -- standard = not is_pypy, -- ext_modules = [ -- Extension('genshi._speedups', ['genshi/_speedups.c']), -- ], -- ) --else: -- speedups = None -+# Optional C extension module for speeding up Genshi -+# Not activated by default on: -+# - PyPy (where it harms performance) -+_speedup_enable_default = 0 if is_pypy else 1 -+try: -+ _speedup_enabled = int(os.getenv('GENSHI_BUILD_SPEEDUP', _speedup_enable_default)) -+except ValueError: -+ import warnings -+ warnings.warn('GENSHI_BUILD_SPEEDUP was defined to something other than 0 or 1; defaulting to not build...') -+ _speedup_enabled = False -+ -+ext_modules = [] -+if _speedup_enabled: -+ ext_modules.append(Extension('genshi._speedups', ['genshi/_speedups.c'])) - - - # Setuptools need some help figuring out if the egg is "zip_safe" or not -@@ -156,7 +155,7 @@ feature is a template language, which is - genshi-text = genshi.template.plugin:TextTemplateEnginePlugin[plugin] - """, - -- features = {'speedups': speedups}, -+ ext_modules = ext_modules, - cmdclass = cmdclass, - - **extra diff --git a/Genshi-pr49-fix-python310-tests.patch b/Genshi-pr49-fix-python310-tests.patch deleted file mode 100644 index 243aaec..0000000 --- a/Genshi-pr49-fix-python310-tests.patch +++ /dev/null @@ -1,314 +0,0 @@ -From 305dd683920e4dbd8d8f099e9ec7a57317cfe51a Mon Sep 17 00:00:00 2001 -From: Felix Schwarz -Date: Thu, 16 Sep 2021 22:39:45 +0200 -Subject: [PATCH 1/3] remove unused variable - ---- - genshi/util.py | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/genshi/util.py b/genshi/util.py -index 6213a26..6b357a6 100644 ---- a/genshi/util.py -+++ b/genshi/util.py -@@ -119,7 +119,6 @@ def _insert_item(self, item): - - def _manage_size(self): - while len(self._dict) > self.capacity: -- olditem = self._dict[self.tail.key] - del self._dict[self.tail.key] - if self.tail != self.head: - self.tail = self.tail.prv - -From 1f18af74eb40c673d6b01cf3c9960c4e48e084d9 Mon Sep 17 00:00:00 2001 -From: Felix Schwarz -Date: Thu, 16 Sep 2021 22:40:22 +0200 -Subject: [PATCH 2/3] remove unused imports - ---- - genshi/core.py | 3 ++- - genshi/filters/tests/i18n.py | 1 - - genshi/filters/tests/test_html.py | 1 - - genshi/filters/tests/transform.py | 1 - - genshi/input.py | 2 -- - genshi/output.py | 2 +- - genshi/template/base.py | 1 - - genshi/template/directives.py | 3 +-- - genshi/template/interpolation.py | 1 - - genshi/template/markup.py | 2 +- - genshi/template/text.py | 1 - - genshi/tests/core.py | 3 +-- - genshi/tests/input.py | 2 -- - genshi/tests/output.py | 2 -- - genshi/tests/path.py | 1 - - genshi/tests/util.py | 1 - - genshi/util.py | 2 -- - setup.py | 3 --- - 18 files changed, 6 insertions(+), 26 deletions(-) - -diff --git a/genshi/core.py b/genshi/core.py -index 1d50329..11ca64c 100644 ---- a/genshi/core.py -+++ b/genshi/core.py -@@ -20,7 +20,8 @@ - - import six - --from genshi.util import plaintext, stripentities, striptags, stringrepr -+from genshi.compat import stringrepr -+from genshi.util import stripentities, striptags - - __all__ = ['Stream', 'Markup', 'escape', 'unescape', 'Attrs', 'Namespace', - 'QName'] -diff --git a/genshi/filters/tests/i18n.py b/genshi/filters/tests/i18n.py -index 5828ed9..80d0924 100644 ---- a/genshi/filters/tests/i18n.py -+++ b/genshi/filters/tests/i18n.py -@@ -12,7 +12,6 @@ - # history and logs, available at http://genshi.edgewall.org/log/. - - from datetime import datetime --import doctest - from gettext import NullTranslations - import unittest - -diff --git a/genshi/filters/tests/test_html.py b/genshi/filters/tests/test_html.py -index f50b026..a5fc71b 100644 ---- a/genshi/filters/tests/test_html.py -+++ b/genshi/filters/tests/test_html.py -@@ -11,7 +11,6 @@ - # individuals. For the exact contribution history, see the revision - # history and logs, available at http://genshi.edgewall.org/log/. - --import doctest - import unittest - - import six -diff --git a/genshi/filters/tests/transform.py b/genshi/filters/tests/transform.py -index f4c103d..6201557 100644 ---- a/genshi/filters/tests/transform.py -+++ b/genshi/filters/tests/transform.py -@@ -12,7 +12,6 @@ - # history and logs, available at http://genshi.edgewall.org/log/. - - import doctest --from pprint import pprint - import unittest - - import six -diff --git a/genshi/input.py b/genshi/input.py -index 711d042..48ee193 100644 ---- a/genshi/input.py -+++ b/genshi/input.py -@@ -22,8 +22,6 @@ - import six - from six.moves import html_entities as entities, html_parser as html - --import six -- - from genshi.core import Attrs, QName, Stream, stripentities - from genshi.core import START, END, XML_DECL, DOCTYPE, TEXT, START_NS, \ - END_NS, START_CDATA, END_CDATA, PI, COMMENT -diff --git a/genshi/output.py b/genshi/output.py -index dfe2648..de90a56 100644 ---- a/genshi/output.py -+++ b/genshi/output.py -@@ -20,7 +20,7 @@ - - import six - --from genshi.core import escape, Attrs, Markup, Namespace, QName, StreamEventKind -+from genshi.core import escape, Attrs, Markup, QName, StreamEventKind - from genshi.core import START, END, TEXT, XML_DECL, DOCTYPE, START_NS, END_NS, \ - START_CDATA, END_CDATA, PI, COMMENT, XML_NAMESPACE - -diff --git a/genshi/template/base.py b/genshi/template/base.py -index 987a7ca..5336895 100644 ---- a/genshi/template/base.py -+++ b/genshi/template/base.py -@@ -15,7 +15,6 @@ - - from collections import deque - import os --import sys - - import six - -diff --git a/genshi/template/directives.py b/genshi/template/directives.py -index 68d0af0..c672e77 100644 ---- a/genshi/template/directives.py -+++ b/genshi/template/directives.py -@@ -19,8 +19,7 @@ - from genshi.path import Path - from genshi.template.base import TemplateRuntimeError, TemplateSyntaxError, \ - EXPR, _apply_directives, _eval_expr --from genshi.template.eval import Expression, ExpressionASTTransformer, \ -- _ast, _parse -+from genshi.template.eval import Expression, _ast, _parse - - __all__ = ['AttrsDirective', 'ChooseDirective', 'ContentDirective', - 'DefDirective', 'ForDirective', 'IfDirective', 'MatchDirective', -diff --git a/genshi/template/interpolation.py b/genshi/template/interpolation.py -index 401d79e..b4046b5 100644 ---- a/genshi/template/interpolation.py -+++ b/genshi/template/interpolation.py -@@ -16,7 +16,6 @@ - """ - - from itertools import chain --import os - import re - from tokenize import PseudoToken - -diff --git a/genshi/template/markup.py b/genshi/template/markup.py -index 53d73e3..22f0602 100644 ---- a/genshi/template/markup.py -+++ b/genshi/template/markup.py -@@ -15,7 +15,7 @@ - - from itertools import chain - --from genshi.core import Attrs, Markup, Namespace, Stream, StreamEventKind -+from genshi.core import Attrs, Markup, Namespace, Stream - from genshi.core import START, END, START_NS, END_NS, TEXT, PI, COMMENT - from genshi.input import XMLParser - from genshi.template.base import BadDirectiveError, Template, \ -diff --git a/genshi/template/text.py b/genshi/template/text.py -index 94b4065..9155750 100644 ---- a/genshi/template/text.py -+++ b/genshi/template/text.py -@@ -35,7 +35,6 @@ - TemplateSyntaxError, EXEC, INCLUDE, SUB - from genshi.template.eval import Suite - from genshi.template.directives import * --from genshi.template.directives import Directive - from genshi.template.interpolation import interpolate - - __all__ = ['NewTextTemplate', 'OldTextTemplate', 'TextTemplate'] -diff --git a/genshi/tests/core.py b/genshi/tests/core.py -index b3d3fb5..e7e7906 100644 ---- a/genshi/tests/core.py -+++ b/genshi/tests/core.py -@@ -11,13 +11,12 @@ - # individuals. For the exact contribution history, see the revision - # history and logs, available at http://genshi.edgewall.org/log/. - --import doctest - import pickle - import unittest - - from genshi import core - from genshi.core import Markup, Attrs, Namespace, QName, escape, unescape --from genshi.input import XML, ParseError -+from genshi.input import XML - from genshi.compat import StringIO, BytesIO, IS_PYTHON2 - from genshi.tests.test_utils import doctest_suite - -diff --git a/genshi/tests/input.py b/genshi/tests/input.py -index f0b9b3b..e520e26 100644 ---- a/genshi/tests/input.py -+++ b/genshi/tests/input.py -@@ -11,8 +11,6 @@ - # individuals. For the exact contribution history, see the revision - # history and logs, available at http://genshi.edgewall.org/log/. - --import doctest --import sys - import unittest - - from genshi.core import Attrs, Stream -diff --git a/genshi/tests/output.py b/genshi/tests/output.py -index f964177..aa4c81a 100644 ---- a/genshi/tests/output.py -+++ b/genshi/tests/output.py -@@ -11,9 +11,7 @@ - # individuals. For the exact contribution history, see the revision - # history and logs, available at http://genshi.edgewall.org/log/. - --import doctest - import unittest --import sys - - from genshi.core import Attrs, Markup, QName, Stream - from genshi.input import HTML, XML -diff --git a/genshi/tests/path.py b/genshi/tests/path.py -index 3d04dd4..ce75e18 100644 ---- a/genshi/tests/path.py -+++ b/genshi/tests/path.py -@@ -11,7 +11,6 @@ - # individuals. For the exact contribution history, see the revision - # history and logs, available at http://genshi.edgewall.org/log/. - --import doctest - import unittest - - from genshi.core import Attrs, QName -diff --git a/genshi/tests/util.py b/genshi/tests/util.py -index f766579..4556d11 100644 ---- a/genshi/tests/util.py -+++ b/genshi/tests/util.py -@@ -11,7 +11,6 @@ - # individuals. For the exact contribution history, see the revision - # history and logs, available at http://genshi.edgewall.org/log/. - --import doctest - import unittest - - from genshi import util -diff --git a/genshi/util.py b/genshi/util.py -index 6b357a6..ad7f2d7 100644 ---- a/genshi/util.py -+++ b/genshi/util.py -@@ -19,8 +19,6 @@ - - import six - --from .compat import stringrepr -- - __docformat__ = 'restructuredtext en' - - -diff --git a/setup.py b/setup.py -index 18c7dfd..c14cfa8 100755 ---- a/setup.py -+++ b/setup.py -@@ -12,11 +12,8 @@ - # individuals. For the exact contribution history, see the revision - # history and logs, available at http://genshi.edgewall.org/log/. - --from distutils.cmd import Command - from distutils.command.build_ext import build_ext - from distutils.errors import CCompilerError, DistutilsPlatformError --import doctest --from glob import glob - import os - try: - from setuptools import setup, Extension - -From a23f3054b96b487215b04812c680075c5117470a Mon Sep 17 00:00:00 2001 -From: Felix Schwarz -Date: Thu, 16 Sep 2021 23:02:46 +0200 -Subject: [PATCH 3/3] get test suite passing with Python 3.10 - ---- - genshi/compat.py | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/genshi/compat.py b/genshi/compat.py -index 4a77571..8b307e5 100644 ---- a/genshi/compat.py -+++ b/genshi/compat.py -@@ -99,6 +99,13 @@ def get_code_params(code): - - - def build_code_chunk(code, filename, name, lineno): -+ if hasattr(code, 'replace'): -+ # Python 3.8+ -+ return code.replace( -+ co_filename=filename, -+ co_name=name, -+ co_firstlineno=lineno, -+ ) - params = [0, code.co_nlocals, code.co_kwonlyargcount, - code.co_stacksize, code.co_flags | 0x0040, - code.co_code, code.co_consts, code.co_names, diff --git a/python-Genshi.changes b/python-Genshi.changes index 93c4bc0..d9e59ee 100644 --- a/python-Genshi.changes +++ b/python-Genshi.changes @@ -1,3 +1,35 @@ +------------------------------------------------------------------- +Tue Aug 2 13:59:58 UTC 2022 - Otto Hollmann + +- Update to 0.7.7: + * Declared setuptools as the build backend (#65) + * Fixed deprecation warnings caused by escape sequences in regex pattern + strings (#63) +- Changes from 0.7.6: + * Added support for Python 3.10 and 3.11 (#54, #56, #58) + * Replaced assertEquals with assertEqual. assertEquals was deprecated in + Python 3.2. (#42) + * Removed used of element.getchildren() which has been removed from the Python + standard library elementtree in Python 3.9. (#57) + * Added support for Python 3.10 by using CodeType.replace in + `build_code_chunk` to make code object updates more robust against changes + in CodeType. (#49) + * Moved tests and releases workflows to GitHub Actions (#61, #51) + * Fixed reference leak in Markup.join C implementation. (#47) + * Sort directives only by directive index. Previously they were sorted by the + class, namespace and arguments of the directives. This was acceptable in + Python 2, but is a bug in Python 3 since some the arguments may not be + comparable. (#44) + * Add support for msgctxt to i18n. (#13) + * Implemented skipping of empty attributes during translation to match the + behaviour during translation extraction (i.e. don't try to translate empty + strings that are not extracted). (#38) + * Ported setuptools options to declarative config in setup.cfg. (#40) + * Removed used of deprecated setuptools Feature in setup.py. (#39) +- Removed patches, already in upstream: + * Genshi-pr39-fix-setuptools-extension.patch + * Genshi-pr49-fix-python310-tests.patch + ------------------------------------------------------------------- Sat Dec 11 21:10:18 UTC 2021 - Ben Greiner diff --git a/python-Genshi.spec b/python-Genshi.spec index 8b5f5cb..c57c871 100644 --- a/python-Genshi.spec +++ b/python-Genshi.spec @@ -1,7 +1,7 @@ # # spec file for package python-Genshi # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,17 +19,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python Name: python-Genshi -Version: 0.7.5 +Version: 0.7.7 Release: 0 Summary: A toolkit for generation of output for the web License: BSD-3-Clause Group: Development/Languages/Python -URL: http://genshi.edgewall.org/ +URL: https://genshi.edgewall.org/ Source: https://files.pythonhosted.org/packages/source/G/Genshi/Genshi-%{version}.tar.gz -# PATCH-FIX-UPSTREAM Genshi-pr39-fix-setuptools-extension.patch -- gh#edgewall/genshi#39 fixes gh#edgewall/genshi#36 -Patch1: Genshi-pr39-fix-setuptools-extension.patch -# PATCH-FIX-UPSTREAM Genshi-pr49-fix-python310-tests.patch -- gh#edgewall/genshi#49 -Patch2: https://github.com/edgewall/genshi/pull/49.patch#/Genshi-pr49-fix-python310-tests.patch BuildRequires: %{python_module Babel} BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools}