Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-djangorestframework for openSUSE:Factory checked in at 2022-06-20 15:38:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-djangorestframework (Old) and /work/SRC/openSUSE:Factory/.python-djangorestframework.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-djangorestframework" Mon Jun 20 15:38:44 2022 rev:15 rq:983909 version:3.13.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-djangorestframework/python-djangorestframework.changes 2022-01-07 12:47:57.291911020 +0100 +++ /work/SRC/openSUSE:Factory/.python-djangorestframework.new.1548/python-djangorestframework.changes 2022-06-20 15:39:26.807050022 +0200 @@ -1,0 +2,6 @@ +Mon Jun 20 09:46:45 UTC 2022 - Matej Cepl <mc...@suse.com> + +- Add 8530-update-tests-new-Pygments.patch to allow working with + the current Pygments (gh#encode/django-rest-framework#8160). + +------------------------------------------------------------------- New: ---- 8530-update-tests-new-Pygments.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-djangorestframework.spec ++++++ --- /var/tmp/diff_new_pack.4JE2pi/_old 2022-06-20 15:39:27.263050689 +0200 +++ /var/tmp/diff_new_pack.4JE2pi/_new 2022-06-20 15:39:27.267050695 +0200 @@ -1,5 +1,5 @@ # -# spec file for python-djangorestframework +# spec file # # Copyright (c) 2022 SUSE LLC # @@ -35,6 +35,9 @@ Group: Development/Languages/Python URL: http://django-rest-framework.org/ Source: https://github.com/encode/django-rest-framework/archive/%{version}.tar.gz#/djangorestframework-%{version}.tar.gz +# PATCH-FIX-UPSTREAM 8530-update-tests-new-Pygments.patch gh#encode/django-rest-framework#8160 mc...@suse.com +# allow work with the current Pygments +Patch0: 8530-update-tests-new-Pygments.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -52,6 +55,7 @@ BuildRequires: %{python_module Django >= 1.11} BuildRequires: %{python_module Markdown >= 2.6.11} BuildRequires: %{python_module PyYAML} +BuildRequires: %{python_module Pygments} BuildRequires: %{python_module coreapi >= 2.3.1} BuildRequires: %{python_module coreschema >= 0.0.4} BuildRequires: %{python_module django-guardian >= 2.2.0} @@ -71,7 +75,8 @@ authentication and permission policies out of the box. %prep -%setup -q -n django-rest-framework-%{version} +%autosetup -p1 -n django-rest-framework-%{version} + # Remove pytest params incompatible with older pytest on Leap sed -i '/addopts/d' setup.cfg @@ -86,8 +91,7 @@ %check %if %{with test} -# gh#encode/django-rest-framework#8160 -%pytest -rs -vv -k 'not test_markdown' +%pytest -rs -vv %endif %if !%{with test} ++++++ 8530-update-tests-new-Pygments.patch ++++++ >From 6b5a2a2aa037236ad2a53eeab42c5bf035f0b9eb Mon Sep 17 00:00:00 2001 From: Tom Christie <t...@tomchristie.com> Date: Mon, 20 Jun 2022 10:21:53 +0100 Subject: [PATCH 1/2] Update docstring test for more recent pygments version --- requirements/requirements-optionals.txt | 5 ++--- tests/test_description.py | 29 ++++--------------------- 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/requirements/requirements-optionals.txt b/requirements/requirements-optionals.txt index 75b9ab4d60..f3bb9b709d 100644 --- a/requirements/requirements-optionals.txt +++ b/requirements/requirements-optionals.txt @@ -3,8 +3,7 @@ coreapi==2.3.1 coreschema==0.0.4 django-filter>=2.4.0,<3.0 django-guardian>=2.4.0,<2.5 -markdown==3.3;python_version>="3.6" -markdown==3.2.2;python_version=="3.5" +markdown==3.3 psycopg2-binary>=2.8.5,<2.9 -pygments>=2.7.1,<2.8 +pygments==2.12 pyyaml>=5.3.1,<5.4 diff --git a/tests/test_description.py b/tests/test_description.py index 363ad6513e..443d27d07f 100644 --- a/tests/test_description.py +++ b/tests/test_description.py @@ -33,7 +33,7 @@ # If markdown is installed we also test it's working # (and that our wrapped forces '=' to h2 and '-' to h3) -MARKDOWN_BASE = """<h2 id="an-example-docstring">an example docstring</h2> +MARKDOWN_DOCSTRING = """<h2 id="an-example-docstring">an example docstring</h2> <ul> <li>list</li> <li>list</li> @@ -42,25 +42,8 @@ <pre><code>code block </code></pre> <p>indented</p> -<h2 id="hash-style-header">hash style header</h2>%s""" - -MARKDOWN_gte_33 = """ -<div class="highlight"><pre><span></span><span class="p">[{</span><br />\ - <span class="nt">"alpha"</span><span class="p">:</span>\ - <span class="mi">1</span><span class="p">,</span><br />\ - <span class="nt">"beta"</span><span class="p">:</span>\ - <span class="s2">"this is a string"</span><br />\ -<span class="p">}]</span><br /></pre></div> -<p><br /></p>""" - -MARKDOWN_lt_33 = """ -<div class="highlight"><pre><span></span><span class="p">[{</span><br />\ - <span class="nt">"alpha"</span><span class="p">:</span>\ - <span class="mi">1</span><span class="p">,</span><br />\ - <span class="nt">"beta"</span><span class="p">:</span>\ - <span class="s2">"this is a string"</span><br />\ -<span class="p">}]</span><br /></pre></div> - +<h2 id="hash-style-header">hash style header</h2> +<div class="highlight"><pre><span></span><span class="p">[{</span><span class="w"></span><br /><span class="w"> </span><span class="nt">"alpha"</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"></span><br /><span class="w"> </span><span class="nt">"beta"</span><span class="p">:</span><span class="w"> </span><span class="s2">"this is a string"</span><span class="w"></span><br /><span class="p">}]</span><span class="w"></span><br /></pre></div> <p><br /></p>""" @@ -163,11 +146,7 @@ def test_markdown(self): """ Ensure markdown to HTML works as expected. """ - # Markdown 3.3 is only supported on Python 3.6 and higher - if sys.version_info >= (3, 6): - assert apply_markdown(DESCRIPTION) == MARKDOWN_BASE % MARKDOWN_gte_33 - else: - assert apply_markdown(DESCRIPTION) == MARKDOWN_BASE % MARKDOWN_lt_33 + assert apply_markdown(DESCRIPTION) == MARKDOWN_DOCSTRING def test_dedent_tabs(): >From 151ca7fb878db42918ff5f4113011a6ade89bedd Mon Sep 17 00:00:00 2001 From: Tom Christie <t...@tomchristie.com> Date: Mon, 20 Jun 2022 10:29:24 +0100 Subject: [PATCH 2/2] Drop unused import --- tests/test_description.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/test_description.py b/tests/test_description.py index 443d27d07f..ecc6b9776d 100644 --- a/tests/test_description.py +++ b/tests/test_description.py @@ -1,5 +1,3 @@ -import sys - import pytest from django.test import TestCase