-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feature: use ABI3 for cp36+ #2102
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -298,29 +298,25 @@ psutil_proc_cpu_affinity_set(PyObject *self, PyObject *args) { | |||||||||||
pid_t pid; | ||||||||||||
int i, seq_len; | ||||||||||||
PyObject *py_cpu_set; | ||||||||||||
PyObject *py_cpu_seq = NULL; | ||||||||||||
|
||||||||||||
if (!PyArg_ParseTuple(args, _Py_PARSE_PID "O", &pid, &py_cpu_set)) | ||||||||||||
return NULL; | ||||||||||||
|
||||||||||||
if (!PySequence_Check(py_cpu_set)) { | ||||||||||||
PyErr_Format(PyExc_TypeError, "sequence argument expected, got %s", | ||||||||||||
Py_TYPE(py_cpu_set)->tp_name); | ||||||||||||
PyErr_Format(PyExc_TypeError, "sequence argument expected, got %R", Py_TYPE(py_cpu_set)); | ||||||||||||
goto error; | ||||||||||||
} | ||||||||||||
|
||||||||||||
py_cpu_seq = PySequence_Fast(py_cpu_set, "expected a sequence or integer"); | ||||||||||||
if (!py_cpu_seq) | ||||||||||||
goto error; | ||||||||||||
seq_len = PySequence_Fast_GET_SIZE(py_cpu_seq); | ||||||||||||
seq_len = PySequence_Size(py_cpu_set); | ||||||||||||
CPU_ZERO(&cpu_set); | ||||||||||||
for (i = 0; i < seq_len; i++) { | ||||||||||||
PyObject *item = PySequence_Fast_GET_ITEM(py_cpu_seq, i); | ||||||||||||
PyObject *item = PySequence_GetItem(py_cpu_set, i); | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
(Previously, |
||||||||||||
#if PY_MAJOR_VERSION >= 3 | ||||||||||||
long value = PyLong_AsLong(item); | ||||||||||||
#else | ||||||||||||
long value = PyInt_AsLong(item); | ||||||||||||
#endif | ||||||||||||
Py_XDECREF(item); | ||||||||||||
if ((value == -1) || PyErr_Occurred()) { | ||||||||||||
if (!PyErr_Occurred()) | ||||||||||||
PyErr_SetString(PyExc_ValueError, "invalid CPU value"); | ||||||||||||
|
@@ -335,12 +331,9 @@ psutil_proc_cpu_affinity_set(PyObject *self, PyObject *args) { | |||||||||||
goto error; | ||||||||||||
} | ||||||||||||
|
||||||||||||
Py_DECREF(py_cpu_seq); | ||||||||||||
Py_RETURN_NONE; | ||||||||||||
|
||||||||||||
error: | ||||||||||||
if (py_cpu_seq != NULL) | ||||||||||||
Py_DECREF(py_cpu_seq); | ||||||||||||
return NULL; | ||||||||||||
} | ||||||||||||
#endif /* PSUTIL_HAVE_CPU_AFFINITY */ | ||||||||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before I was against removing appveyor, but with pyproject.toml, wheels and
Py_LIMITED_API
I now see why this is necessary. One question though: with this new addition GitHub will test setup.py usingPy_LIMITED_API
, while appveyor CI will test python 2.7 + setup.py withoutPy_LIMITED_API
. Am I correct? Do you still see value in keep using appveyor or do you think we should abandon it?Some background on why we're using appveyor:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally find using 2 CI services a bit confusing and harder to maintain, and GHA's better integration with the repo/PRs is a nice advantage.
I believe there's no speed benefit to this split. GHA's concurrency limits are (much?) higher than the current jobs amount.
Edit: Ugh, I forgot building Windows 2.7 wheels (on GHA, didn't know AppVeyor has the tools) requires adding a Visual C++ dependency...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you are.
If you want to keep Python 2.7 wheels on Windows, then I'd say it shall remain. AppVeyor still keeps old images around and that includes some build tools "required" for Python 2.7 that are not available for download anymore and not available on GHA.
Given AppVeyor has 1 concurrent job and GHA has higher concurrency limits than the current jobs amount, it will be faster with GHA. The current limiter on
master
to get a green CI is AppVeyor with an average of 30 minutes. This PR cuts that at least in half.