-
Notifications
You must be signed in to change notification settings - Fork 232
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
#9 is not fixed on PyPy #316
Comments
os.sched_getaffinity seems to be Python3 only and restricted to some platforms..., so it won't fix it for anything Python2-ish, or as it seems PyPy(3). |
@greut, above build was on
It's Python3-compatible version of PyPy. |
% pypy3
Python 3.5.3 (fdd60ed87e941677e8ea11acf9f1819466521bf2, Jun 22 2018, 02:39:05)
[PyPy 6.0.0 with GCC 8.1.1 20180531] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>> import os
>>>> os.sched_getaffinity(0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'os' has no attribute 'sched_getaffinity'
% python3
Python 3.6.6 (default, Jun 27 2018, 13:11:40)
[GCC 8.1.1 20180531] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.sched_getaffinity(0)
{0, 1, 2, 3}
|
CPython docs says "New in version 3.3", so, IIUIC it must be in PyPy3. Sounds like PyPy3 bug. psutils seems to be working, as it was suggested in related issue travis-ci/travis-ci#4696 (comment):
Not sure if it worth adding additional deps. You may want implement instead a hack for travis-ci, suggested in #9. |
I don't mind adding: if os.environ.get('TRAVIS') == 'true':
return 2 To our function that discovers the number of cpus when What do you think @RonnyPfannschmidt? |
sounds okish as a hack can we factor the cpu number finding into a function and add a few unit/integration tests while we are on it |
Sure, sounds good. Anybody would like to take this on? Seems like a quick contribution. I would be happy to review/merge this. |
I'll do. But first, I believe, pypy3 bug should be created.
Can you release a minor version after merge?
…On Jul 25, 2018 2:59 PM, "Bruno Oliveira" ***@***.***> wrote:
Sure, sounds good.
Anybody would like to take this on? Seems like a quick contribution. I
would be happy to review/merge this.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#316 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACDlGOIAWj6xJVdWREHxxnrWGYzEAjLDks5uKF2VgaJpZM4VfhHX>
.
|
Sure! |
See commit skirpichev/diofant@cfe8a53, which return
-n auto
and failing CI build: https://travis-ci.org/diofant/diofant/jobs/407725598CC @greut
The text was updated successfully, but these errors were encountered: