public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-markups] f44: Fix tests failures with Pygments 2.11
@ 2026-10-22 17:38 Karolina Surma
0 siblings, 0 replies; only message in thread
From: Karolina Surma @ 2026-10-22 17:38 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-markups
Branch : f44
Commit : f6402953c5fef74d2af2160293a43cd7dd40f078
Author : Karolina Surma <ksurma@redhat.com>
Date : 2022-02-07T11:03:04+01:00
Stats : +43/-2 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-markups/c/f6402953c5fef74d2af2160293a43cd7dd40f078?branch=f44
Log:
Fix tests failures with Pygments 2.11
---
diff --git a/fix-tests-with-pygments-2.11.patch b/fix-tests-with-pygments-2.11.patch
new file mode 100644
index 0000000..7d2404f
--- /dev/null
+++ b/fix-tests-with-pygments-2.11.patch
@@ -0,0 +1,34 @@
+From c13ae6633fa9395841dbe81ac16879b80868fa86 Mon Sep 17 00:00:00 2001
+From: Dmitry Shachnev <mitya57@gmail.com>
+Date: Sun, 9 Jan 2022 18:49:30 +0300
+Subject: [PATCH] =?UTF-8?q?Make=20the=20tests=20pass=20with=20Pygments=20?=
+ =?UTF-8?q?=E2=89=A5=202.11.0?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+In https://github.com/pygments/pygments/commit/b4c63595da6bdc45,
+the default color for .ch (Comment.Hashbang) was changed from #408080
+to #3D7B7B.
+
+As I want the tests to pass with both old and new Pygments, I am
+switching to a different selector, .nf (Name.Function) which was not
+changed.
+---
+ 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 7cea04f..84338d8 100644
+--- a/tests/test_public_api.py
++++ b/tests/test_public_api.py
+@@ -33,7 +33,7 @@ def test_get_pygments_stylesheet(self):
+ except ImportError:
+ raise unittest.SkipTest("Pygments not available")
+ stylesheet = get_pygments_stylesheet(".selector")
+- self.assertIn(".selector .ch { color: #408080", stylesheet)
++ self.assertIn(".selector .nf { color: #0000FF", stylesheet)
+ stylesheet = get_pygments_stylesheet(".selector", style="colorful")
+- self.assertIn(".selector .ch { color: #888888", stylesheet)
++ self.assertIn(".selector .nf { color: #0066BB", stylesheet)
+ self.assertFalse(get_pygments_stylesheet(".selector", style=""))
diff --git a/python-markups.spec b/python-markups.spec
index c2b1e0b..9913f60 100644
--- a/python-markups.spec
+++ b/python-markups.spec
@@ -2,7 +2,7 @@
Name: python-%{pypi_name}
Version: 3.1.3
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A wrapper around various text markups
License: BSD
@@ -10,6 +10,10 @@ URL: https://github.com/retext-project/pymarkups
Source0: %{pypi_source Markups}
BuildArch: noarch
+# Fix tests with Pygments 2.11.2
+# Commit backported from: https://github.com/retext-project/pymarkups/commit/c13ae6633
+Patch: fix-tests-with-pygments-2.11.patch
+
BuildRequires: python3-devel
BuildRequires: python3dist(docutils)
BuildRequires: python3dist(markdown)
@@ -43,7 +47,7 @@ Documentation for markups
%prep
-%autosetup -n Markups-%{version}
+%autosetup -p1 -n Markups-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
@@ -71,6 +75,9 @@ rm -rf html/.{doctrees,buildinfo}
%license LICENSE
%changelog
+* Mon Feb 07 2022 Karolina Surma <ksurma@redhat.com> - 3.1.3-3
+- Fix tests failures with Pygments 2.11
+
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-22 17:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-22 17:38 [rpms/python-markups] f44: Fix tests failures with Pygments 2.11 Karolina Surma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox