Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-ansiwrap for openSUSE:Factory 
checked in at 2023-03-19 00:32:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ansiwrap (Old)
 and      /work/SRC/openSUSE:Factory/.python-ansiwrap.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-ansiwrap"

Sun Mar 19 00:32:31 2023 rev:2 rq:1072864 version:0.8.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ansiwrap/python-ansiwrap.changes  
2019-05-06 13:26:54.425225699 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-ansiwrap.new.31432/python-ansiwrap.changes   
    2023-03-19 00:33:19.712874037 +0100
@@ -1,0 +2,7 @@
+Sat Mar 18 12:30:50 UTC 2023 - Ben Greiner <c...@bnavigator.de>
+
+- Add ansiwrap-pr18-py311.patch gh#jonathaneunice/ansiwrap#18
+  * Fix test for Python 3.11
+- Clean specfile
+
+-------------------------------------------------------------------

New:
----
  ansiwrap-pr18-py311.patch

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

Other differences:
------------------
++++++ python-ansiwrap.spec ++++++
--- /var/tmp/diff_new_pack.piPBXM/_old  2023-03-19 00:33:20.112875935 +0100
+++ /var/tmp/diff_new_pack.piPBXM/_new  2023-03-19 00:33:20.116875954 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-ansiwrap
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,26 +16,26 @@
 #
 
 
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-ansiwrap
 Version:        0.8.4
 Release:        0
 Summary:        Textwrap, but savvy to ANSI colors and styles
 License:        Apache-2.0
 Group:          Development/Languages/Python
-Url:            https://github.com/jonathaneunice/ansiwrap
+URL:            https://github.com/jonathaneunice/ansiwrap
 Source:         
https://files.pythonhosted.org/packages/source/a/ansiwrap/ansiwrap-%{version}.zip
+# PATCH-FIX-UPSTREAM ansiwrap-pr18-py311.patch gh#jonathaneunice/ansiwrap#18
+Patch0:         ansiwrap-pr18-py311.patch
+BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 BuildRequires:  unzip
 # SECTION test requirements
 BuildRequires:  %{python_module ansicolors >= 1.1.8}
-BuildRequires:  %{python_module coverage}
-BuildRequires:  %{python_module pytest-cov}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module textwrap3}
-BuildRequires:  %{python_module tox}
 # /SECTION
 Requires:       python-textwrap3
 BuildArch:      noarch
@@ -52,23 +52,22 @@
 and display style, they have no logical length.
 
 %prep
-%setup -q -n ansiwrap-%{version}
+%autosetup -p1 -n ansiwrap-%{version}
 
 %build
-%python_build
+%pyproject_wheel
 
 %install
-%python_install
+%pyproject_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
-%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
-py.test-%{$python_bin_suffix}
-}
+%pytest
 
 %files %{python_files}
 %doc AUTHORS CHANGES.yml README.rst
 %license LICENSE.txt
-%{python_sitelib}/*
+%{python_sitelib}/ansiwrap
+%{python_sitelib}/ansiwrap-%{version}.dist-info
 
 %changelog


++++++ ansiwrap-pr18-py311.patch ++++++
>From b7f0149d6063c095da5ccb74afc6262682a9ff92 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <c...@musicinmybrain.net>
Date: Mon, 20 Jun 2022 09:27:40 -0400
Subject: [PATCH] Fix tests on Python 3.11 (fix #18)

random.sample() population must be a sequence
---
 test/test_ansiwrap.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/test_ansiwrap.py b/test/test_ansiwrap.py
index 13e7149..da97f0e 100644
--- a/test/test_ansiwrap.py
+++ b/test/test_ansiwrap.py
@@ -20,8 +20,8 @@
 
 # as an alternative to testing all lengths at all times, which is slow,
 # choose a few other lengths at random
-other_lengths = (random.sample(set(range(20, 120)).difference(LINE_LENGTHS), 
2) +
-                 random.sample(set(range(120, 400)).difference(LINE_LENGTHS), 
1))
+other_lengths = (random.sample(sorted(set(range(20, 
120)).difference(LINE_LENGTHS)), 2) +
+                 random.sample(sorted(set(range(120, 
400)).difference(LINE_LENGTHS)), 1))
 LINE_LENGTHS.extend(other_lengths)
 
 

Reply via email to