Skip to content

PEP 590: Base update #1035

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

Merged
merged 11 commits into from
May 8, 2019
Merged

PEP 590: Base update #1035

merged 11 commits into from
May 8, 2019

Conversation

encukou
Copy link
Member

@encukou encukou commented May 8, 2019

The discussion on GH-1028 got out of hand.
This PR attempts to collect the "uncontroversial" changes, and also to collect the unresolved issues.

If there's something here you don't agree with, point it out.
I'll add it to the following list of things to hash out (and, if feasible, revert the change here).

Please don't discuss any of these in this PR.

cc @markshannon @jdemeyer

The vectorcall function's kwname argument:

  • PyTupleObject or PyObject?
  • Can be NULL?
  • Can the tuple be empty?

vectorcallvectorcallfunc

I'm not sure this was settled.

tp_vectorcall_offset type

  • uintptr_t (original)
  • Py_ssize_t (matches type of offsetof and existing practice)
  • ptrdiff_t (actual "difference of pointers" type)

This is probalby pointless bikeshedding.

METH_VECTORCALL function type

  • PyObject *(*call) (PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwname)
  • vectorcallfunc

(There is a discussion on what code is "trusted".)

PyCall_MakeVectorCall name

  • PyCall_MakeVectorcall (original)
  • PyCall_Vectorcall
  • PyVectorcall_Call

PyVectorcall_Function

Do we need this one?

- ``vectorcallfunc PyVectorcall_Function(PyObject *obj)``: If ``obj`` does not support vectorcall,
  return ``NULL``.
  Otherwise, return the vectorcall pointer in the instance ``obj`` (which may be ``NULL``).

PyCall_MakeTpCall

Do we need to add this one back?

PY_VECTORCALL_ARGUMENTS_OFFSET vs. PY_VECTORCALL_PREPEND

Passing a dict to PyObject_Vectorcall

@encukou
Copy link
Member Author

encukou commented May 8, 2019

I checked with Mark on this. @jdemeyer, can we merge this and move forward with the individual points?

@encukou encukou mentioned this pull request May 8, 2019
@markshannon
Copy link
Member

One typo, otherwise LGTM.

@jdemeyer
Copy link
Contributor

jdemeyer commented May 8, 2019

@jdemeyer, can we merge this and move forward with the individual points?

OK

@jdemeyer
Copy link
Contributor

jdemeyer commented May 8, 2019

You mention bringing back PyCall_MakeTpCall but you don't actually do that.

@encukou
Copy link
Member Author

encukou commented May 8, 2019

The PR description lists the unresolved issues, not what this PR does. In retrospect, that's quite confusing. Sorry!

I'll kick off discussions on these issues on python-dev.

@encukou encukou merged commit 7fc318e into python:master May 8, 2019
@encukou encukou deleted the pep-590-base branch May 8, 2019 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants