diff --git a/packages/p/python-readme_renderer/.files b/packages/p/python-readme_renderer/.files index 05533be2d56..851d840d716 100644 Binary files a/packages/p/python-readme_renderer/.files and b/packages/p/python-readme_renderer/.files differ diff --git a/packages/p/python-readme_renderer/.rev b/packages/p/python-readme_renderer/.rev index 111c7a1e507..e400fb17542 100644 --- a/packages/p/python-readme_renderer/.rev +++ b/packages/p/python-readme_renderer/.rev @@ -100,4 +100,14 @@ 1035252 + + 7a32a1a34e231590a553ebad8020b5d9 + 37.3 + + dimstar_suse + - Add fix-tests-pygments-2.14.0.patch to adapt tests to the new version of + pygments gh#pypa/readme_renderer#272 + + 1055954 + diff --git a/packages/p/python-readme_renderer/fix-tests-pygments-2.14.0.patch b/packages/p/python-readme_renderer/fix-tests-pygments-2.14.0.patch new file mode 100644 index 00000000000..d07fe1a4a9f --- /dev/null +++ b/packages/p/python-readme_renderer/fix-tests-pygments-2.14.0.patch @@ -0,0 +1,110 @@ +From c213bb9f3adfc1dccc2f03141489f833bd83db53 Mon Sep 17 00:00:00 2001 +From: Daniel Garcia Moreno +Date: Wed, 4 Jan 2023 17:21:48 +0100 +Subject: [PATCH] Adapt tests to pygments 2.14.0 + +This patch update the test fixtures to match the output of pygments +2.14.0 +--- + tests/fixtures/test_CommonMark_008.html | 4 ++-- + tests/fixtures/test_GFM_doublequotes.html | 8 ++++---- + tests/fixtures/test_GFM_highlight.html | 6 +++--- + tests/fixtures/test_GFM_malicious_pre.html | 2 +- + tests/fixtures/test_rst_008.html | 18 +++++++++--------- + 5 files changed, 19 insertions(+), 19 deletions(-) + +diff --git a/tests/fixtures/test_CommonMark_008.html b/tests/fixtures/test_CommonMark_008.html +index b941909..4d52a37 100644 +--- a/tests/fixtures/test_CommonMark_008.html ++++ b/tests/fixtures/test_CommonMark_008.html +@@ -9,8 +9,8 @@ + dog = Dog('Fido') + +

and then here is some bash:

+-
if [ "$1" = "--help" ]; then
+-    echo "OK"
++
if [ "$1" = "--help" ]; then
++    echo "OK"
+ fi
+ 
+

or click SurveyMonkey

+diff --git a/tests/fixtures/test_GFM_doublequotes.html b/tests/fixtures/test_GFM_doublequotes.html +index 546fd39..1353714 100644 +--- a/tests/fixtures/test_GFM_doublequotes.html ++++ b/tests/fixtures/test_GFM_doublequotes.html +@@ -2,10 +2,10 @@ +
This is code text.
+ 
+
def this_is_python():
+-    """This is a docstring."""
++    """This is a docstring."""
+     pass
+ 
+-
func ThisIsGo(){
+-    return
+-}
++
func ThisIsGo(){
++    return
++}
+ 
+diff --git a/tests/fixtures/test_GFM_highlight.html b/tests/fixtures/test_GFM_highlight.html +index 4094325..c2cf7bb 100644 +--- a/tests/fixtures/test_GFM_highlight.html ++++ b/tests/fixtures/test_GFM_highlight.html +@@ -4,9 +4,9 @@ +
def this_is_python():
+     pass
+ 
+-
func ThisIsGo(){
+-    return
+-}
++
func ThisIsGo(){
++    return
++}
+ 
+
An unknown code fence block
+ 
+diff --git a/tests/fixtures/test_GFM_malicious_pre.html b/tests/fixtures/test_GFM_malicious_pre.html +index 7194eee..245e17e 100644 +--- a/tests/fixtures/test_GFM_malicious_pre.html ++++ b/tests/fixtures/test_GFM_malicious_pre.html +@@ -1,6 +1,6 @@ +

This is normal text.

+
def this_is_python():
+-    """This is a docstring."""
++    """This is a docstring."""
+     pass
+ <script type="text/javascript">alert('I am evil.');</script>
+ 
+diff --git a/tests/fixtures/test_rst_008.html b/tests/fixtures/test_rst_008.html +index 621a70c..6a01a9d 100644 +--- a/tests/fixtures/test_rst_008.html ++++ b/tests/fixtures/test_rst_008.html +@@ -1,15 +1,15 @@ +

Here is some Python code for a Dog:

+-
class Dog(Animal):
+-    def __init__(self, name):
+-        self.name = name
++
class Dog(Animal):
++    def __init__(self, name):
++        self.name = name
+ 
+-    def make_sound(self):
+-        print('Ruff!')
++    def make_sound(self):
++        print('Ruff!')
+ 
+-dog = Dog('Fido')
++dog = Dog('Fido')
+

and then here is some bash:

+-
if [ "$1" = "--help" ]; then
+-    echo "OK"
+-fi
++
if [ "$1" = "--help" ]; then
++    echo "OK"
++fi
+

or click SurveyMonkey

+
An unknown code fence block
+-- +2.39.0 + diff --git a/packages/p/python-readme_renderer/python-readme_renderer.changes b/packages/p/python-readme_renderer/python-readme_renderer.changes index 2031ebe04c9..f868b42e871 100644 --- a/packages/p/python-readme_renderer/python-readme_renderer.changes +++ b/packages/p/python-readme_renderer/python-readme_renderer.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 4 16:24:09 UTC 2023 - Daniel Garcia + +- Add fix-tests-pygments-2.14.0.patch to adapt tests to the new version of + pygments gh#pypa/readme_renderer#272 + ------------------------------------------------------------------- Wed Nov 9 18:51:01 UTC 2022 - Yogalakshmi Arunachalam diff --git a/packages/p/python-readme_renderer/python-readme_renderer.spec b/packages/p/python-readme_renderer/python-readme_renderer.spec index 6a64e4109a5..d569639d51d 100644 --- a/packages/p/python-readme_renderer/python-readme_renderer.spec +++ b/packages/p/python-readme_renderer/python-readme_renderer.spec @@ -1,7 +1,7 @@ # # spec file for package python-readme_renderer # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,6 @@ %define skip_python2 1 -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-readme_renderer Version: 37.3 Release: 0 @@ -25,6 +24,8 @@ Summary: A library for rendering "readme" descriptions License: Apache-2.0 URL: https://github.com/pypa/readme_renderer Source: https://files.pythonhosted.org/packages/source/r/readme_renderer/readme_renderer-%{version}.tar.gz +# PATCH-FIX-UPSTREAM fix-tests-pygments-2.14.0.patch gh#pypa/readme_renderer#272 +Patch0: fix-tests-pygments-2.14.0.patch BuildRequires: %{python_module Pygments >= 2.5.1} BuildRequires: %{python_module bleach >= 2.1.0} BuildRequires: %{python_module cmarkgfm >= 0.7.0} @@ -62,6 +63,7 @@ export LANG=en_US.UTF-8 %files %{python_files} %license LICENSE %doc CHANGES.rst README.rst -%{python_sitelib}/* +%{python_sitelib}/readme_renderer +%{python_sitelib}/readme_renderer-%{version}*-info %changelog