summaryrefslogtreecommitdiffstats
path: root/debian/patches/ruamel-yaml-0.18.5.patch
blob: aaf29c68eda88bbfcb856b97da699413a5dcbac9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From: Sorin Sbarnea <ssbarnea@redhat.com>
Date: Fri, 3 Nov 2023 12:59:04 +0000
Subject: Require ruamel.yaml >= 0.18.5
Origin: upstream,https://github.com/ansible/ansible-lint/pull/3880
Forwarded: not-needed

Backported from upstream for version 6.17.2

--- ansible-lint.orig/.config/requirements.in
+++ ansible-lint/.config/requirements.in
@@ -10,7 +10,7 @@
 pathspec>=0.10.3 # Mozilla Public License 2.0 (MPL 2.0)
 pyyaml>=5.4.1 # MIT (centos 9 has 5.3.1)
 rich>=12.0.0 # MIT
-ruamel.yaml>=0.17.0,<0.18,!=0.17.29,!=0.17.30 # MIT, next version is planned to have breaking changes
+ruamel.yaml>=0.18.5 # MIT
 requests>=2.31.0 # Apache-2.0 (indirect, but we want newer version for security reasons)
 subprocess-tee>=0.4.1 # MIT, used by ansible-compat
 yamllint >= 1.30.0 # GPLv3
--- ansible-lint.orig/src/ansiblelint/yaml_utils.py
+++ ansible-lint/src/ansiblelint/yaml_utils.py
@@ -795,7 +795,7 @@
         """
         # Default to reading/dumping YAML 1.1 (ruamel.yaml defaults to 1.2)
         self._yaml_version_default: tuple[int, int] = (1, 1)
-        self._yaml_version: str | tuple[int, int] = self._yaml_version_default
+        self._yaml_version: tuple[int, int] = self._yaml_version_default
 
         super().__init__(typ=typ, pure=pure, output=output, plug_ins=plug_ins)
 
@@ -898,7 +898,7 @@
         return cast(dict[str, Union[bool, int, str]], config)
 
     @property  # type: ignore[override]
-    def version(self) -> str | tuple[int, int]:
+    def version(self) -> tuple[int, int]:
         """Return the YAML version used to parse or dump.
 
         Ansible uses PyYAML which only supports YAML 1.1. ruamel.yaml defaults to 1.2.
@@ -909,7 +909,7 @@
         return self._yaml_version
 
     @version.setter
-    def version(self, value: str | tuple[int, int] | None) -> None:
+    def version(self, value: tuple[int, int] | None) -> None:
         """Ensure that yaml version uses our default value.
 
         The yaml Reader updates this value based on the ``%YAML`` directive in files.