classification
Title: [Patch] Make presence of SCHED_* optional
Type: Stage: resolved
Components: Extension Modules Versions: Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: EdSchouten, python-dev
Priority: normal Keywords: patch

Created on 2016-07-30 15:49 by EdSchouten, last changed 2016-07-31 06:22 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
sched.diff EdSchouten, 2016-07-30 15:49 Patch for declaring SCHED_* conditionally review
Messages (2)
msg271697 - (view) Author: Ed Schouten (EdSchouten) * Date: 2016-07-30 15:49
The SCHED_* constants that are part of POSIX's <sched.h> are all optional:

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sched.h.html

Python already declares the SCHED_SPORADIC constant as part of the POSIX module optionally, depending on whether it is present in C, but doesn't do this for the other SCHED_* constants.

This is problematic for CloudABI (https://mail.python.org/pipermail/python-dev/2016-July/145708.html), which doesn't support any scheduler interaction at all.

Attached is a patch to only define these if present.
msg271723 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-07-31 06:22
New changeset 095b424127e7 by Benjamin Peterson in branch '3.5':
all SCHED_ constants are optional (closes #27656)
https://hg.python.org/cpython/rev/095b424127e7

New changeset 64b763290da9 by Benjamin Peterson in branch 'default':
merge 3.5 (#27656)
https://hg.python.org/cpython/rev/64b763290da9
History
Date User Action Args
2016-07-31 06:22:40python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg271723

resolution: fixed
stage: resolved
2016-07-30 15:49:07EdSchoutencreate