Skip to content
New issue

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

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

Already on GitHub? # to your account

Allowing PyVectorcall_NARGS for PyPy #2738

Closed
darleybarreto opened this issue Nov 15, 2022 · 0 comments · Fixed by #2811
Closed

Allowing PyVectorcall_NARGS for PyPy #2738

darleybarreto opened this issue Nov 15, 2022 · 0 comments · Fixed by #2811

Comments

@darleybarreto
Copy link

PyVectorcall_NARGS was included in PyPy 3.8. So it is possible to remove the not here:

#[cfg(all(Py_3_8))]
#[inline(always)]
pub unsafe fn PyVectorcall_NARGS(n: size_t) -> Py_ssize_t {
    assert!(n <= (PY_SSIZE_T_MAX as size_t));
    (n as Py_ssize_t) & !PY_VECTORCALL_ARGUMENTS_OFFSET
}

Or specifying the symbol to link against in here.

Thanks!

@messense messense added easy Good First Issue c-api Everything related to cpython's new c api, see https://pythoncapi.readthedocs.io and PEP 620 FFI and removed c-api Everything related to cpython's new c api, see https://pythoncapi.readthedocs.io and PEP 620 labels Nov 15, 2022
bors bot added a commit that referenced this issue Dec 17, 2022
2709: ci: add Python 3.12-dev jobs r=davidhewitt a=davidhewitt

Separately to #2708, time to start testing 3.12 alphas on CI. I imagine this might also take a while for the packages to come available.

2800: allow `**kwargs` to take arguments which conflict with positional-only parameters r=davidhewitt a=davidhewitt

Closes #2799 

I did a little bit of refactoring at the same time, sorry! The bit which changes behaviour is that in the now-factored-out `handle_kwargs` method, if the keyword argument name is found in the positional-only range then the varkeywords handler is now given a chance to accept it. (Lines 387-390 in new `extract_argument.rs`.)

2811: adjust vectorcall symbols for pypy r=davidhewitt a=davidhewitt

Closes #2738

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
bors bot added a commit that referenced this issue Dec 17, 2022
2800: allow `**kwargs` to take arguments which conflict with positional-only parameters r=davidhewitt a=davidhewitt

Closes #2799 

I did a little bit of refactoring at the same time, sorry! The bit which changes behaviour is that in the now-factored-out `handle_kwargs` method, if the keyword argument name is found in the positional-only range then the varkeywords handler is now given a chance to accept it. (Lines 387-390 in new `extract_argument.rs`.)

2811: adjust vectorcall symbols for pypy r=davidhewitt a=davidhewitt

Closes #2738

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
bors bot added a commit that referenced this issue Dec 17, 2022
2811: adjust vectorcall symbols for pypy r=davidhewitt a=davidhewitt

Closes #2738

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
@bors bors bot closed this as completed in 203ac5d Dec 17, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants