public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python3.10] f43:  Skip UDP Lite tests if it's not supported
@ 2026-08-12 19:04 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-08-12 19:04 UTC (permalink / raw)
  To: git-commits

           A new commit has been pushed.

           Repo   : rpms/python3.10
           Branch : f43
           Commit : 7da201e90094c47501dcb1ee89872aef1884f4a0
           Author : Miro Hrončok <miro@hroncok.cz>
           Date   : 2026-07-30T17:25:58+02:00
           Stats  : +76/-1 in 2 file(s)
           URL    : https://src.fedoraproject.org/rpms/python3.10/c/7da201e90094c47501dcb1ee89872aef1884f4a0?branch=f43

           Log:
           Skip UDP Lite tests if it's not supported

- Fixes FTBFS on Linux kernel 7.1 and newer

---
diff --git a/00491-gh-149776-skip-udp-lite-tests-if-it-s-not-supported.patch b/00491-gh-149776-skip-udp-lite-tests-if-it-s-not-supported.patch
new file mode 100644
index 0000000..bf0a459
--- /dev/null
+++ b/00491-gh-149776-skip-udp-lite-tests-if-it-s-not-supported.patch
@@ -0,0 +1,64 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Victor Stinner <vstinner@python.org>
+Date: Wed, 13 May 2026 17:27:56 +0200
+Subject: 00491: gh-149776: Skip UDP Lite tests if it's not supported
+
+Fix test_socket on Linux kernel 7.1 and newer: skip UDP Lite tests if
+it's not supported.
+
+(cherry picked from commit 3cfc249e11a132dc69624150843779aa96c72b2b)
+(cherry picked from commit 49d08674d8dba50dc29539e3c7bce21d66066b06)
+---
+ Lib/test/test_socket.py                       | 22 ++++++++++++++++++-
+ ...-05-13-14-53-23.gh-issue-149776.orqgsn.rst |  2 ++
+ 2 files changed, 23 insertions(+), 1 deletion(-)
+ create mode 100644 Misc/NEWS.d/next/Tests/2026-05-13-14-53-23.gh-issue-149776.orqgsn.rst
+
+diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
+index 15f7fb4a80..4a3d8f7ce6 100644
+--- a/Lib/test/test_socket.py
++++ b/Lib/test/test_socket.py
+@@ -142,6 +142,26 @@ def _have_socket_bluetooth():
+     return True
+ 
+ 
++def _have_udp_lite():
++    if not hasattr(socket, "IPPROTO_UDPLITE"):
++        return False
++    # Older Android versions block UDPLITE with SELinux.
++    if support.is_android and platform.android_ver().api_level < 29:
++        return False
++
++    try:
++        sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDPLITE)
++    except OSError as exc:
++        # Linux 7.1 removed UDP Lite support
++        if exc.errno == errno.EPROTONOSUPPORT:
++            return False
++        raise
++    sock.close()
++
++    return True
++
++
++
+ @contextlib.contextmanager
+ def socket_setdefaulttimeout(timeout):
+     old_timeout = socket.getdefaulttimeout()
+@@ -166,7 +186,7 @@ def socket_setdefaulttimeout(timeout):
+ 
+ HAVE_SOCKET_VSOCK = _have_socket_vsock()
+ 
+-HAVE_SOCKET_UDPLITE = hasattr(socket, "IPPROTO_UDPLITE")
++HAVE_SOCKET_UDPLITE = _have_udp_lite()
+ 
+ HAVE_SOCKET_BLUETOOTH = _have_socket_bluetooth()
+ 
+diff --git a/Misc/NEWS.d/next/Tests/2026-05-13-14-53-23.gh-issue-149776.orqgsn.rst b/Misc/NEWS.d/next/Tests/2026-05-13-14-53-23.gh-issue-149776.orqgsn.rst
+new file mode 100644
+index 0000000000..e86a9130ff
+--- /dev/null
++++ b/Misc/NEWS.d/next/Tests/2026-05-13-14-53-23.gh-issue-149776.orqgsn.rst
+@@ -0,0 +1,2 @@
++Fix test_socket on Linux kernel 7.1 and newer: skip UDP Lite tests if it's
++not supported. Patch by Victor Stinner.

diff --git a/python3.10.spec b/python3.10.spec
index 85c416e..d06a2f6 100644
--- a/python3.10.spec
+++ b/python3.10.spec
@@ -17,7 +17,7 @@ URL: https://www.python.org/
 #global prerel ...
 %global upstream_version %{general_version}%{?prerel}
 Version: %{general_version}%{?prerel:~%{prerel}}
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: Python-2.0.1
 
 
@@ -381,6 +381,13 @@ Patch475: 00475-cve-2025-15367.patch
 # (cherry-picked from commit acfe02f3b05436658d92add6b168538b30f357f0)
 Patch489: 00489-openssl-3.5.7.patch
 
+# 00491 # ac14737379922303720216b61803474c84f291ef
+# gh-149776: Skip UDP Lite tests if it's not supported
+#
+# Fix test_socket on Linux kernel 7.1 and newer: skip UDP Lite tests if
+# it's not supported.
+Patch491: 00491-gh-149776-skip-udp-lite-tests-if-it-s-not-supported.patch
+
 # (New patches go here ^^^)
 #
 # When adding new patches to "python" and "python3" in Fedora, EL, etc.,
@@ -1680,6 +1687,10 @@ CheckPython optimized
 # ======================================================
 
 %changelog
+* Thu Jul 30 2026 Miro Hrončok <mhroncok@redhat.com> - 3.10.20-4
+ - Skip UDP Lite tests if it's not supported
+ - Fixes FTBFS on Linux kernel 7.1 and newer
+
 * Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.20-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-12 19:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-12 19:04 [rpms/python3.10] f43: Skip UDP Lite tests if it's not supported 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox