Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-PyYAML for openSUSE:Factory 
checked in at 2026-12-01 17:19:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-PyYAML (Old)
 and      /work/SRC/openSUSE:Factory/.python-PyYAML.new.1340718 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-PyYAML"

Tue Dec  1 17:19:14 2026 rev:38 rq:1401696 version:6.0.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-PyYAML/python-PyYAML.changes      
2025-09-30 17:49:37.539556088 +0200
+++ /work/SRC/openSUSE:Factory/.python-PyYAML.new.1340718/python-PyYAML.changes 
2026-12-01 17:19:23.284616440 +0100
@@ -1,0 +2,18 @@
+Mon Nov 30 14:41:56 UTC 2026 - Dirk Müller <[email protected]>
+
+- spec file fixes
+
+-------------------------------------------------------------------
+Sat Nov 28 06:56:04 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to 6.0.4:
+  * Fixed exponential merge key expansion denial of service via
+    duplicate anchor aliases in `<<` merge processing (upstream
+    issue #897): a sub-KB document could previously trigger
+    millions of element extensions and exhaust CPU and memory
+    during safe loading
+  * Exposed libyaml 0.2.6 recursion control API (no-op when
+    building against older libyaml)
+  * Added support for Python 3.15, dropped EoL Python 3.8 and 3.9
+
+-------------------------------------------------------------------

Old:
----
  pyyaml-6.0.3.tar.gz

New:
----
  pyyaml-6.0.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-PyYAML.spec ++++++
--- /var/tmp/diff_new_pack.D8j9ah/_old  2026-12-01 17:19:23.883641655 +0100
+++ /var/tmp/diff_new_pack.D8j9ah/_new  2026-12-01 17:19:23.885641739 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-PyYAML
 #
-# Copyright (c) 2025 SUSE LLC and contributors
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-PyYAML
-Version:        6.0.3
+Version:        6.0.4
 Release:        0
 Summary:        YAML parser and emitter for Python
 License:        MIT
@@ -29,8 +29,9 @@
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
-BuildRequires:  libyaml-devel
+BuildRequires:  pkgconfig
 BuildRequires:  python-rpm-macros
+BuildRequires:  pkgconfig(yaml-0.1)
 %python_subpackages
 
 %description
@@ -44,7 +45,7 @@
 allow to represent an arbitrary Python object.
 
 PyYAML is applicable for a broad range of tasks from complex
-configuration files to object serialization and persistance.
+configuration files to object serialization and persistence.
 
 %prep
 %autosetup -p1 -n pyyaml-%{version}
@@ -53,8 +54,7 @@
 export CFLAGS="%{optflags}"
 export PYYAML_FORCE_CYTHON=1
 %pyproject_wheel
-# Fix example permissions.
-find examples/ -type f | xargs chmod a-x
+find examples/ -type f -exec chmod a-x {} +
 
 %install
 %pyproject_install
@@ -67,7 +67,7 @@
 %endif
 %{python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python 
tests/legacy_tests/test_all.py}
 
-%files %{python_files}
+%files %python_files
 %license LICENSE
 %doc CHANGES README.md examples/
 %{python_sitearch}/yaml

++++++ pyyaml-6.0.3.tar.gz -> pyyaml-6.0.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyyaml-6.0.3/CHANGES new/pyyaml-6.0.4/CHANGES
--- old/pyyaml-6.0.3/CHANGES    2025-09-25 23:11:23.000000000 +0200
+++ new/pyyaml-6.0.4/CHANGES    2026-11-21 00:13:56.152232600 +0100
@@ -3,6 +3,11 @@
 
 * https://github.com/yaml/pyyaml/commits/
 
+6.0.4 (2026-11-20)
+
+* https://github.com/yaml/pyyaml/pull/937 -- Fix merge key performance
+* https://github.com/yaml/pyyaml/pull/1010 -- Expose libyaml recursion control 
API (no-op on libyaml < 0.2.6)
+
 6.0.3 (2025-09-25)
 
 * https://github.com/yaml/pyyaml/pull/864 -- Support for Python 3.14 and 
free-threading (experimental)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyyaml-6.0.3/PKG-INFO new/pyyaml-6.0.4/PKG-INFO
--- old/pyyaml-6.0.3/PKG-INFO   2025-09-25 23:11:28.782420000 +0200
+++ new/pyyaml-6.0.4/PKG-INFO   2026-11-21 00:14:02.636349400 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: PyYAML
-Version: 6.0.3
+Version: 6.0.4
 Summary: YAML parser and emitter for Python
 Home-page: https://pyyaml.org/
 Download-URL: https://pypi.org/project/PyYAML/
@@ -20,18 +20,17 @@
 Classifier: Programming Language :: Cython
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.8
-Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3.11
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3.13
 Classifier: Programming Language :: Python :: 3.14
+Classifier: Programming Language :: Python :: 3.15
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Topic :: Text Processing :: Markup
-Requires-Python: >=3.8
+Requires-Python: >=3.10
 License-File: LICENSE
 Dynamic: author
 Dynamic: author-email
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyyaml-6.0.3/lib/PyYAML.egg-info/PKG-INFO 
new/pyyaml-6.0.4/lib/PyYAML.egg-info/PKG-INFO
--- old/pyyaml-6.0.3/lib/PyYAML.egg-info/PKG-INFO       2025-09-25 
23:11:28.000000000 +0200
+++ new/pyyaml-6.0.4/lib/PyYAML.egg-info/PKG-INFO       2026-11-21 
00:14:02.562041500 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: PyYAML
-Version: 6.0.3
+Version: 6.0.4
 Summary: YAML parser and emitter for Python
 Home-page: https://pyyaml.org/
 Download-URL: https://pypi.org/project/PyYAML/
@@ -20,18 +20,17 @@
 Classifier: Programming Language :: Cython
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.8
-Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3.11
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3.13
 Classifier: Programming Language :: Python :: 3.14
+Classifier: Programming Language :: Python :: 3.15
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Topic :: Text Processing :: Markup
-Requires-Python: >=3.8
+Requires-Python: >=3.10
 License-File: LICENSE
 Dynamic: author
 Dynamic: author-email
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyyaml-6.0.3/lib/PyYAML.egg-info/SOURCES.txt 
new/pyyaml-6.0.4/lib/PyYAML.egg-info/SOURCES.txt
--- old/pyyaml-6.0.3/lib/PyYAML.egg-info/SOURCES.txt    2025-09-25 
23:11:28.000000000 +0200
+++ new/pyyaml-6.0.4/lib/PyYAML.egg-info/SOURCES.txt    2026-11-21 
00:14:02.584037000 +0100
@@ -32,9 +32,11 @@
 lib/yaml/serializer.py
 lib/yaml/tokens.py
 packaging/_pyyaml_pep517.py
-packaging/__pycache__/_pyyaml_pep517.cpython-313.pyc
+packaging/__pycache__/_pyyaml_pep517.cpython-315.pyc
 packaging/build/libyaml.sh
 packaging/build/smoketest.py
+tests/test_libyaml_recursion_control.py
+tests/test_merge.py
 tests/legacy_tests/canonical.py
 tests/legacy_tests/conftest.py
 tests/legacy_tests/test_all.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyyaml-6.0.3/lib/yaml/__init__.py 
new/pyyaml-6.0.4/lib/yaml/__init__.py
--- old/pyyaml-6.0.3/lib/yaml/__init__.py       2025-09-25 23:11:23.000000000 
+0200
+++ new/pyyaml-6.0.4/lib/yaml/__init__.py       2026-11-21 00:13:56.152852500 
+0100
@@ -8,7 +8,7 @@
 from .loader import *
 from .dumper import *
 
-__version__ = '6.0.3'
+__version__ = '6.0.4'
 try:
     from .cyaml import *
     __with_libyaml__ = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyyaml-6.0.3/lib/yaml/constructor.py 
new/pyyaml-6.0.4/lib/yaml/constructor.py
--- old/pyyaml-6.0.3/lib/yaml/constructor.py    2025-09-25 23:11:23.000000000 
+0200
+++ new/pyyaml-6.0.4/lib/yaml/constructor.py    2026-11-21 00:13:56.152969000 
+0100
@@ -179,6 +179,7 @@
 
     def flatten_mapping(self, node):
         merge = []
+        merge_key_ids = set()  # anchor referent node objects should have 
reference equality here
         index = 0
         while index < len(node.value):
             key_node, value_node = node.value[index]
@@ -186,9 +187,11 @@
                 del node.value[index]
                 if isinstance(value_node, MappingNode):
                     self.flatten_mapping(value_node)
-                    merge.extend(value_node.value)
+                    for pair in value_node.value:
+                        if (key_id := id(pair[0].value)) not in merge_key_ids:
+                            merge_key_ids.add(key_id)
+                            merge.append(pair)
                 elif isinstance(value_node, SequenceNode):
-                    submerge = []
                     for subnode in value_node.value:
                         if not isinstance(subnode, MappingNode):
                             raise ConstructorError("while constructing a 
mapping",
@@ -196,10 +199,10 @@
                                     "expected a mapping for merging, but found 
%s"
                                     % subnode.id, subnode.start_mark)
                         self.flatten_mapping(subnode)
-                        submerge.append(subnode.value)
-                    submerge.reverse()
-                    for value in submerge:
-                        merge.extend(value)
+                        for pair in subnode.value:
+                            if (key_id := id(pair[0].value)) not in 
merge_key_ids:
+                                merge_key_ids.add(key_id)
+                                merge.append(pair)
                 else:
                     raise ConstructorError("while constructing a mapping", 
node.start_mark,
                             "expected a mapping or list of mappings for 
merging, but found %s"
Binary files 
old/pyyaml-6.0.3/packaging/__pycache__/_pyyaml_pep517.cpython-313.pyc and 
new/pyyaml-6.0.4/packaging/__pycache__/_pyyaml_pep517.cpython-313.pyc differ
Binary files 
old/pyyaml-6.0.3/packaging/__pycache__/_pyyaml_pep517.cpython-315.pyc and 
new/pyyaml-6.0.4/packaging/__pycache__/_pyyaml_pep517.cpython-315.pyc differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyyaml-6.0.3/packaging/build/libyaml.sh 
new/pyyaml-6.0.4/packaging/build/libyaml.sh
--- old/pyyaml-6.0.3/packaging/build/libyaml.sh 2025-09-25 23:11:23.000000000 
+0200
+++ new/pyyaml-6.0.4/packaging/build/libyaml.sh 2026-11-21 00:13:56.153819800 
+0100
@@ -15,6 +15,8 @@
 if ! command -v prove; then
   if grep -m 1 alpine /etc/os-release; then
     apk add perl-utils
+  elif grep -m 1 AlmaLinux /etc/os-release; then
+    dnf install perl-Test-Harness -y
   else
     echo "prove (perl) testing tool unavailable"
     exit 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyyaml-6.0.3/setup.py new/pyyaml-6.0.4/setup.py
--- old/pyyaml-6.0.3/setup.py   2025-09-25 23:11:23.000000000 +0200
+++ new/pyyaml-6.0.4/setup.py   2026-11-21 00:13:56.153860600 +0100
@@ -1,6 +1,6 @@
 
 NAME = 'PyYAML'
-VERSION = '6.0.3'
+VERSION = '6.0.4'
 DESCRIPTION = "YAML parser and emitter for Python"
 LONG_DESCRIPTION = """\
 YAML is a data serialization format designed for human readability
@@ -28,13 +28,12 @@
     "Programming Language :: Cython",
     "Programming Language :: Python",
     "Programming Language :: Python :: 3",
-    "Programming Language :: Python :: 3.8",
-    "Programming Language :: Python :: 3.9",
     "Programming Language :: Python :: 3.10",
     "Programming Language :: Python :: 3.11",
     "Programming Language :: Python :: 3.12",
     "Programming Language :: Python :: 3.13",
     "Programming Language :: Python :: 3.14",
+    "Programming Language :: Python :: 3.15",
     "Programming Language :: Python :: Implementation :: CPython",
     "Programming Language :: Python :: Implementation :: PyPy",
     "Topic :: Software Development :: Libraries :: Python Modules",
@@ -355,5 +354,5 @@
 
         distclass=Distribution,
         cmdclass=cmdclass,
-        python_requires='>=3.8',
+        python_requires='>=3.10',
     )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyyaml-6.0.3/tests/legacy_tests/data/construct-merge.code 
new/pyyaml-6.0.4/tests/legacy_tests/data/construct-merge.code
--- old/pyyaml-6.0.3/tests/legacy_tests/data/construct-merge.code       
2025-09-25 23:11:23.000000000 +0200
+++ new/pyyaml-6.0.4/tests/legacy_tests/data/construct-merge.code       
2026-11-21 00:13:56.154124700 +0100
@@ -7,4 +7,6 @@
     { "x": 1, "y": 2, "r": 10, "label": "center/big" },
     { "x": 1, "y": 2, "r": 10, "label": "center/big" },
     { "x": 1, "y": 2, "r": 10, "label": "center/big" },
+    { "x": 1, "y": 2, "r": 10, "label": "center/big" },
+    { "x": 1, "y": 2, "r": 10, "label": "center/big" },
 ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyyaml-6.0.3/tests/legacy_tests/data/construct-merge.data 
new/pyyaml-6.0.4/tests/legacy_tests/data/construct-merge.data
--- old/pyyaml-6.0.3/tests/legacy_tests/data/construct-merge.data       
2025-09-25 23:11:23.000000000 +0200
+++ new/pyyaml-6.0.4/tests/legacy_tests/data/construct-merge.data       
2026-11-21 00:13:56.154124700 +0100
@@ -25,3 +25,14 @@
   << : [ *BIG, *LEFT, *SMALL ]
   x: 1
   label: center/big
+
+- # Duplicate sequence merge
+  << : [ *CENTER, *CENTER ]
+  r: 10
+  label: center/big
+
+- # Duplicate direct merge
+  << : *CENTER
+  << : *CENTER
+  r: 10
+  label: center/big
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyyaml-6.0.3/tests/test_libyaml_recursion_control.py 
new/pyyaml-6.0.4/tests/test_libyaml_recursion_control.py
--- old/pyyaml-6.0.3/tests/test_libyaml_recursion_control.py    1970-01-01 
01:00:00.000000000 +0100
+++ new/pyyaml-6.0.4/tests/test_libyaml_recursion_control.py    2026-11-21 
00:13:56.166666700 +0100
@@ -0,0 +1,52 @@
+from __future__ import annotations
+
+import pytest
+import yaml
+
+try:
+    HAS_LIBYAML = yaml._yaml and yaml.cyaml
+    HAS_LIBYAML_RECURSION_CONTROL = yaml._yaml._get_max_nest_level() != -1
+except AttributeError:
+    HAS_LIBYAML = False
+    HAS_LIBYAML_RECURSION_CONTROL = False
+
+
+pytestmark = pytest.mark.skipif(not HAS_LIBYAML, reason="libyaml extension 
unavailable")
+
+def test_recursion_controls() -> None:
+    """Validate libyaml recursion control behavior."""
+    default_max = yaml._yaml._get_max_nest_level()
+    try:
+        yaml._yaml._set_max_nest_level(42)
+
+        if HAS_LIBYAML_RECURSION_CONTROL:
+            assert default_max > 100
+            assert yaml._yaml._get_max_nest_level() == 42
+        else:
+            # libyaml is missing the recursion control feature; setter should 
no-op, getter always returns -1
+            assert default_max == -1
+            assert yaml._yaml._get_max_nest_level() == default_max
+    finally:
+        # always restore the default since it's global
+        yaml._yaml._set_max_nest_level(default_max)
+
+
[email protected]("loader", [yaml.CLoader, yaml.CBaseLoader, 
yaml.CSafeLoader, yaml.CFullLoader, yaml.CUnsafeLoader])
[email protected]("ch", [('[', ']'), ('{', '}')])
[email protected](not HAS_LIBYAML_RECURSION_CONTROL, reason="libyaml 
recursion control feature unavailable")
+def test_recursion_depth_exceeded(loader: yaml.cyaml.CParser, ch: tuple[str, 
str]) -> None:
+    default_max = yaml._yaml._get_max_nest_level()
+
+    try:
+        maxdepth = 5
+        yaml._yaml._set_max_nest_level(maxdepth)
+        assert yaml._yaml._get_max_nest_level() == maxdepth
+
+        data = (ch[0] * (maxdepth + 2)) + "blah" + (ch[1] * (maxdepth + 2))
+
+        with pytest.raises(yaml.scanner.ScannerError, match="exceeded maximum 
nesting depth"):
+            yaml.load(data, Loader=loader)
+
+    finally:
+        # always restore the default since it's global
+        yaml._yaml._set_max_nest_level(default_max)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyyaml-6.0.3/tests/test_merge.py 
new/pyyaml-6.0.4/tests/test_merge.py
--- old/pyyaml-6.0.3/tests/test_merge.py        1970-01-01 01:00:00.000000000 
+0100
+++ new/pyyaml-6.0.4/tests/test_merge.py        2026-11-21 00:13:56.166666700 
+0100
@@ -0,0 +1,110 @@
+import pytest
+
+import yaml
+
+
+def loader_classes():
+    classes = [yaml.SafeLoader]
+    if hasattr(yaml, "CSafeLoader"):
+        classes.append(yaml.CSafeLoader)
+    return classes
+
+
+def flatten_mapping_keys(source, name, Loader):
+    loader = Loader(source)
+    try:
+        root = loader.get_single_node()
+        for key_node, value_node in root.value:
+            if key_node.value == name:
+                loader.flatten_mapping(value_node)
+                return [key_node.value for key_node, value_node in 
value_node.value]
+        raise AssertionError("mapping %r was not found" % name)
+    finally:
+        loader.dispose()
+
+
+def merge_fanout_source(levels, width):
+    lines = [
+        "n0: &n0 {%s}" % ", ".join(
+            "k%s: %s" % (index, index) for index in range(width)
+        )
+    ]
+    previous = "n0"
+    for level in range(1, levels+1):
+        prefix = chr(ord("a") + level - 1)
+        aliases = []
+        for index in range(width):
+            name = "%s%s" % (prefix, index)
+            lines.append("%s: &%s {<<: *%s}" % (name, name, previous))
+            aliases.append("*%s" % name)
+        current = "n%s" % level
+        lines.append("%s: &%s {<<: [%s]}" % (current, current, 
",".join(aliases)))
+        previous = current
+    lines.append("root: {<<: *%s}" % previous)
+    return "\n".join(lines)
+
+
[email protected]("Loader", loader_classes())
+def test_flatten_mapping_skips_duplicate_sequence_merge_nodes(Loader):
+    keys = flatten_mapping_keys(
+        """
+base: &base {x: 1, y: 2}
+target:
+  <<: [*base, *base]
+  z: 3
+""",
+        "target",
+        Loader,
+    )
+
+    assert keys == ["x", "y", "z"]
+
+
[email protected]("Loader", loader_classes())
+def test_flatten_mapping_skips_duplicate_direct_merge_nodes(Loader):
+    keys = flatten_mapping_keys(
+        """
+base: &base {x: 1, y: 2}
+target:
+  <<: *base
+  <<: *base
+  z: 3
+""",
+        "target",
+        Loader,
+    )
+
+    assert keys == ["x", "y", "z"]
+
+
[email protected]("Loader", loader_classes())
+def test_flatten_mapping_skips_nested_duplicate_merge_nodes(Loader):
+    keys = flatten_mapping_keys(
+        """
+a0: &a0 {k0: 0}
+a1: &a1
+  <<: [*a0, *a0]
+  k1: 1
+a2: &a2
+  <<: [*a1, *a1]
+  k2: 2
+target:
+  <<: [*a2, *a2]
+  k3: 3
+""",
+        "target",
+        Loader,
+    )
+
+    assert keys == ["k0", "k1", "k2", "k3"]
+
+
[email protected]("Loader", loader_classes())
+def test_flatten_mapping_deduplicates_fanout_merge_keys(Loader):
+    keys = flatten_mapping_keys(
+        merge_fanout_source(levels=4, width=4),
+        "root",
+        Loader,
+    )
+
+    assert keys == ["k0", "k1", "k2", "k3"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyyaml-6.0.3/yaml/_yaml.pxd 
new/pyyaml-6.0.4/yaml/_yaml.pxd
--- old/pyyaml-6.0.3/yaml/_yaml.pxd     2025-09-25 23:11:23.000000000 +0200
+++ new/pyyaml-6.0.4/yaml/_yaml.pxd     2026-11-21 00:13:56.168405000 +0100
@@ -256,3 +256,13 @@
     int yaml_emitter_emit(yaml_emitter_t *emitter, yaml_event_t *event) except 
*
     int yaml_emitter_flush(yaml_emitter_t *emitter)
 
+
+cdef extern from "_yaml.h":
+    """
+    #ifndef LIBYAML_FEATURE_NEST_DEPTH_CONTROL
+        static inline int yaml_get_max_nest_level() { return -1; }
+        static inline void yaml_set_max_nest_level(int value) { }
+    #endif
+    """
+    int yaml_get_max_nest_level()
+    void yaml_set_max_nest_level(int value)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyyaml-6.0.3/yaml/_yaml.pyx 
new/pyyaml-6.0.4/yaml/_yaml.pyx
--- old/pyyaml-6.0.3/yaml/_yaml.pyx     2025-09-25 23:11:23.000000000 +0200
+++ new/pyyaml-6.0.4/yaml/_yaml.pyx     2026-11-21 00:13:56.168405000 +0100
@@ -59,6 +59,12 @@
 SequenceNode = yaml.nodes.SequenceNode
 MappingNode = yaml.nodes.MappingNode
 
+_get_max_nest_level = yaml_get_max_nest_level
+"""Retrieve current libyaml maximum recursion depth; returns -1 if the libyaml 
feature is unavailable."""
+
+_set_max_nest_level = yaml_set_max_nest_level
+"""Set libyaml maximum recursion depth. Modifications to this value will 
affect all libyaml parsers in the process and are not thread-safe; use with 
caution."""
+
 cdef class Mark:
     cdef readonly object name
     cdef readonly size_t index

Reply via email to