]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-154289: Fix test_socket.testGetServBy on DragonFly (GH-154290) (GH-154296)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 20 Jul 2026 19:50:29 +0000 (21:50 +0200)
committerGitHub <noreply@github.com>
Mon, 20 Jul 2026 19:50:29 +0000 (19:50 +0000)
DragonFly lists "echo 4/ddp" before "echo 7/tcp" in /etc/services, like
FreeBSD, so avoid the "echo" service there too.
(cherry picked from commit 96059f9446510f594c4148d53bd1a4e3532af697)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Lib/test/test_socket.py

index 14865bac0646e62d9269422a766a3c04a857ca4c..a0943a6e58e95ad78d08c8bba588381a414ff519 100644 (file)
@@ -1294,7 +1294,8 @@ class GeneralModuleTests(unittest.TestCase):
         # protocol, at least for modern Linuxes.
         if (
             sys.platform.startswith(
-                ('linux', 'android', 'freebsd', 'netbsd', 'gnukfreebsd'))
+                ('linux', 'android', 'freebsd', 'dragonfly', 'netbsd',
+                 'gnukfreebsd'))
             or is_apple
         ):
             # avoid the 'echo' service on this platform, as there is an