Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-translitcodec for 
openSUSE:Factory checked in at 2026-09-17 15:24:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-translitcodec (Old)
 and      /work/SRC/openSUSE:Factory/.python-translitcodec.new.383539 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-translitcodec"

Thu Sep 17 15:24:27 2026 rev:6 rq:1378492 version:0.7.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-translitcodec/python-translitcodec.changes    
    2025-06-04 20:28:53.121808172 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-translitcodec.new.383539/python-translitcodec.changes
    2026-09-17 15:24:36.156022804 +0200
@@ -1,0 +2,6 @@
+Thu Sep 17 01:39:54 UTC 2026 - Steve Kowalik <[email protected]>
+
+- Add patch support-python-315.patch:
+  * Support Python 3.15 codec changes.
+
+-------------------------------------------------------------------

New:
----
  support-python-315.patch

----------(New B)----------
  New:
- Add patch support-python-315.patch:
  * Support Python 3.15 codec changes.
----------(New E)----------

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

Other differences:
------------------
++++++ python-translitcodec.spec ++++++
--- /var/tmp/diff_new_pack.xvi3hL/_old  2026-09-17 15:24:37.555081478 +0200
+++ /var/tmp/diff_new_pack.xvi3hL/_new  2026-09-17 15:24:37.557081562 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-translitcodec
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,15 +16,15 @@
 #
 
 
-%define skip_python2 1
 Name:           python-translitcodec
 Version:        0.7.0
 Release:        0
 Summary:        Unicode to 8-bit charset transliteration codec
 License:        MIT
-Group:          Development/Languages/Python
 URL:            https://github.com/claudep/translitcodec
 Source:         
https://files.pythonhosted.org/packages/source/t/translitcodec/translitcodec-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM gh#claudep/translitcodec#7
+Patch0:         support-python-315.patch
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
@@ -42,7 +42,7 @@
 the ``transtab`` collection by Markus Kuhn.
 
 %prep
-%setup -q -n translitcodec-%{version}
+%autosetup -p1 -n translitcodec-%{version}
 
 %build
 %pyproject_wheel

++++++ support-python-315.patch ++++++
>From c27de1b9f47b939501cda1c3d58857d8fe674651 Mon Sep 17 00:00:00 2001
From: Filipe Rosset <[email protected]>
Date: Wed, 29 Jul 2026 12:56:32 -0300
Subject: [PATCH] Fixes translitcodec-0.7.0 build with Python 3.15

In Python 3.15, codec name lookup normalization behavior was updated.
This broke translitcodec registration logic because it was expecting
the delimiter to be either / or _ and strictly based on a
sys.version_info > (3, 9) condition.

This patch dynamically detects the delimiter (/ or _) used in the
lookup name to ensure it correctly resolves on all Python versions.

Signed-off-by: Filipe Rosset <[email protected]>
---
 translitcodec/__init__.py | 48 ++++++++++++++++++++-------------------
 1 file changed, 25 insertions(+), 23 deletions(-)

diff --git a/translitcodec/__init__.py b/translitcodec/__init__.py
index c8367c3..7613c20 100644
--- a/translitcodec/__init__.py
+++ b/translitcodec/__init__.py
@@ -196,30 +196,32 @@ def trans_search(encoding):
     # translit/one
     # translit/short/ascii
 
-    delim = '/'
-    if sys.version_info > (3, 9):
+    if encoding.startswith('translit/'):
+        delim = '/'
+    elif encoding.startswith('translit_'):
         delim = '_'
-
-    if encoding.startswith('translit' + delim):
-        parts = encoding.split(delim)
-        if parts[1] == 'long':
-            encoder = long_encode
-        elif parts[1] == 'short':
-            encoder = short_encode
-        elif parts[1] == 'one':
-            encoder = single_encode
-        else:
-            return None
-
-        if len(parts) == 2:
-            pass
-        elif len(parts) == 3:
-            byte_enc = parts[2]
-            byte_encoder = codecs.lookup(byte_enc).encode
-            encoder = _double_encoding_factory(encoder, byte_encoder, byte_enc)
-        else:
-            return None
-        return codecs.CodecInfo(encoder, no_decode)
+    else:
+        return None
+
+    parts = encoding.split(delim)
+    if parts[1] == 'long':
+        encoder = long_encode
+    elif parts[1] == 'short':
+        encoder = short_encode
+    elif parts[1] == 'one':
+        encoder = single_encode
+    else:
+        return None
+
+    if len(parts) == 2:
+        pass
+    elif len(parts) == 3:
+        byte_enc = parts[2]
+        byte_encoder = codecs.lookup(byte_enc).encode
+        encoder = _double_encoding_factory(encoder, byte_encoder, byte_enc)
+    else:
+        return None
+    return codecs.CodecInfo(encoder, no_decode)
     return None
 
 codecs.register(trans_search)

Reply via email to