Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pytest-examples for 
openSUSE:Factory checked in at 2026-09-16 17:40:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-examples (Old)
 and      /work/SRC/openSUSE:Factory/.python-pytest-examples.new.383539 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytest-examples"

Wed Sep 16 17:40:59 2026 rev:14 rq:1378157 version:0.0.18

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-pytest-examples/python-pytest-examples.changes
    2026-08-01 18:28:20.973787671 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-pytest-examples.new.383539/python-pytest-examples.changes
        2026-09-16 17:41:40.453374112 +0200
@@ -1,0 +2,8 @@
+Tue Sep 15 11:34:18 UTC 2026 - Daniel Garcia <[email protected]>
+
+- Make it compatible with python3.14 and pytest 9.1
+- Add upstream patches:
+  * python314.patch gh#pydantic/pytest-examples#67
+  * 0001-Make-compatible-with-pytest-9.1.patch gh#pydantic/pytest-examples#79
+
+-------------------------------------------------------------------

New:
----
  0001-Make-compatible-with-pytest-9.1.patch
  python314.patch

----------(New B)----------
  New:  * python314.patch gh#pydantic/pytest-examples#67
  * 0001-Make-compatible-with-pytest-9.1.patch gh#pydantic/pytest-examples#79
  New:- Add upstream patches:
  * python314.patch gh#pydantic/pytest-examples#67
  * 0001-Make-compatible-with-pytest-9.1.patch gh#pydantic/pytest-examples#79
----------(New E)----------

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

Other differences:
------------------
++++++ python-pytest-examples.spec ++++++
--- /var/tmp/diff_new_pack.8YcyCh/_old  2026-09-16 17:41:41.340411176 +0200
+++ /var/tmp/diff_new_pack.8YcyCh/_new  2026-09-16 17:41:41.342411259 +0200
@@ -26,6 +26,10 @@
 Source:         
https://files.pythonhosted.org/packages/source/p/pytest-examples/pytest_examples-%{version}.tar.gz
 # PATCH-FIX-UPSTREAM gh#pydantic/pytest-examples#68 Bump Ruff to 0.12.9, 
update regexes for new output rendering
 Patch0:         ruff.patch
+# PATCH-FIX-UPSTREAM python314.patch gh#pydantic/pytest-examples#67
+Patch1:         python314.patch
+# PATCH-FIX-UPSTREAM 0001-Make-compatible-with-pytest-9.1.patch 
gh#pydantic/pytest-examples#79
+Patch2:         0001-Make-compatible-with-pytest-9.1.patch
 BuildRequires:  %{python_module black}
 BuildRequires:  %{python_module hatchling}
 BuildRequires:  %{python_module pip}

++++++ 0001-Make-compatible-with-pytest-9.1.patch ++++++
>From 6498d54dca4ed35161c89a655fa03a7c962b1e07 Mon Sep 17 00:00:00 2001
From: Daniel Garcia Moreno <[email protected]>
Date: Tue, 15 Sep 2026 13:16:35 +0200
Subject: [PATCH] Make compatible with pytest 9.1

The use of generators in parametrize is deprecated. This patch just
convert generators find_examples and find_cases to plain list.

https://docs.pytest.org/en/stable/deprecations.html#non-collection-iterables-in-pytest-mark-parametrize
---
 pytest_examples/find_examples.py  | 19 ++++++++++++-------
 tests/test_update_examples_dir.py |  4 +++-
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/pytest_examples/find_examples.py b/pytest_examples/find_examples.py
index 123bb8d..657ea18 100644
--- a/pytest_examples/find_examples.py
+++ b/pytest_examples/find_examples.py
@@ -2,7 +2,6 @@ from __future__ import annotations as _annotations
 
 import re
 import shlex
-from collections.abc import Iterable
 from dataclasses import dataclass
 from pathlib import Path
 from textwrap import dedent
@@ -106,15 +105,16 @@ class CodeExample:
         return f'{path}:{self.start_line}-{self.end_line}'
 
 
-def find_examples(*paths: str | Path, skip: bool = False) -> 
Iterable[CodeExample]:
+def find_examples(*paths: str | Path, skip: bool = False) -> list[CodeExample]:
     """Find Python code examples in markdown files and python file docstrings.
 
     :param paths: Directories or files to search for examples in.
     :param skip: Whether to exit early and not search for examples, useful 
when running on windows where search fails.
     :return: A generator of `CodeExample` objects.
     """
+    examples = []
     if skip:
-        return
+        return []
 
     for s in paths:
         path = Path(s)
@@ -133,17 +133,20 @@ def find_examples(*paths: str | Path, skip: bool = False) 
-> Iterable[CodeExampl
                     start_line = code[: m_docstring.start()].count('\n')
                     docstring = m_docstring.group(3)
                     index_offset = m_docstring.start() + 
len(m_docstring.group(1)) + len(m_docstring.group(2))
-                    yield from _extract_code_chunks(
+                    examples += _extract_code_chunks(
                         path, docstring, group, line_offset=start_line, 
index_offset=index_offset
                     )
             elif path.suffix == '.md':
                 code = path.read_text('utf-8')
-                yield from _extract_code_chunks(path, code, group)
+                examples += _extract_code_chunks(path, code, group)
+
+    return examples
 
 
 def _extract_code_chunks(
     path: Path, text: str, group: UUID, *, line_offset: int = 0, index_offset: 
int = 0
-) -> Iterable[CodeExample]:
+) -> list[CodeExample]:
+    examples = []
     for m_code in re.finditer(r'(^ *```)( *)(.*?)\n(.+?)\1', text, flags=re.M 
| re.S):
         group1, group2, prefix, source = m_code.groups()
         prefix = prefix.lower()
@@ -152,7 +155,7 @@ def _extract_code_chunks(
             source_dedent, indent = remove_indent(source)
             # 1 for the newline
             start_index = index_offset + m_code.start() + len(group1) + 
len(group2) + len(prefix) + 1
-            yield CodeExample(
+            ex = CodeExample(
                 source=source_dedent,
                 path=path,
                 start_line=start_line,
@@ -163,6 +166,8 @@ def _extract_code_chunks(
                 indent=indent,
                 group=group,
             )
+            examples.append(ex)
+    return examples
 
 
 def remove_indent(text: str) -> tuple[str, int]:
diff --git a/tests/test_update_examples_dir.py 
b/tests/test_update_examples_dir.py
index 9f9e8a5..7b875d7 100644
--- a/tests/test_update_examples_dir.py
+++ b/tests/test_update_examples_dir.py
@@ -5,6 +5,7 @@ import pytest
 
 
 def find_cases():
+    cases = []
     root_dir = Path(__file__).parent / 'cases_update'
     for f in root_dir.iterdir():
         if not f.is_file():
@@ -30,7 +31,8 @@ def find_cases():
                 m = re.search(r'^```.*?^(.+?)^```', test, flags=re.M | re.S)
                 if m:
                     test = m.group(1)
-            yield pytest.param(f, example, output, test, test_count, id=f.name)
+            cases.append(pytest.param(f, example, output, test, test_count, 
id=f.name))
+    return cases
 
 
 @pytest.mark.parametrize('file_path,example,output,test_code,test_count', 
find_cases())
-- 
2.55.0


++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.8YcyCh/_old  2026-09-16 17:41:41.399413641 +0200
+++ /var/tmp/diff_new_pack.8YcyCh/_new  2026-09-16 17:41:41.403413808 +0200
@@ -1,6 +1,6 @@
-mtime: 1785205658
-commit: 729501ac4b42be55c91655174df7f897e3b3ee82dcb2c4c14698e83737355052
+mtime: 1789472325
+commit: 152dc8fdff9726c9478191cea19662667d69aa7ab82732b1918aa079852bdc74
 url: https://src.opensuse.org/python-pytest/python-pytest-examples
-revision: 729501ac4b42be55c91655174df7f897e3b3ee82dcb2c4c14698e83737355052
+revision: 152dc8fdff9726c9478191cea19662667d69aa7ab82732b1918aa079852bdc74
 projectscmsync: https://src.opensuse.org/python-pytest/_ObsPrj.git
 

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-09-15 13:38:45.000000000 +0200
@@ -0,0 +1 @@
+.osc

++++++ python314.patch ++++++
Index: pytest_examples-0.0.18/pytest_examples/eval_example.py
===================================================================
--- pytest_examples-0.0.18.orig/pytest_examples/eval_example.py
+++ pytest_examples-0.0.18/pytest_examples/eval_example.py
@@ -1,7 +1,8 @@
 from __future__ import annotations as _annotations
 
+from collections.abc import Callable
 from pathlib import Path
-from typing import TYPE_CHECKING, Any, Callable
+from typing import TYPE_CHECKING, Any
 
 import pytest
 from _pytest.assertion.rewrite import AssertionRewritingHook
Index: pytest_examples-0.0.18/pytest_examples/run_code.py
===================================================================
--- pytest_examples-0.0.18.orig/pytest_examples/run_code.py
+++ pytest_examples-0.0.18/pytest_examples/run_code.py
@@ -7,12 +7,12 @@ import importlib.util
 import inspect
 import re
 import sys
-from collections.abc import Sequence
+from collections.abc import Callable, Sequence
 from dataclasses import dataclass
 from importlib.abc import Loader
 from pathlib import Path
 from textwrap import indent
-from typing import TYPE_CHECKING, Any, Callable
+from typing import TYPE_CHECKING, Any
 from unittest.mock import patch
 
 import pytest
@@ -27,7 +27,7 @@ if TYPE_CHECKING:
 
 __all__ = 'run_code', 'InsertPrintStatements', 'IncludePrint'
 
-parent_frame_id = 4 if sys.version_info >= (3, 8) else 3
+parent_frame_id = 4
 IncludePrint = Callable[[Path, inspect.FrameInfo, Sequence[Any]], bool]
 
 
Index: pytest_examples-0.0.18/tests/test_run_examples.py
===================================================================
--- pytest_examples-0.0.18.orig/tests/test_run_examples.py
+++ pytest_examples-0.0.18/tests/test_run_examples.py
@@ -1,5 +1,4 @@
 import re
-import sys
 
 import pytest
 
@@ -16,7 +15,6 @@ def test_find_run_examples(example: Code
 """
 
 
[email protected](sys.version_info < (3, 8), reason='traceback different on 
3.7')
 def test_run_example_ok_fail(pytester: pytest.Pytester):
     pytester.makefile(
         '.md',
@@ -259,7 +257,6 @@ def test_find_run_examples(example: Code
     ]
 
 
[email protected](sys.version_info < (3, 8), reason='traceback different on 
3.7')
 def test_run_directly(tmp_path, eval_example):
     # language=Python
     python_code = """\

Reply via email to