Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pytest-subprocess for 
openSUSE:Factory checked in at 2026-11-21 21:45:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-subprocess (Old)
 and      /work/SRC/openSUSE:Factory/.python-pytest-subprocess.new.1340718 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytest-subprocess"

Sat Nov 21 21:45:11 2026 rev:8 rq:1398723 version:1.6.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-pytest-subprocess/python-pytest-subprocess.changes
        2026-05-13 17:18:38.557560797 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-pytest-subprocess.new.1340718/python-pytest-subprocess.changes
   2026-11-21 21:45:45.253479371 +0100
@@ -1,0 +2,5 @@
+Thu Nov 19 13:50:20 UTC 2026 - Markéta Machová <[email protected]>
+
+- Add normalize.patch to fix build with python 3.15
+
+-------------------------------------------------------------------

New:
----
  normalize.patch

----------(New B)----------
  New:
- Add normalize.patch to fix build with python 3.15
----------(New E)----------

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

Other differences:
------------------
++++++ python-pytest-subprocess.spec ++++++
--- /var/tmp/diff_new_pack.Oll5u6/_old  2026-11-21 21:45:46.251521389 +0100
+++ /var/tmp/diff_new_pack.Oll5u6/_new  2026-11-21 21:45:46.254521515 +0100
@@ -24,6 +24,8 @@
 License:        MIT
 URL:            https://github.com/aklajnert/pytest-subprocess
 Source0:        
https://github.com/aklajnert/pytest-subprocess/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}-gh.tar.gz
+# PATCH-FIX-UPSTREAM https://github.com/aklajnert/pytest-subprocess/pull/219 
fix: normalize captured output in every text mode
+Patch0:         normalize.patch
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module wheel}

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.Oll5u6/_old  2026-11-21 21:45:46.310523873 +0100
+++ /var/tmp/diff_new_pack.Oll5u6/_new  2026-11-21 21:45:46.315524083 +0100
@@ -1,6 +1,6 @@
-mtime: 1778552429
-commit: 9440fe7fac923541beb7ffec63255ebf421431db0239dfd80b9c9bed2d6cd919
+mtime: 1795096499
+commit: 9ed4c8887da222d68195822b1e03997a986a14c5e8849f1cc36ba456c2f238f8
 url: https://src.opensuse.org/python-pytest/python-pytest-subprocess
-revision: 9440fe7fac923541beb7ffec63255ebf421431db0239dfd80b9c9bed2d6cd919
+revision: 9ed4c8887da222d68195822b1e03997a986a14c5e8849f1cc36ba456c2f238f8
 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-11-19 14:54:59.000000000 +0100
@@ -0,0 +1 @@
+.osc

++++++ normalize.patch ++++++
>From 2207cd7c63bd03270382d59ae98804d621499fc6 Mon Sep 17 00:00:00 2001
From: Edson Henrique <[email protected]>
Date: Fri, 6 Nov 2026 14:53:53 -0500
Subject: [PATCH] fix: normalize captured output in every text mode (#219)

* fix: normalize captured output in every text mode

* docs: link newline correction to PR 219

* Use native exception formatting in check_call assertions

Retain exact exception type, command, return code and message checks.

* Test normalized decoding for LF and CRLF output lines
---
 changelog.d/bug.7a1b8898.entry.yaml |  5 +++
 pytest_subprocess/fake_popen.py     |  4 +--
 tests/test_output_decoding.py       | 22 +++++++++---
 tests/test_subprocess.py            | 10 +++---
 tests/test_text_newlines.py         | 54 +++++++++++++++++++++++++++++
 5 files changed, 84 insertions(+), 11 deletions(-)
 create mode 100644 changelog.d/bug.7a1b8898.entry.yaml
 create mode 100644 tests/test_text_newlines.py

Index: pytest-subprocess-1.6.0/pytest_subprocess/fake_popen.py
===================================================================
--- pytest-subprocess-1.6.0.orig/pytest_subprocess/fake_popen.py
+++ pytest-subprocess-1.6.0/pytest_subprocess/fake_popen.py
@@ -266,8 +266,8 @@ class FakePopen:
         if isinstance(input, bytes) and self.text_mode:
             input = input.decode()
 
-        if input and self.__universal_newlines and isinstance(input, str):
-            input = input.replace("\r\n", "\n")
+        if input and self.text_mode and isinstance(input, str):
+            input = input.replace("\r\n", "\n").replace("\r", "\n")
 
         if (
             io_base
Index: pytest-subprocess-1.6.0/tests/test_subprocess.py
===================================================================
--- pytest-subprocess-1.6.0.orig/tests/test_subprocess.py
+++ pytest-subprocess-1.6.0/tests/test_subprocess.py
@@ -310,12 +310,11 @@ def test_check_call(fp, fake):
     with pytest.raises(subprocess.CalledProcessError) as exc:
         assert subprocess.check_call((PYTHON, "example_script.py", 
"non-zero")) == 1
 
-    if sys.version_info >= (3, 6):
-        assert (
-            str(exc.value).replace("\\\\", "\\")
-            == f"Command '('{PYTHON}', 'example_script.py', 'non-zero')' "
-            "returned non-zero exit status 1."
-        )
+    command = (PYTHON, "example_script.py", "non-zero")
+    assert type(exc.value) is subprocess.CalledProcessError
+    assert exc.value.returncode == 1
+    assert exc.value.cmd == command
+    assert str(exc.value) == str(subprocess.CalledProcessError(1, command))
 
 
 @pytest.mark.parametrize("fake", [False, True])
Index: pytest-subprocess-1.6.0/tests/test_text_newlines.py
===================================================================
--- /dev/null
+++ pytest-subprocess-1.6.0/tests/test_text_newlines.py
@@ -0,0 +1,54 @@
+import subprocess
+import sys
+
+import pytest
+
+
+def _real_output(options, merge_stderr, _popen=subprocess.Popen):
+    command = [
+        sys.executable,
+        "-c",
+        "import sys; sys.stdout.buffer.write(b'first\\r\\nsecond\\rthird\\n'); 
"
+        "sys.stdout.buffer.flush(); "
+        "sys.stderr.buffer.write(b'error\\r\\nnext\\rlast\\n')",
+    ]
+    with _popen(
+        command,
+        stdout=subprocess.PIPE,
+        stderr=subprocess.STDOUT if merge_stderr else subprocess.PIPE,
+        **options,
+    ) as process:
+        return process.communicate()
+
+
[email protected](
+    "options",
+    [
+        {"text": True},
+        {"universal_newlines": True},
+        {"encoding": "utf-8"},
+        {"errors": "replace"},
+        {"text": False},
+        {"universal_newlines": False},
+    ],
+)
[email protected]("registered_as_text", [False, True])
[email protected]("merge_stderr", [False, True])
+def test_captured_newlines_match_subprocess(
+    fp, options, registered_as_text, merge_stderr
+):
+    expected = _real_output(options, merge_stderr)
+    stdout = b"first\r\nsecond\rthird\n"
+    stderr = b"error\r\nnext\rlast\n"
+    if registered_as_text:
+        stdout = stdout.decode("ascii")
+        stderr = stderr.decode("ascii")
+    fp.register(["command"], stdout=stdout, stderr=stderr)
+    process = subprocess.Popen(
+        ["command"],
+        stdout=subprocess.PIPE,
+        stderr=subprocess.STDOUT if merge_stderr else subprocess.PIPE,
+        **options,
+    )
+
+    assert process.communicate() == expected

Reply via email to