Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os.sched_getaffinity() is missing - module 'os' has no attribute 'sched_getaffinity' #81781

Closed
wesinator mannequin opened this issue Jul 15, 2019 · 2 comments
Closed
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@wesinator
Copy link
Mannequin

wesinator mannequin commented Jul 15, 2019

BPO 37600
Nosy @MojoVampire, @wesinator

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2019-07-15.23:14:32.279>
created_at = <Date 2019-07-15.21:08:09.599>
labels = ['3.7', 'invalid', 'type-bug', 'library']
title = "os.sched_getaffinity() is missing - module 'os' has no attribute 'sched_getaffinity'"
updated_at = <Date 2019-07-15.23:14:32.268>
user = 'https://github.com/wesinator'

bugs.python.org fields:

activity = <Date 2019-07-15.23:14:32.268>
actor = 'josh.r'
assignee = 'none'
closed = True
closed_date = <Date 2019-07-15.23:14:32.279>
closer = 'josh.r'
components = ['Library (Lib)']
creation = <Date 2019-07-15.21:08:09.599>
creator = 'wesinator'
dependencies = []
files = []
hgrepos = []
issue_num = 37600
keywords = []
message_count = 2.0
messages = ['347991', '347995']
nosy_count = 2.0
nosy_names = ['josh.r', 'wesinator']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue37600'
versions = ['Python 3.7']

@wesinator
Copy link
Mannequin Author

wesinator mannequin commented Jul 15, 2019

Python 3.7.4 macOS 10.14.5 (homebrew)

According to https://docs.python.org/3/library/os.html#os.cpu_count , there is a method os.sched_getaffinity() (https://docs.python.org/3/library/os.html#os.sched_getaffinity)

Code to reproduce :

import os
len(os.sched_getaffinity(0))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'os' has no attribute 'sched_getaffinity'

@wesinator wesinator mannequin added 3.7 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Jul 15, 2019
@wesinator wesinator mannequin changed the title sched_getaffinity() is missing - module 'os' has no attribute 'sched_getaffinity' os.sched_getaffinity() is missing - module 'os' has no attribute 'sched_getaffinity' Jul 15, 2019
@MojoVampire
Copy link
Mannequin

MojoVampire mannequin commented Jul 15, 2019

Per the docs on the function group that includes os.sched_getaffinity ( https://docs.python.org/3/library/os.html#interface-to-the-scheduler ):

These functions control how a process is allocated CPU time by the operating system. They are only available on some Unix platforms. For more detailed information, consult your Unix manpages.

New in version 3.3.

The following scheduling policies are exposed if they are supported by the operating system.

OSX doesn't support these APIs, so Python on OSX won't have them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

0 participants