Skip to content
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

Move new vector private declarations to the internal C API #81375

Closed
vstinner opened this issue Jun 7, 2019 · 12 comments
Closed

Move new vector private declarations to the internal C API #81375

vstinner opened this issue Jun 7, 2019 · 12 comments
Labels
3.8 (EOL) end of life 3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@vstinner
Copy link
Member

vstinner commented Jun 7, 2019

BPO 37194
Nosy @vstinner, @jdemeyer
PRs
  • bpo-37194: Add a new public PyObject_CallNoArgs() function #13890
  • bpo-37194: Complete PyObject_CallXXX() docs #14156
  • [3.8] bpo-37194: Complete PyObject_CallXXX() docs (GH-14156) #14157
  • [3.7] bpo-37194: Complete PyObject_CallXXX() docs (GH-14156) #14158
  • bpo-37194: Add PyObject_CallNoArgs() rationale #14159
  • bpo-39245: Make Vectorcall public #17893
  • Add symbols of the stable ABI to python3dll.c #23598
  • [3.9] bpo-42415: Add symbols of the stable ABI to python3dll.c (GH-23598) #23801
  • Files
  • stack_overflow-4.py
  • testcapi_call_no_args.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-06-17.13:09:16.423>
    created_at = <Date 2019-06-07.11:54:00.354>
    labels = ['interpreter-core', '3.8', '3.9']
    title = 'Move new vector private declarations to the internal C API'
    updated_at = <Date 2020-12-16.21:41:55.141>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2020-12-16.21:41:55.141>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-06-17.13:09:16.423>
    closer = 'vstinner'
    components = ['Interpreter Core']
    creation = <Date 2019-06-07.11:54:00.354>
    creator = 'vstinner'
    dependencies = []
    files = ['48400', '48401']
    hgrepos = []
    issue_num = 37194
    keywords = ['patch']
    message_count = 12.0
    messages = ['344927', '344929', '344936', '344960', '345852', '345854', '345855', '345857', '345858', '345862', '383166', '383208']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'jdemeyer']
    pr_nums = ['13890', '14156', '14157', '14158', '14159', '17893', '23598', '23801']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue37194'
    versions = ['Python 3.8', 'Python 3.9']

    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 7, 2019

    bpo-37191: the new vector APIs declare "static inline" functions which are no C89 compatible and so cause compilation issues on pygobject3, python-dbus, xen (for example).

    I propose to move the new *private* declarations to the internal C API.

    I started to work on an application. The blocker issue is _PyObject_CallNoArg() which is now commonly used in CPython code base for best performances. It is used the _testcapi which must *not* be compiled with the internal C API.

    So I suggest to first add a new public PyObject_CallNoArg() function. It would be different than _PyObject_CallNoArg() static inline function: PyObject_CallNoArg() would be a regular function and so fit better with ABI issues.

    @vstinner vstinner added 3.8 (EOL) end of life 3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Jun 7, 2019
    @vstinner vstinner changed the title Move new vector headers to the internal C API Move new vector private declarations to the internal C API Jun 7, 2019
    @jdemeyer
    Copy link
    Contributor

    jdemeyer commented Jun 7, 2019

    I propose to move the new *private* declarations to the internal C API.

    Some of those functions (in particular _PyObject_Vectorcall) are expected to become public in 3.9. They are only private for now since the API is provisional.

    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 7, 2019

    I used testcapi_call_no_args.patch and stack_overflow-4.py to measure the stack consumption of PyObject_CallNoArgs() and PyObject_CallFunctionObjArgs() for PR 13890.

    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 7, 2019

    Oh, I used the wrong bpo number for this change:

    New changeset 740a84d by Victor Stinner in branch 'master':
    bpo-37191: Move TestPEP590 from test_capi to test_call (GH-13892)
    740a84d

    New changeset 5effd10 by Miss Islington (bot) in branch '3.8':
    bpo-37191: Move TestPEP590 from test_capi to test_call (GH-13892)
    5effd10

    @vstinner
    Copy link
    Member Author

    New changeset 2ff58a2 by Victor Stinner in branch 'master':
    bpo-37194: Add a new public PyObject_CallNoArgs() function (GH-13890)
    2ff58a2

    @vstinner
    Copy link
    Member Author

    New changeset 1ce2656 by Victor Stinner in branch 'master':
    bpo-37194: Complete PyObject_CallXXX() docs (GH-14156)
    1ce2656

    @vstinner
    Copy link
    Member Author

    bpo-37191: the new vector APIs declare "static inline" functions which are no C89 compatible and so cause compilation issues on pygobject3, python-dbus, xen (for example).

    bpo-37191 have been fixed, so this issue can now be closed.

    @vstinner
    Copy link
    Member Author

    New changeset ac4202e by Victor Stinner in branch '3.7':
    bpo-37194: Complete PyObject_CallXXX() docs (GH-14156) (GH-14158)
    ac4202e

    @vstinner
    Copy link
    Member Author

    New changeset 71031cf by Victor Stinner in branch '3.8':
    bpo-37194: Complete PyObject_CallXXX() docs (GH-14156) (GH-14157)
    71031cf

    @vstinner
    Copy link
    Member Author

    New changeset 5352cc4 by Victor Stinner in branch 'master':
    bpo-37194: Add PyObject_CallNoArgs() rationale (GH-14159)
    5352cc4

    @vstinner
    Copy link
    Member Author

    New changeset fcc6935 by Victor Stinner in branch 'master':
    Add symbols of the stable ABI to python3dll.c (GH-23598)
    fcc6935

    @vstinner
    Copy link
    Member Author

    New changeset 1662868 by Victor Stinner in branch '3.9':
    Add symbols of the stable ABI to python3dll.c (GH-23598) (GH-23801)
    1662868

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 (EOL) end of life 3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants