-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Update capi_version for mypyc tests to 3.8 #18341
Conversation
c_function_name="_PyObject_Vectorcall", | ||
c_function_name="PyObject_Vectorcall", |
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.
PyObject_Vectorcall
is available unconditionally from pythoncapi_compat.h
. Included the underscore removal here so I wouldn't have to do another big PR just for that.
mypy/mypyc/lib-rt/pythoncapi_compat.h
Lines 602 to 610 in aa0b6f0
// gh-105922 added PyObject_Vectorcall() to Python 3.9.0a4 | |
#if PY_VERSION_HEX < 0x030900A4 | |
static inline PyObject* | |
PyObject_Vectorcall(PyObject *callable, PyObject *const *args, | |
size_t nargsf, PyObject *kwnames) | |
{ | |
#if PY_VERSION_HEX >= 0x030800B1 && !defined(PYPY_VERSION) | |
// bpo-36974 added _PyObject_Vectorcall() to Python 3.8.0b1 | |
return _PyObject_Vectorcall(callable, args, nargsf, kwnames); |
803473b
to
19de2da
Compare
19de2da
to
03c4bfc
Compare
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.
Nice, thanks!
Followup to #18341 This PR updates the `capi_version` used for mypyc tests to `3.9` (mypy / mypyc requires `>=3.9`). For Python 3.9+ mypyc uses `PyObject_VectorcallMethod` instead of `CPyObject_CallMethodObjArgs` and select `PyObject_Vectorcall` where ever possible. Will remove the now unnecessary `use_method_vectorcall` check in a followup. https://github.com/python/mypy/blob/42e005c999d8341c0da6d7b93b10d05f2db2099c/mypyc/common.py#L114-L116
This PR updates the `capi_version` used for mypyc tests to `3.8` (mypy / mypyc requires `>=3.9`). Test data updates done with `--update-data`. For Python 3.8+ mypyc uses `_PyObject_Vectorcall` instead of `PyObject_CallFunctionObjArgs` and `PyObject_Call` where ever possible. Will remove the now unnecessary `use_vectorcall` check in a followup. https://github.com/python/mypy/blob/aa0b6f0288e6a511b750f7fe8f49a0e321362105/mypyc/common.py#L103-L105
Followup to python#18341 This PR updates the `capi_version` used for mypyc tests to `3.9` (mypy / mypyc requires `>=3.9`). For Python 3.9+ mypyc uses `PyObject_VectorcallMethod` instead of `CPyObject_CallMethodObjArgs` and select `PyObject_Vectorcall` where ever possible. Will remove the now unnecessary `use_method_vectorcall` check in a followup. https://github.com/python/mypy/blob/42e005c999d8341c0da6d7b93b10d05f2db2099c/mypyc/common.py#L114-L116
…orcall (python#18548) Followup to python#18341 and python#18546 We only support Python 3.9+, so `PyObject_Vectorcall` and `PyObject_VectorcallMethod` are always available. Remove backwards compatibility layer.
This PR updates the
capi_version
used for mypyc tests to3.8
(mypy / mypyc requires>=3.9
). Test data updates done with--update-data
. For Python 3.8+ mypyc uses_PyObject_Vectorcall
instead ofPyObject_CallFunctionObjArgs
andPyObject_Call
where ever possible.Will remove the now unnecessary
use_vectorcall
check in a followup.mypy/mypyc/common.py
Lines 103 to 105 in aa0b6f0