From e274121fd65a99913566c933b9aaa2d2c32e35d02047c6e5643ead712e4c6436 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 23 Jan 2025 17:49:03 +0000 Subject: [PATCH] Accepting request 1239543 from home:mcalabkova:branches:devel:languages:python - Add pygments.patch to fix test failure with new pygments - Update to 4.1.0 * Incompatible change: Python 3.9 is no longer supported * Made the order of Markdown extensions deterministic * Adopted ruff for code quality checks and auto-formatting OBS-URL: https://build.opensuse.org/request/show/1239543 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Markups?expand=0&rev=21 --- Markups-4.0.0.tar.gz | 3 --- markups-4.1.0.tar.gz | 3 +++ pygments.patch | 23 +++++++++++++++++++++++ python-Markups.changes | 13 +++++++++++++ python-Markups.spec | 10 ++++++---- 5 files changed, 45 insertions(+), 7 deletions(-) delete mode 100644 Markups-4.0.0.tar.gz create mode 100644 markups-4.1.0.tar.gz create mode 100644 pygments.patch diff --git a/Markups-4.0.0.tar.gz b/Markups-4.0.0.tar.gz deleted file mode 100644 index 8116ec5..0000000 --- a/Markups-4.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3ddb9afb1c55d0cff812e3392ca33f468498c0707a4fa8b2e05d0ba0d32c019e -size 22968 diff --git a/markups-4.1.0.tar.gz b/markups-4.1.0.tar.gz new file mode 100644 index 0000000..e269db8 --- /dev/null +++ b/markups-4.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25214434f356d353034c2ef4db76ab50e867a63ba1967eb6bcc80472c501ddd9 +size 23072 diff --git a/pygments.patch b/pygments.patch new file mode 100644 index 0000000..c652aea --- /dev/null +++ b/pygments.patch @@ -0,0 +1,23 @@ +From 93f36f74ef018b6d12a04a46bb4ff8c83569b9cd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mark=C3=A9ta?= +Date: Wed, 22 Jan 2025 14:29:42 +0100 +Subject: [PATCH] adapt to Pygments 2.19 + +--- + tests/test_public_api.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/test_public_api.py b/tests/test_public_api.py +index a23f091..f0a9d71 100644 +--- a/tests/test_public_api.py ++++ b/tests/test_public_api.py +@@ -41,7 +41,7 @@ def test_get_pygments_stylesheet(self) -> None: + except ImportError: + raise unittest.SkipTest("Pygments not available") + stylesheet = get_pygments_stylesheet(".selector") +- self.assertIn(".selector .nf { color: #0000FF", stylesheet) ++ self.assertIn(".selector .nf { color: #00F", stylesheet) + stylesheet = get_pygments_stylesheet(".selector", style="colorful") +- self.assertIn(".selector .nf { color: #0066BB", stylesheet) ++ self.assertIn(".selector .nf { color: #06B", stylesheet) + self.assertFalse(get_pygments_stylesheet(".selector", style="")) diff --git a/python-Markups.changes b/python-Markups.changes index ee191d5..c3d84dc 100644 --- a/python-Markups.changes +++ b/python-Markups.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed Jan 22 14:08:33 UTC 2025 - Markéta Machová + +- Add pygments.patch to fix test failure with new pygments + +------------------------------------------------------------------- +Wed Jan 22 12:50:00 UTC 2025 - Markéta Machová + +- Update to 4.1.0 + * Incompatible change: Python 3.9 is no longer supported + * Made the order of Markdown extensions deterministic + * Adopted ruff for code quality checks and auto-formatting + ------------------------------------------------------------------- Tue Nov 12 14:39:14 UTC 2024 - Matej Cepl diff --git a/python-Markups.spec b/python-Markups.spec index e5291ba..49e6553 100644 --- a/python-Markups.spec +++ b/python-Markups.spec @@ -1,7 +1,7 @@ # # spec file for package python-Markups # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,12 +17,14 @@ Name: python-Markups -Version: 4.0.0 +Version: 4.1.0 Release: 0 Summary: A wrapper around various text markups License: BSD-3-Clause URL: https://github.com/mitya57/pymarkups -Source: https://files.pythonhosted.org/packages/source/M/Markups/Markups-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/source/m/markups/markups-%{version}.tar.gz +# PATCH-FIX-UPSTREAM https://github.com/retext-project/pymarkups/pull/20 adapt to Pygments 2.19 +Patch: pygments.patch BuildRequires: %{python_module Markdown >= 3} BuildRequires: %{python_module PyYAML} BuildRequires: %{python_module Pygments} @@ -45,7 +47,7 @@ This module provides a wrapper around the various text markup languages, such as Markdown and reStructuredText (these two are supported by default). %prep -%autosetup -p1 -n Markups-%{version} +%autosetup -p1 -n markups-%{version} %build %pyproject_wheel