summaryrefslogtreecommitdiffstats
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/patches/docs-Drop-external-graphic-in-index.rst.patch22
-rw-r--r--debian/patches/series2
-rw-r--r--debian/patches/tests-Make-some-tests-compatible-with-Python-3.12.patch75
3 files changed, 99 insertions, 0 deletions
diff --git a/debian/patches/docs-Drop-external-graphic-in-index.rst.patch b/debian/patches/docs-Drop-external-graphic-in-index.rst.patch
new file mode 100644
index 0000000..0cd5285
--- /dev/null
+++ b/debian/patches/docs-Drop-external-graphic-in-index.rst.patch
@@ -0,0 +1,22 @@
+From: Carsten Schoenert <c.schoenert@t-online.de>
+Date: Tue, 12 Sep 2023 12:57:44 +0530
+Subject: docs: Drop external graphic in index.rst
+
+The badge about the build status for the documentation isn't needed.
+
+Forwarded: Not-Needed
+---
+ _doc/index.rst | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/_doc/index.rst b/_doc/index.rst
+index 0324eff..83dd9ef 100644
+--- a/_doc/index.rst
++++ b/_doc/index.rst
+@@ -22,6 +22,3 @@ Contents:
+ pyyaml
+ contributing
+ upmerge
+-
+-.. image:: https://readthedocs.org/projects/ruyaml/badge/?version=stable
+- :target: https://ruyaml.readthedocs.org/en/stable
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..975a00d
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+docs-Drop-external-graphic-in-index.rst.patch
+tests-Make-some-tests-compatible-with-Python-3.12.patch
diff --git a/debian/patches/tests-Make-some-tests-compatible-with-Python-3.12.patch b/debian/patches/tests-Make-some-tests-compatible-with-Python-3.12.patch
new file mode 100644
index 0000000..311ba7b
--- /dev/null
+++ b/debian/patches/tests-Make-some-tests-compatible-with-Python-3.12.patch
@@ -0,0 +1,75 @@
+From: Carsten Schoenert <c.schoenert@t-online.de>
+Date: Mon, 1 Jan 2024 12:16:27 +0100
+Subject: tests: Make some tests compatible with Python 3.12
+
+---
+ _test/test_comments.py | 11 +++++++++--
+ _test/test_issues.py | 12 +++++++++---
+ 2 files changed, 18 insertions(+), 5 deletions(-)
+
+diff --git a/_test/test_comments.py b/_test/test_comments.py
+index 7973349..d67bd11 100644
+--- a/_test/test_comments.py
++++ b/_test/test_comments.py
+@@ -11,6 +11,7 @@ roundtrip changes
+ """
+
+ import pytest
++import sys
+
+ from .roundtrip import dedent, round_trip, round_trip_dump, round_trip_load
+
+@@ -576,7 +577,10 @@ class TestCommentedMapMerge:
+ )
+ assert data['x']['a'] == 1
+ assert data['y']['a'] == 1
+- assert str(data['y']) == """ordereddict([('a', 1)])"""
++ if sys.version_info < (3, 12):
++ assert str(data['y']) == """ordereddict([('a', 1)])"""
++ else:
++ assert str(data['y']) == """ordereddict({'a': 1})"""
+
+ def test_issue_60_1(self):
+ data = round_trip_load(
+@@ -590,7 +594,10 @@ class TestCommentedMapMerge:
+ )
+ assert data['x']['a'] == 1
+ assert data['y']['a'] == 1
+- assert str(data['y']) == """ordereddict([('b', 2), ('a', 1)])"""
++ if sys.version_info < (3, 12):
++ assert str(data['y']) == """ordereddict([('b', 2), ('a', 1)])"""
++ else:
++ assert str(data['y']) == """ordereddict({'b': 2, 'a': 1})"""
+
+
+ class TestEmptyLines:
+diff --git a/_test/test_issues.py b/_test/test_issues.py
+index 65efa95..7ee3a95 100644
+--- a/_test/test_issues.py
++++ b/_test/test_issues.py
+@@ -1,6 +1,7 @@
+ # coding: utf-8
+
+ import pytest # NOQA
++import sys
+
+ from .roundtrip import ( # NOQA
+ YAML,
+@@ -28,9 +29,14 @@ class TestIssues:
+ )
+ data = round_trip_load(s)
+ assert str(data['comb']) == str(data['def'])
+- assert (
+- str(data['comb']) == "ordereddict([('key', 'value'), ('key1', 'value1')])"
+- )
++ if sys.version_info < (3, 12):
++ assert (
++ str(data['comb']) == "ordereddict([('key', 'value'), ('key1', 'value1')])"
++ )
++ else:
++ assert (
++ str(data['comb']) == "ordereddict({'key': 'value', 'key1': 'value1'})"
++ )
+
+ def test_issue_82(self, tmpdir):
+ program_src = r'''