[3.13] gh-154289: Fix test_socket.testGetServBy on DragonFly (GH-154290) (GH-154296)

serhiy-storchaka <[email protected]>
Newsgroups gmane.comp.python.cvs
Message-ID <[email protected]>
https://github.com/python/cpython/commit/4beda40bb816bc7a8e733da50ef99e5a82f91ae8
commit: 4beda40bb816bc7a8e733da50ef99e5a82f91ae8
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-07-20T19:50:29Z
summary:

[3.13] gh-154289: Fix test_socket.testGetServBy on DragonFly (GH-154290) (GH-154296)

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 <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

files:
M Lib/test/test_socket.py

diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 14865bac0646e6..a0943a6e58e95a 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -1294,7 +1294,8 @@ def testGetServBy(self):
         # 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

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.