Compare commits

...

No commits in common. "imports/c10s/python-idna-3.7-6.el10" and "c8-stream-3.8" have entirely different histories.

11 changed files with 200 additions and 398 deletions

View File

@ -1 +0,0 @@
1

19
.gitignore vendored
View File

@ -1,18 +1 @@
/idna-1.0.tar.gz
/idna-2.0.tar.gz
/idna-2.1.tar.gz
/idna-2.2.tar.gz
/idna-2.3.tar.gz
/idna-2.4.tar.gz
/idna-2.5.tar.gz
/idna-2.7.tar.gz
/idna-2.8.tar.gz
/idna-2.9.tar.gz
/idna-2.10.tar.gz
/idna-3.0.tar.gz
/idna-3.1.tar.gz
/idna-3.2.tar.gz
/idna-3.3.tar.gz
/idna-3.4.tar.gz
/idna-3.6.tar.gz
/idna-3.7.tar.gz
SOURCES/idna-2.8.tar.gz

1
.python-idna.metadata Normal file
View File

@ -0,0 +1 @@
c1e59def26dac74a2ec53181032df76d40368657 SOURCES/idna-2.8.tar.gz

View File

@ -1,134 +0,0 @@
From 487f90216c00097caa6c5f10eb1f843ec2d8a4b6 Mon Sep 17 00:00:00 2001
From: Kim Davies <kim@cynosure.com.au>
Date: Sun, 10 May 2026 08:47:22 -0700
Subject: [PATCH 1/2] Merge commit from fork
---
idna/core.py | 14 ++++++++++++++
tests/test_idna.py | 13 +++++++++++++
2 files changed, 27 insertions(+)
diff --git a/idna/core.py b/idna/core.py
index 0dae61a..a549326 100644
--- a/idna/core.py
+++ b/idna/core.py
@@ -340,6 +340,15 @@ def encode(s: Union[str, bytes, bytearray], strict: bool = False, uts46: bool =
raise IDNAError('should pass a unicode string to the function rather than a byte string.')
if uts46:
s = uts46_remap(s, std3_rules, transitional)
+
+ # Reject inputs that exceed the maximum DNS domain length up-front.
+ # Each codepoint in a U-label contributes at least one octet to its
+ # A-label form, so any input longer than the domain limit cannot
+ # produce a valid A-domain. Short-circuiting here prevents per-label
+ # validation from being driven into quadratic time
+ if len(s) > 254:
+ raise IDNAError("Domain too long")
+
trailing_dot = False
result = []
if strict:
@@ -373,6 +382,11 @@ def decode(s: Union[str, bytes, bytearray], strict: bool = False, uts46: bool =
raise IDNAError('Invalid ASCII in A-label')
if uts46:
s = uts46_remap(s, std3_rules, False)
+ # See encode() for rationale; the same bound applies because every
+ # legal A-domain is at most 254 octets and every codepoint of a
+ # legal U-domain contributes at least one octet to its A-form.
+ if len(s) > 254:
+ raise IDNAError("Domain too long")
trailing_dot = False
result = []
if not strict:
diff --git a/tests/test_idna.py b/tests/test_idna.py
index 81afb32..5001b48 100755
--- a/tests/test_idna.py
+++ b/tests/test_idna.py
@@ -78,6 +78,19 @@ class IDNATests(unittest.TestCase):
self.assertFalse(idna.valid_label_length('a' * 64))
self.assertRaises(idna.IDNAError, idna.encode, 'a' * 64)
+ def test_oversized_input_rejected_promptly(self):
+ # GHSA-65pc-fj4g-8rjx: encode/decode must reject inputs that
+ # exceed the maximum DNS domain length before per-codepoint
+ # validation runs, so labels dominated by CONTEXTO codepoints
+ # cannot drive validation into quadratic time.
+ import time
+
+ for payload in ("٠" * 8000, "・" * 8000 + "漢"):
+ start = time.perf_counter()
+ self.assertRaises(idna.IDNAError, idna.encode, payload)
+ self.assertRaises(idna.IDNAError, idna.decode, payload)
+ self.assertLess(time.perf_counter() - start, 1.0)
+
def test_check_bidi(self):
l = '\u0061'
From 219662569606146771ac69fac5939d3308159064 Mon Sep 17 00:00:00 2001
From: metsw24-max <metsw24@gmail.com>
Date: Mon, 11 May 2026 20:59:30 +0530
Subject: [PATCH 2/2] Enforce early length limits in check_label
---
idna/core.py | 11 +++++++++++
tests/test_idna.py | 24 ++++++++++++++++++++++++
2 files changed, 35 insertions(+)
diff --git a/idna/core.py b/idna/core.py
index a549326..f863141 100644
--- a/idna/core.py
+++ b/idna/core.py
@@ -230,6 +230,17 @@ def check_label(label: Union[str, bytes, bytearray]) -> None:
label = label.decode('utf-8')
if len(label) == 0:
raise IDNAError('Empty Label')
+ # Reject oversized labels before per-codepoint validation runs.
+ # CONTEXTJ/CONTEXTO checks scan the whole label per codepoint, so an
+ # uncapped label drives validation into quadratic time
+ # (GHSA-65pc-fj4g-8rjx / CVE-2024-3651). encode()/decode() cap the
+ # whole-domain length; this cap protects direct callers of
+ # alabel/ulabel/check_label and the idna2008 incremental codec.
+ # Use the whole-domain bound rather than the per-label DNS bound so
+ # that UTS #46 lenient decoding of labels longer than 63 chars is
+ # preserved.
+ if not valid_string_length(label, trailing_dot=True):
+ raise IDNAError('Label too long')
check_nfc(label)
check_hyphen_ok(label)
diff --git a/tests/test_idna.py b/tests/test_idna.py
index 5001b48..2dc0892 100755
--- a/tests/test_idna.py
+++ b/tests/test_idna.py
@@ -91,6 +91,30 @@ class IDNATests(unittest.TestCase):
self.assertRaises(idna.IDNAError, idna.decode, payload)
self.assertLess(time.perf_counter() - start, 1.0)
+ def test_oversized_label_rejected_promptly(self):
+ # The whole-domain cap in encode()/decode() does not cover direct
+ # callers of alabel/ulabel/check_label, nor the idna2008
+ # incremental codec which calls alabel/ulabel per label. Without a
+ # per-label cap, a single oversized CONTEXTO-heavy label still
+ # drives validation into quadratic time.
+ import codecs
+ import time
+
+ import idna.codec # noqa: F401 (register the idna2008 codec)
+
+ payload = "・" * 8000 + "漢"
+ start = time.perf_counter()
+ self.assertRaises(idna.IDNAError, idna.check_label, payload)
+ self.assertRaises(idna.IDNAError, idna.alabel, payload)
+ self.assertRaises(idna.IDNAError, idna.ulabel, payload)
+ self.assertRaises(
+ idna.IDNAError,
+ codecs.getincrementalencoder("idna2008")().encode,
+ payload,
+ True,
+ )
+ self.assertLess(time.perf_counter() - start, 1.0)
+
def test_check_bidi(self):
l = '\u0061'

198
SPECS/python-idna.spec Normal file
View File

@ -0,0 +1,198 @@
%global with_python3 1
%global srcname idna
# Prepared for Python 2 removal
%bcond_with python2
Name: python-%{srcname}
Version: 2.8
Release: 6%{?dist}
Summary: Internationalized Domain Names in Applications (IDNA)
License: BSD and Python and Unicode
URL: https://github.com/kjd/idna
Source0: https://pypi.io/packages/source/i/%{srcname}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
# Exclude i686 arch. Due to a modularity issue it's being added to the
# x86_64 compose of CRB, but we don't want to ship it at all.
# See: https://projects.engineering.redhat.com/browse/RCM-72605
ExcludeArch: i686
%if %{with python2}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%endif
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-rpm-macros
%description
A library to support the Internationalised Domain Names in Applications (IDNA)
protocol as specified in RFC 5891 <http://tools.ietf.org/html/rfc5891>. This
version of the protocol is often referred to as "IDNA2008" and can produce
different results from the earlier standard from 2003.
The library is also intended to act as a suitable drop-in replacement for the
"encodings.idna" module that comes with the Python standard library but
currently only supports the older 2003 specification.
%if %{with python2}
%package -n python2-%{srcname}
Summary: Internationalized Domain Names in Applications (IDNA)
%{?python_provide:%python_provide python2-%{srcname}}
%description -n python2-%{srcname}
A library to support the Internationalised Domain Names in Applications (IDNA)
protocol as specified in RFC 5891 <http://tools.ietf.org/html/rfc5891>. This
version of the protocol is often referred to as "IDNA2008" and can produce
different results from the earlier standard from 2003.
The library is also intended to act as a suitable drop-in replacement for the
"encodings.idna" module that comes with the Python standard library but
currently only supports the older 2003 specification.
%endif
%package -n python%{python3_pkgversion}-%{srcname}
Summary: Internationalized Domain Names in Applications (IDNA)
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
%description -n python%{python3_pkgversion}-%{srcname}
A library to support the Internationalised Domain Names in Applications (IDNA)
protocol as specified in RFC 5891 <http://tools.ietf.org/html/rfc5891>. This
version of the protocol is often referred to as "IDNA2008" and can produce
different results from the earlier standard from 2003.
The library is also intended to act as a suitable drop-in replacement for the
"encodings.idna" module that comes with the Python standard library but
currently only supports the older 2003 specification.
%prep
%autosetup -p1 -n %{srcname}-%{version}
# Remove bundled egg-info
rm -rf %{srcname}.egg-info
%build
%if %{with python2}
%py2_build
%endif
%py3_build
%install
%py3_install
%if %{with python2}
%py2_install
%endif
%check
%if %{with python2}
%{__python2} setup.py test
%endif
%{__python3} setup.py test
%if %{with python2}
%files -n python2-%{srcname}
%license LICENSE.rst
%doc README.rst HISTORY.rst
%{python2_sitelib}/%{srcname}
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info
%endif
%files -n python%{python3_pkgversion}-%{srcname}
%license LICENSE.rst
%doc README.rst HISTORY.rst
%{python3_sitelib}/%{srcname}
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
%changelog
* Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 2.8-6
- Exclude unsupported i686 arch
* Wed Nov 20 2019 Lumír Balhar <lbalhar@redhat.com> - 2.8-5
- Adjusted for Python 3.8 module in RHEL 8
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.8-4
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.8-3
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue May 28 2019 Jeremy Cline <jcline@redhat.com> - 2.8-1
- Update to v2.8
- Drop python version conditionals
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 2.7-2
- Rebuilt for Python 3.7
* Tue Jun 12 2018 Jeremy Cline <jeremy@jcline.org> - 2.7-1
- Update to v2.7 (rhbz 1589803)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Jan 19 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.5-3
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue Mar 07 2017 Jeremy Cline <jeremy@jcline.org> - 2.5-1
- Update to version 2.5
* Wed Mar 01 2017 Jeremy Cline <jeremy@jcline.org> - 2.4-1
- Update to version 2.4
* Tue Feb 28 2017 Paul Wouters <pwouters@redhat.com> - 2.3-1
- Resolves bugzilla 1427499 Update to 2.3 for IDNAError bugfix and memory improvement
* Thu Feb 09 2017 Jeremy Cline <jeremy@jcline.org> - 2.2-1
- Update to version 2.2 (#1406757)
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.1-3
- Rebuild for Python 3.6
* Mon Nov 28 2016 Orion Poplawski <orion@cora.nwra.com> - 2.1-2
- Ship python2-idna
- Enable python3 for EPEL
- Modernize spec
* Mon Oct 17 2016 tom.prince@ualberta.net - 2.1-1
- Bump version.
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Nov 04 2015 Robert Kuska <rkuska@redhat.com> - 2.0-2
- Rebuilt for Python3.5 rebuild
* Thu Aug 13 2015 Paul Wouters <pwouters@redhat.com> - 2.0-1
- Update to 2.0 which is required by python-cryptography
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Dec 31 2014 tom.prince@ualberta.net - 1.0-1
- Bump version.
* Mon Oct 27 2014 tom.prince@ualberta.net - 0.8-3
- Update licences.
* Sat Jul 12 2014 tom.prince@ualberta.net - 0.8-2
- Be more specfic about .egg-info directories.
- Use python2-devel
* Sat Jul 12 2014 tom.prince@ualberta.net - 0.8-1
- Initial package.

155
changelog
View File

@ -1,155 +0,0 @@
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Nov 28 2023 Lumír Balhar <lbalhar@redhat.com> - 3.6-1
- Update to 3.6 (rhbz#2251399)
* Tue Aug 08 2023 Karolina Surma <ksurma@redhat.com> - 3.4-5
- Update the package's license
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 3.4-3
- Rebuilt for Python 3.12
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Sep 15 2022 Lumír Balhar <lbalhar@redhat.com> - 3.4-1
- Update to 3.4
Resolves: rhbz#2126582
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 3.3-3
- Rebuilt for Python 3.11
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Oct 14 2021 Lumír Balhar <lbalhar@redhat.com> - 3.3-1
- Update to 3.3
Resolves: rhbz#2013470
* Tue Aug 03 2021 Lumír Balhar <lbalhar@redhat.com> - 3.2-1
- Update to 3.2
Resolves: rhbz#1965774
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.10-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 2.10-4
- Rebuilt for Python 3.10
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 07 2020 Lumír Balhar <lbalhar@redhat.com> - 2.10-1
- Update to 2.10 (#1851653)
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 2.9-2
- Rebuilt for Python 3.9
* Tue May 05 2020 Lumír Balhar <lbalhar@redhat.com> - 2.9-1
- Update to 2.9 (#1803654)
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.8-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sun Nov 24 2019 Miro Hrončok <mhroncok@redhat.com> - 2.8-5
- Subpackage python2-idna has been removed
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.8-4
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.8-3
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue May 28 2019 Jeremy Cline <jcline@redhat.com> - 2.8-1
- Update to v2.8
- Drop python version conditionals
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 2.7-2
- Rebuilt for Python 3.7
* Tue Jun 12 2018 Jeremy Cline <jeremy@jcline.org> - 2.7-1
- Update to v2.7 (rhbz 1589803)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Jan 19 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.5-3
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue Mar 07 2017 Jeremy Cline <jeremy@jcline.org> - 2.5-1
- Update to version 2.5
* Wed Mar 01 2017 Jeremy Cline <jeremy@jcline.org> - 2.4-1
- Update to version 2.4
* Tue Feb 28 2017 Paul Wouters <pwouters@redhat.com> - 2.3-1
- Resolves: rhbz#1427499 Update to 2.3 for IDNAError bugfix and memory improvement
* Thu Feb 09 2017 Jeremy Cline <jeremy@jcline.org> - 2.2-1
- Update to version 2.2 (#1406757)
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.1-3
- Rebuild for Python 3.6
* Mon Nov 28 2016 Orion Poplawski <orion@cora.nwra.com> - 2.1-2
- Ship python2-idna
- Enable python3 for EPEL
- Modernize spec
* Mon Oct 17 2016 tom.prince@ualberta.net - 2.1-1
- Bump version.
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Nov 04 2015 Robert Kuska <rkuska@redhat.com> - 2.0-2
- Rebuilt for Python3.5 rebuild
* Thu Aug 13 2015 Paul Wouters <pwouters@redhat.com> - 2.0-1
- Update to 2.0 which is required by python-cryptography
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Dec 31 2014 tom.prince@ualberta.net - 1.0-1
- Bump version.
* Mon Oct 27 2014 tom.prince@ualberta.net - 0.8-3
- Update licences.
* Sat Jul 12 2014 tom.prince@ualberta.net - 0.8-2
- Be more specfic about .egg-info directories.
- Use python2-devel
* Sat Jul 12 2014 tom.prince@ualberta.net - 0.8-1
- Initial package.

View File

@ -1,5 +0,0 @@
--- !Policy
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -1,11 +0,0 @@
discover:
- name: Smoke-tests
how: shell
tests:
- name: python-import-test
test: python3 -c 'import idna'
require:
- python3-idna
duration: 1m
execute:
how: tmt

View File

@ -1,68 +0,0 @@
%global srcname idna
Name: python-%{srcname}
Version: 3.7
Release: %autorelease
Summary: Internationalized Domain Names in Applications (IDNA)
License: BSD-3-Clause
URL: https://github.com/kjd/idna
Source0: https://pypi.io/packages/source/i/%{srcname}/%{srcname}-%{version}.tar.gz
# https://github.com/kjd/idna/commit/c0dda4501df5d91c3181ce6f962dc5de74e82cc1
# https://github.com/kjd/idna/commit/e1cb465b6376f33306a26f467d197edbcd01c4b9
Patch: CVE-2026-45409.patch
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3dist(pytest)
%description
A library to support the Internationalised Domain Names in Applications (IDNA)
protocol as specified in RFC 5891 <http://tools.ietf.org/html/rfc5891>. This
version of the protocol is often referred to as "IDNA2008" and can produce
different results from the earlier standard from 2003.
The library is also intended to act as a suitable drop-in replacement for the
"encodings.idna" module that comes with the Python standard library but
currently only supports the older 2003 specification.
%package -n python3-%{srcname}
Summary: Internationalized Domain Names in Applications (IDNA)
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
%description -n python3-%{srcname}
A library to support the Internationalised Domain Names in Applications (IDNA)
protocol as specified in RFC 5891 <http://tools.ietf.org/html/rfc5891>. This
version of the protocol is often referred to as "IDNA2008" and can produce
different results from the earlier standard from 2003.
The library is also intended to act as a suitable drop-in replacement for the
"encodings.idna" module that comes with the Python standard library but
currently only supports the older 2003 specification.
%prep
%autosetup -p1 -n %{srcname}-%{version}
# Remove bundled egg-info
rm -rf %{srcname}.egg-info
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files %{srcname}
%check
%pytest
%files -n python3-%{srcname} -f %pyproject_files
%license LICENSE.md
%doc README.rst
%changelog
%autochangelog

View File

@ -1,5 +0,0 @@
# completely disabled inspections:
inspections:
# we know about RIGHT-TO-LEFT OVERRIDE in tests/IdnaTestV2.txt
# (fine tuning of this inspection does not seem to work)
unicode: off

View File

@ -1 +0,0 @@
SHA512 (idna-3.7.tar.gz) = b50e5ae117b67c7076125d6943e3436200676f85d7dd1b5a5414e217e73904ef077f0b1108d9781ab4afe2a66f7c9e1ce8262ce51edeb2d29e4c504147b6c4cc