Skip to content

Commit

Permalink
Update python-readme_renderer to version 37.3 / rev 10 via SR 1055954
Browse files Browse the repository at this point in the history
https://build.opensuse.org/request/show/1055954
by user dgarcia + dimstar_suse
- Add fix-tests-pygments-2.14.0.patch to adapt tests to the new version of
  pygments gh#pypa/readme_renderer#272
  • Loading branch information
dgarcia authored and bmwiedemann committed Jan 15, 2023
1 parent 947b6ff commit 07353eb
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 3 deletions.
Binary file modified packages/p/python-readme_renderer/.files
Binary file not shown.
10 changes: 10 additions & 0 deletions packages/p/python-readme_renderer/.rev
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,14 @@
</comment>
<requestid>1035252</requestid>
</revision>
<revision rev="10" vrev="2">
<srcmd5>7a32a1a34e231590a553ebad8020b5d9</srcmd5>
<version>37.3</version>
<time>1673801867</time>
<user>dimstar_suse</user>
<comment>- Add fix-tests-pygments-2.14.0.patch to adapt tests to the new version of
pygments gh#pypa/readme_renderer#272
</comment>
<requestid>1055954</requestid>
</revision>
</revisionlist>
110 changes: 110 additions & 0 deletions packages/p/python-readme_renderer/fix-tests-pygments-2.14.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
From c213bb9f3adfc1dccc2f03141489f833bd83db53 Mon Sep 17 00:00:00 2001
From: Daniel Garcia Moreno <daniel.garcia@suse.com>
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 @@
<span class="n">dog</span> <span class="o">=</span> <span class="n">Dog</span><span class="p">(</span><span class="s1">&#39;Fido&#39;</span><span class="p">)</span>
</pre>
<p>and then here is some bash:</p>
-<pre lang="bash"><span class="k">if</span> <span class="o">[</span> <span class="s2">&quot;</span><span class="nv">$1</span><span class="s2">&quot;</span> <span class="o">=</span> <span class="s2">&quot;--help&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
- <span class="nb">echo</span> <span class="s2">&quot;OK&quot;</span>
+<pre lang="bash"><span class="k">if</span><span class="w"> </span><span class="o">[</span><span class="w"> </span><span class="s2">&quot;</span><span class="nv">$1</span><span class="s2">&quot;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;--help&quot;</span><span class="w"> </span><span class="o">]</span><span class="p">;</span><span class="w"> </span><span class="k">then</span>
+<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;OK&quot;</span>
<span class="k">fi</span>
</pre>
<p>or click <a href="http://www.surveymonkey.com" rel="nofollow">SurveyMonkey</a></p>
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 @@
<pre><code>This is code text.
</code></pre>
<pre lang="python3"><span class="k">def</span> <span class="nf">this_is_python</span><span class="p">():</span>
- <span class="sd">&quot;&quot;&quot;This is a docstring.&quot;&quot;&quot;</span>
+<span class="w"> </span><span class="sd">&quot;&quot;&quot;This is a docstring.&quot;&quot;&quot;</span>
<span class="k">pass</span>
</pre>
-<pre lang="go"><span class="kd">func</span><span class="w"> </span><span class="nx">ThisIsGo</span><span class="p">(){</span><span class="w"></span>
-<span class="w"> </span><span class="k">return</span><span class="w"></span>
-<span class="p">}</span><span class="w"></span>
+<pre lang="go"><span class="kd">func</span><span class="w"> </span><span class="nx">ThisIsGo</span><span class="p">(){</span>
+<span class="w"> </span><span class="k">return</span>
+<span class="p">}</span>
</pre>
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 @@
<pre lang="python3"><span class="k">def</span> <span class="nf">this_is_python</span><span class="p">():</span>
<span class="k">pass</span>
</pre>
-<pre lang="go"><span class="kd">func</span><span class="w"> </span><span class="nx">ThisIsGo</span><span class="p">(){</span><span class="w"></span>
-<span class="w"> </span><span class="k">return</span><span class="w"></span>
-<span class="p">}</span><span class="w"></span>
+<pre lang="go"><span class="kd">func</span><span class="w"> </span><span class="nx">ThisIsGo</span><span class="p">(){</span>
+<span class="w"> </span><span class="k">return</span>
+<span class="p">}</span>
</pre>
<pre lang="abc">An unknown code fence block
</pre>
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 @@
<p>This is normal text.</p>
<pre lang="python3"><span class="k">def</span> <span class="nf">this_is_python</span><span class="p">():</span>
- <span class="sd">&quot;&quot;&quot;This is a docstring.&quot;&quot;&quot;</span>
+<span class="w"> </span><span class="sd">&quot;&quot;&quot;This is a docstring.&quot;&quot;&quot;</span>
<span class="k">pass</span>
<span class="o">&lt;</span><span class="n">script</span> <span class="nb">type</span><span class="o">=</span><span class="s2">&quot;text/javascript&quot;</span><span class="o">&gt;</span><span class="n">alert</span><span class="p">(</span><span class="s1">&#39;I am evil.&#39;</span><span class="p">);</span><span class="o">&lt;/</span><span class="n">script</span><span class="o">&gt;</span>
</pre>
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 @@
<p>Here is some Python code for a <span class="docutils literal">Dog</span>:</p>
-<pre><code><span class="k">class</span> <span class="nc">Dog</span><span class="p">(</span><span class="n">Animal</span><span class="p">):</span>
- <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span>
- <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">name</span>
+<pre><code><span class="k">class</span> <span class="nc">Dog</span><span class="p">(</span><span class="n">Animal</span><span class="p">):</span><span class="w">
+</span> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span><span class="w">
+</span> <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">name</span><span class="w">

- <span class="k">def</span> <span class="nf">make_sound</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
- <span class="nb">print</span><span class="p">(</span><span class="s1">'Ruff!'</span><span class="p">)</span>
+</span> <span class="k">def</span> <span class="nf">make_sound</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span><span class="w">
+</span> <span class="nb">print</span><span class="p">(</span><span class="s1">'Ruff!'</span><span class="p">)</span><span class="w">

-<span class="n">dog</span> <span class="o">=</span> <span class="n">Dog</span><span class="p">(</span><span class="s1">'Fido'</span><span class="p">)</span></code></pre>
+</span><span class="n">dog</span> <span class="o">=</span> <span class="n">Dog</span><span class="p">(</span><span class="s1">'Fido'</span><span class="p">)</span></code></pre>
<p>and then here is some bash:</p>
-<pre><code><span class="k">if</span> <span class="o">[</span> <span class="s2">&quot;</span><span class="nv">$1</span><span class="s2">&quot;</span> <span class="o">=</span> <span class="s2">&quot;--help&quot;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
- <span class="nb">echo</span> <span class="s2">&quot;OK&quot;</span>
-<span class="k">fi</span></code></pre>
+<pre><code><span class="k">if</span><span class="w"> </span><span class="o">[</span><span class="w"> </span><span class="s2">&quot;</span><span class="nv">$1</span><span class="s2">&quot;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;--help&quot;</span><span class="w"> </span><span class="o">]</span><span class="p">;</span><span class="w"> </span><span class="k">then</span><span class="w">
+ </span><span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;OK&quot;</span><span class="w">
+</span><span class="k">fi</span></code></pre>
<p>or click <a href="http://www.surveymonkey.com" rel="nofollow">SurveyMonkey</a></p>
<pre><code>An unknown code fence block</code></pre>
--
2.39.0

Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jan 4 16:24:09 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>

- 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 <yarunachalam@suse.com>

Expand Down
8 changes: 5 additions & 3 deletions packages/p/python-readme_renderer/python-readme_renderer.spec
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -17,14 +17,15 @@


%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-readme_renderer
Version: 37.3
Release: 0
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}
Expand Down Expand Up @@ -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

0 comments on commit 07353eb

Please sign in to comment.