Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-rstcheck for openSUSE:Factory 
checked in at 2025-05-22 16:56:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-rstcheck (Old)
 and      /work/SRC/openSUSE:Factory/.python-rstcheck.new.2732 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-rstcheck"

Thu May 22 16:56:30 2025 rev:9 rq:1279039 version:6.2.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-rstcheck/python-rstcheck.changes  
2024-09-09 14:45:21.448978491 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-rstcheck.new.2732/python-rstcheck.changes    
    2025-05-22 16:56:49.405793623 +0200
@@ -1,0 +2,6 @@
+Wed May 21 11:59:21 UTC 2025 - Steve Kowalik <steven.kowa...@suse.com>
+
+- Add patch support-click-8.2.patch:
+  * Support click 8.2 changes.
+
+-------------------------------------------------------------------

New:
----
  support-click-8.2.patch

BETA DEBUG BEGIN:
  New:
- Add patch support-click-8.2.patch:
  * Support click 8.2 changes.
BETA DEBUG END:

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

Other differences:
------------------
++++++ python-rstcheck.spec ++++++
--- /var/tmp/diff_new_pack.RBriXJ/_old  2025-05-22 16:56:49.897814330 +0200
+++ /var/tmp/diff_new_pack.RBriXJ/_new  2025-05-22 16:56:49.897814330 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-rstcheck
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -23,6 +23,8 @@
 License:        MIT
 URL:            https://github.com/myint/rstcheck
 Source:         
https://files.pythonhosted.org/packages/source/r/rstcheck/rstcheck-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM gh#rstcheck/rstcheck#244
+Patch0:         support-click-8.2.patch
 BuildRequires:  %{python_module Sphinx}
 BuildRequires:  %{python_module base >= 3.8}
 BuildRequires:  %{python_module pip}

++++++ support-click-8.2.patch ++++++
>From 045ba995bdb9e405e162fc6b2999ecdc481a15df Mon Sep 17 00:00:00 2001
From: Steve Kowalik <ste...@wedontsleep.org>
Date: Wed, 21 May 2025 13:49:19 +0200
Subject: [PATCH] Support click 8.2

While typer does not yet support click 8.2, it is coming with breaking
changes. Support those changes by switching to checking the output
instead of stdout, and for one testcase, support both Click 8.1 and 8.2
so it doesn't break with either version installed.
---
 tests/integration_tests/cli_test.py | 47 +++++++++++++++++------------
 tests/integration_tests/conftest.py |  2 +-
 2 files changed, 28 insertions(+), 21 deletions(-)

diff --git a/tests/integration_tests/cli_test.py 
b/tests/integration_tests/cli_test.py
index c2da7bc1..17d1f99d 100644
--- a/tests/integration_tests/cli_test.py
+++ b/tests/integration_tests/cli_test.py
@@ -2,6 +2,7 @@
 
 from __future__ import annotations
 
+import inspect
 import pathlib
 import re
 import sys
@@ -123,7 +124,7 @@ def test_all_bad_examples(
         result = cli_runner.invoke(cli_app, str(test_file))
 
         assert result.exit_code != 0
-        assert ERROR_CODE_REGEX.search(result.stdout) is not None
+        assert ERROR_CODE_REGEX.search(result.output) is not None
 
     @staticmethod
     def test_all_bad_examples_recurively(
@@ -136,7 +137,7 @@ def test_all_bad_examples_recurively(
         result = cli_runner.invoke(cli_app, [str(test_dir), "--recursive"])
 
         assert result.exit_code != 0
-        assert ERROR_CODE_REGEX.search(result.stdout) is not None
+        assert ERROR_CODE_REGEX.search(result.output) is not None
 
     @staticmethod
     def test_mix_of_good_and_bad_examples(
@@ -150,7 +151,7 @@ def test_mix_of_good_and_bad_examples(
         result = cli_runner.invoke(cli_app, [str(test_file_good), 
str(test_file_bad)])
 
         assert result.exit_code != 0
-        assert len(ERROR_CODE_REGEX.findall(result.stdout)) == 1
+        assert len(ERROR_CODE_REGEX.findall(result.output)) == 1
 
     @staticmethod
     def test_good_example_with_piping(
@@ -178,7 +179,7 @@ def test_bad_example_with_piping(
         result = cli_runner.invoke(cli_app, "-", input=test_file_content)
 
         assert result.exit_code != 0
-        assert len(ERROR_CODE_REGEX.findall(result.stdout)) == 1
+        assert len(ERROR_CODE_REGEX.findall(result.output)) == 1
 
     @staticmethod
     def test_piping_is_not_allowed_with_additional_files(cli_app: typer.Typer) 
-> None:
@@ -186,7 +187,13 @@ def 
test_piping_is_not_allowed_with_additional_files(cli_app: typer.Typer) -> No
 
         Test cli prints error to stderr.
         """
-        cli_runner_divided_output = typer.testing.CliRunner(mix_stderr=False)
+        # This can be dropped to passing no arguments when typer supports
+        # Click 8.2+.
+        params = inspect.signature(typer.testing.CliRunner).parameters
+        kwargs = {}
+        if params.get("mix_stderr"):
+            kwargs["mix_stderr"] = False
+        cli_runner_divided_output = typer.testing.CliRunner(**kwargs)  # 
type:ignore[arg-type]
 
         result = cli_runner_divided_output.invoke(cli_app, ["-", "foo"])
 
@@ -251,7 +258,7 @@ def test_non_matching_ignore_msg_errors(
         result = cli_runner.invoke(cli_app, [str(test_file), 
"--ignore-messages", r"(No match\.$)"])
 
         assert result.exit_code != 0
-        assert "Error! Issues detected." in result.stdout
+        assert "Error! Issues detected." in result.output
 
     @staticmethod
     def test_table_substitution_error_fixed_by_ignore(
@@ -285,7 +292,7 @@ def test_error_without_config_file(
         result = cli_runner.invoke(cli_app, str(test_file))
 
         assert result.exit_code != 0
-        assert len(ERROR_CODE_REGEX.findall(result.stdout)) == 6
+        assert len(ERROR_CODE_REGEX.findall(result.output)) == 6
 
     @staticmethod
     def test_no_error_with_set_ini_config_file(
@@ -342,7 +349,7 @@ def test_file_1_is_bad_without_config(
         result = cli_runner.invoke(cli_app, [str(test_file), "--config", 
str(config_file)])
 
         assert result.exit_code != 0
-        assert len(ERROR_CODE_REGEX.findall(result.stdout)) == 6
+        assert len(ERROR_CODE_REGEX.findall(result.output)) == 6
 
     @staticmethod
     def test_file_2_is_bad_without_config(
@@ -355,7 +362,7 @@ def test_file_2_is_bad_without_config(
         result = cli_runner.invoke(cli_app, [str(test_file), "--config", 
str(config_file)])
 
         assert result.exit_code != 0
-        assert len(ERROR_CODE_REGEX.findall(result.stdout)) == 2
+        assert len(ERROR_CODE_REGEX.findall(result.output)) == 2
 
     @staticmethod
     @pytest.mark.xfail(
@@ -385,7 +392,7 @@ def test_bad_file_2_with_implicit_config_some_errors(
         result = cli_runner.invoke(cli_app, str(test_file))
 
         assert result.exit_code != 0
-        assert len(ERROR_CODE_REGEX.findall(result.stdout)) == 1
+        assert len(ERROR_CODE_REGEX.findall(result.output)) == 1
 
     @staticmethod
     def test_bad_file_1_with_explicit_config_no_errors(
@@ -411,7 +418,7 @@ def test_bad_file_2_with_explicit_config_some_errors(
         result = cli_runner.invoke(cli_app, [str(test_file), "--config", 
str(config_file)])
 
         assert result.exit_code != 0
-        assert len(ERROR_CODE_REGEX.findall(result.stdout)) == 1
+        assert len(ERROR_CODE_REGEX.findall(result.output)) == 1
 
 
 class TestWarningOnUnknownSettings:
@@ -470,7 +477,7 @@ def test_custom_directive_and_role(
         result = cli_runner.invoke(cli_app, str(test_file))
 
         assert result.exit_code != 0
-        assert len(ERROR_CODE_REGEX.findall(result.stdout)) == 4
+        assert len(ERROR_CODE_REGEX.findall(result.output)) == 4
 
     @staticmethod
     def test_custom_directive_and_role_with_ignore(
@@ -556,10 +563,10 @@ def test_bad_example_has_issues(
         result = cli_runner.invoke(cli_app, str(test_file))
 
         assert result.exit_code != 0
-        assert "custom-directive" in result.stdout
-        assert "custom-role" in result.stdout
-        assert "python" in result.stdout
-        assert "unmatched-substitution" in result.stdout
+        assert "custom-directive" in result.output
+        assert "custom-role" in result.output
+        assert "python" in result.output
+        assert "unmatched-substitution" in result.output
 
     @staticmethod
     @pytest.mark.xfail(
@@ -597,7 +604,7 @@ def test_bad_example_has_only_one_issue_pre310(
         result = cli_runner.invoke(cli_app, str(test_file))
 
         assert result.exit_code != 0
-        assert len(re.findall(r"unexpected EOF while parsing", result.stdout)) 
== 1
+        assert len(re.findall(r"unexpected EOF while parsing", result.output)) 
== 1
 
     @staticmethod
     @pytest.mark.xfail(
@@ -616,7 +623,7 @@ def test_bad_example_has_only_one_issue(
         result = cli_runner.invoke(cli_app, str(test_file))
 
         assert result.exit_code != 0
-        assert len(re.findall(r"'\(' was never closed", result.stdout)) == 1
+        assert len(re.findall(r"'\(' was never closed", result.output)) == 1
 
     @staticmethod
     @pytest.mark.xfail(
@@ -635,7 +642,7 @@ def test_nested_bad_example_has_only_one_issue_pre310(
         result = cli_runner.invoke(cli_app, str(test_file))
 
         assert result.exit_code != 0
-        assert len(re.findall(r"unexpected EOF while parsing", result.stdout)) 
== 1
+        assert len(re.findall(r"unexpected EOF while parsing", result.output)) 
== 1
 
     @staticmethod
     @pytest.mark.xfail(
@@ -654,4 +661,4 @@ def test_nested_bad_example_has_only_one_issue(
         result = cli_runner.invoke(cli_app, str(test_file))
 
         assert result.exit_code != 0
-        assert len(re.findall(r"'\(' was never closed", result.stdout)) == 1
+        assert len(re.findall(r"'\(' was never closed", result.output)) == 1
diff --git a/tests/integration_tests/conftest.py 
b/tests/integration_tests/conftest.py
index ddb7684d..a0684547 100644
--- a/tests/integration_tests/conftest.py
+++ b/tests/integration_tests/conftest.py
@@ -22,4 +22,4 @@ def cli_app_fixture() -> typer.Typer:
 @pytest.fixture(name="cli_runner")
 def cli_runner_fixture() -> typer.testing.CliRunner:
     """Create CLI Test Runner."""
-    return typer.testing.CliRunner(mix_stderr=True)
+    return typer.testing.CliRunner()

Reply via email to