https://github.com/python/cpython/commit/4bcda6d916beb46684d285ac7e7eebf219cdc81f
commit: 4bcda6d916beb46684d285ac7e7eebf219cdc81f
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-07-22T08:43:22Z
summary:

[3.14] gh-154441: Skip the scheduler tests if the API requires privileges 
(GH-154442) (GH-154448)

DragonFly BSD requires privileges to use the scheduler API, even for
the calling process.
(cherry picked from commit cbd15390e474e254ad2590c57de7e3bf657c0a09)

Co-authored-by: Serhiy Storchaka <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>

files:
M Lib/test/test_posix.py

diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index 282418e27e5b57..cdc80b1dc0d345 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -46,7 +46,8 @@ def _supports_sched():
     try:
         posix.sched_getscheduler(0)
     except OSError as e:
-        if e.errno == errno.ENOSYS:
+        # DragonFly BSD requires privileges to use the scheduler API.
+        if e.errno in (errno.ENOSYS, errno.EPERM):
             return False
     return True
 
@@ -1390,6 +1391,7 @@ def test_bug_140634(self):
         del sched_priority, param  # should not crash
         support.gc_collect()  # just to be sure
 
+    @requires_sched
     @unittest.skipUnless(hasattr(posix, "sched_rr_get_interval"), "no 
function")
     def test_sched_rr_get_interval(self):
         try:

_______________________________________________
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]

Reply via email to