Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-ftfy for openSUSE:Factory 
checked in at 2024-01-18 21:53:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ftfy (Old)
 and      /work/SRC/openSUSE:Factory/.python-ftfy.new.16006 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-ftfy"

Thu Jan 18 21:53:50 2024 rev:9 rq:1139687 version:6.0.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ftfy/python-ftfy.changes  2022-01-17 
00:22:48.332190937 +0100
+++ /work/SRC/openSUSE:Factory/.python-ftfy.new.16006/python-ftfy.changes       
2024-01-18 21:54:33.531279375 +0100
@@ -1,0 +2,6 @@
+Thu Jan 18 11:16:51 UTC 2024 - Daniel Garcia <daniel.gar...@suse.com>
+
+- Add update-wcwidth.patch to make it work with newer wcwidth,
+  gh#rspeer/python-ftfy@5d975c6bb183
+
+-------------------------------------------------------------------

New:
----
  update-wcwidth.patch

BETA DEBUG BEGIN:
  New:
- Add update-wcwidth.patch to make it work with newer wcwidth,
  gh#rspeer/python-ftfy@5d975c6bb183
BETA DEBUG END:

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

Other differences:
------------------
++++++ python-ftfy.spec ++++++
--- /var/tmp/diff_new_pack.MY4nSI/_old  2024-01-18 21:54:34.479313803 +0100
+++ /var/tmp/diff_new_pack.MY4nSI/_new  2024-01-18 21:54:34.479313803 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-ftfy
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,6 @@
 #
 
 
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define         skip_python2 1
 Name:           python-ftfy
 Version:        6.0.3
@@ -25,7 +24,11 @@
 License:        MIT
 URL:            https://github.com/rspeer/python-ftfy
 Source:         
https://github.com/rspeer/python-ftfy/archive/refs/tags/v%{version}.tar.gz
+# PATCH-FIX-UPSTREAM update-wcwidth.patch gh#rspeer/python-ftfy@5d975c6bb183
+Patch1:         update-wcwidth.patch
+BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-wcwidth
@@ -43,13 +46,13 @@
 put through an encode/decode cycle with different encodings.
 
 %prep
-%setup -q -n python-ftfy-%{version}
+%autosetup -p1 -n python-ftfy-%{version}
 
 %build
-%python_build
+%pyproject_wheel
 
 %install
-%python_install
+%pyproject_install
 %python_clone -a %{buildroot}%{_bindir}/ftfy
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
@@ -71,5 +74,6 @@
 %doc CHANGELOG.md README.md
 %license LICENSE.txt
 %python_alternative %{_bindir}/ftfy
-%{python_sitelib}/*
+%{python_sitelib}/ftfy
+%{python_sitelib}/ftfy-%{version}*-info
 

++++++ update-wcwidth.patch ++++++
>From 5d975c6bb1836d4a1abf0e44675a08f1a9321be9 Mon Sep 17 00:00:00 2001
From: Elia Robyn Lake <el...@ec.ai>
Date: Tue, 21 Nov 2023 18:40:17 -0500
Subject: [PATCH] update wcwidth

---
 ftfy/formatting.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: python-ftfy-6.0.3/ftfy/formatting.py
===================================================================
--- python-ftfy-6.0.3.orig/ftfy/formatting.py
+++ python-ftfy-6.0.3/ftfy/formatting.py
@@ -28,7 +28,7 @@ def character_width(char: str) -> int:
     >>> character_width('\n')
     -1
     """
-    return wcwidth(char)
+    return int(wcwidth(char))
 
 
 def monospaced_width(text: str) -> int:
@@ -47,7 +47,7 @@ def monospaced_width(text: str) -> int:
     >>> len('ちゃぶ台返し')
     6
     >>> monospaced_width('owl\N{SOFT HYPHEN}flavored')
-    12
+    11
     >>> monospaced_width('example\x80')
     -1
 
@@ -70,7 +70,7 @@ def monospaced_width(text: str) -> int:
     #
     # Remove terminal escapes before calculating width, because if they are
     # displayed as intended, they will have zero width.
-    return wcswidth(remove_terminal_escapes(normalize('NFC', text)))
+    return int(wcswidth(remove_terminal_escapes(normalize("NFC", text))))
 
 
 def display_ljust(text, width, fillchar=' '):

Reply via email to