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

[C API] Document PyTypeObject.tp_print removal in What's New In Python 3.9 #83542

Closed
vstinner opened this issue Jan 16, 2020 · 2 comments
Closed
Labels
3.9 only security fixes topic-C-API

Comments

@vstinner
Copy link
Member

BPO 39361
Nosy @vstinner
PRs
  • bpo-39361: Document the removal of tp_print #18125
  • 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 2020-01-24.10:35:36.421>
    created_at = <Date 2020-01-16.13:47:29.233>
    labels = ['expert-C-API', '3.9']
    title = "[C API] Document PyTypeObject.tp_print removal in What's New In Python 3.9"
    updated_at = <Date 2020-01-24.10:35:36.421>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2020-01-24.10:35:36.421>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-01-24.10:35:36.421>
    closer = 'vstinner'
    components = ['C API']
    creation = <Date 2020-01-16.13:47:29.233>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 39361
    keywords = ['patch']
    message_count = 2.0
    messages = ['360120', '360607']
    nosy_count = 1.0
    nosy_names = ['vstinner']
    pr_nums = ['18125']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue39361'
    versions = ['Python 3.9']

    @vstinner
    Copy link
    Member Author

    commit aacc77f
    Author: Jeroen Demeyer <J.Demeyer@UGent.be>
    Date: Wed May 29 20:31:52 2019 +0200

    bpo-36974: implement PEP-590 (GH-13185)
    
    
    Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be>
    Co-authored-by: Mark Shannon <mark@hotpy.org>
    

    removed PyTypeObject.tp_print:

    diff --git a/Include/cpython/object.h b/Include/cpython/object.h
    index ba52a48358..a65aaf6482 100644
    --- a/Include/cpython/object.h
    +++ b/Include/cpython/object.h
    @@ -182,7 +182,7 @@ typedef struct _typeobject {
         /* Methods to implement standard operations */
     
         destructor tp_dealloc;
    -    printfunc tp_print;
    +    Py_ssize_t tp_vectorcall_offset;
         getattrfunc tp_getattr;
         setattrfunc tp_setattr;
         PyAsyncMethods *tp_as_async; /* formerly known as tp_compare (Python 2)

    Would it be possible to just document it in What's New in Python 3.9? Near:
    https://docs.python.org/dev/whatsnew/3.9.html#build-and-c-api-changes

    For example, this incompatible change broke zbar project:
    https://bugzilla.redhat.com/show_bug.cgi?id=1791745

    @vstinner vstinner added 3.9 only security fixes topic-C-API labels Jan 16, 2020
    @vstinner
    Copy link
    Member Author

    New changeset 2d50976 by Victor Stinner (Ammar Askar) in branch 'master':
    bpo-39361: Document the removal of PyTypeObject.tp_print (GH-18125)
    2d50976

    @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.9 only security fixes topic-C-API
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant