public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Filipe Rosset <rosset.filipe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-translitcodec] rawhide: Fix F45FTBS + spec cleanup and modernization
Date: Mon, 03 Aug 2026 21:53:49 GMT [thread overview]
Message-ID: <178579402924.1.7018340577361133686.rpms-python-translitcodec-72e17d251318@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-translitcodec
Branch : rawhide
Commit : 72e17d251318108eaa71001b060ec9d55a774a03
Author : Filipe Rosset <rosset.filipe@gmail.com>
Date : 2026-07-29T13:05:20-03:00
Stats : +69/-9 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-translitcodec/c/72e17d251318108eaa71001b060ec9d55a774a03?branch=rawhide
Log:
Fix F45FTBS + spec cleanup and modernization
Resolves: rhbz#2378287
Resolves: rhbz#2414561
---
diff --git a/python-translitcodec.spec b/python-translitcodec.spec
index bcb2e13..7fa2b78 100644
--- a/python-translitcodec.spec
+++ b/python-translitcodec.spec
@@ -8,10 +8,13 @@ Summary: Unicode to 8-bit charset transliteration codec
License: MIT
URL: http://pypi.python.org/pypi/translitcodec/
Source0: %{pypi_source}
+
+# Fix unknown encoding LookupError with Python 3.15
+# https://github.com/claudep/translitcodec/pull/7
+Patch0: translitcodec-python315.patch
BuildArch: noarch
BuildRequires: python3-devel
-BuildRequires: python3dist(setuptools)
BuildRequires: python3dist(pytest)
%description
@@ -22,7 +25,6 @@ Best-effort representations using smaller coded character sets
%package -n python3-%{pypi_name}
Summary: %{summary}
-%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name}
Best-effort representations using smaller coded character sets
@@ -30,21 +32,23 @@ Best-effort representations using smaller coded character sets
%prep
-%autosetup -n %{pypi_name}-%{version}
+%autosetup -p1 -n %{pypi_name}-%{version}
+
+%generate_buildrequires
+%pyproject_buildrequires
%build
-%py3_build
+%pyproject_wheel
%install
-%py3_install
+%pyproject_install
+%pyproject_save_files -l %{pypi_name}
%check
+%pyproject_check_import
%pytest
-%files -n python3-%{pypi_name}
-%license LICENSE
-%{python3_sitelib}/%{pypi_name}
-%{python3_sitelib}/%{pypi_name}-*.egg-info/
+%files -n python3-%{pypi_name} -f %{pyproject_files}
%changelog
%autochangelog
diff --git a/translitcodec-python315.patch b/translitcodec-python315.patch
new file mode 100644
index 0000000..e8aff9e
--- /dev/null
+++ b/translitcodec-python315.patch
@@ -0,0 +1,56 @@
+--- a/translitcodec/__init__.py
++++ b/translitcodec/__init__.py
+@@ -196,30 +196,32 @@
+ # translit/one
+ # translit/short/ascii
+
+- delim = '/'
+- if sys.version_info > (3, 9):
++ if encoding.startswith('translit/'):
++ delim = '/'
++ elif encoding.startswith('translit_'):
+ delim = '_'
++ else:
++ return None
+
+- 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
++ 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)
++ 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 other threads:[~2026-08-03 21:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178579402924.1.7018340577361133686.rpms-python-translitcodec-72e17d251318@fedoraproject.org \
--to=rosset.filipe@gmail.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox