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

Extract generated clinic code in Modules/_pickle.c to separate file #64594

Closed
serhiy-storchaka opened this issue Jan 26, 2014 · 5 comments
Closed
Assignees

Comments

@serhiy-storchaka
Copy link
Member

BPO 20395
Nosy @pitrou, @larryhastings, @avassalotti, @serhiy-storchaka
Files
  • pickle_clinic.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 = 'https://github.com/serhiy-storchaka'
    closed_at = <Date 2014-01-27.09:52:31.093>
    created_at = <Date 2014-01-26.11:05:39.736>
    labels = []
    title = 'Extract generated clinic code in Modules/_pickle.c to separate file'
    updated_at = <Date 2014-01-27.09:52:31.093>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2014-01-27.09:52:31.093>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2014-01-27.09:52:31.093>
    closer = 'serhiy.storchaka'
    components = []
    creation = <Date 2014-01-26.11:05:39.736>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = ['33722']
    hgrepos = []
    issue_num = 20395
    keywords = ['patch']
    message_count = 5.0
    messages = ['209293', '209295', '209348', '209369', '209423']
    nosy_count = 5.0
    nosy_names = ['pitrou', 'larry', 'alexandre.vassalotti', 'python-dev', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue20395'
    versions = ['Python 3.4']

    @serhiy-storchaka
    Copy link
    Member Author

    Argument Clinic had added about half-thousand lines of code to Modules/_pickle.c. This generated code is mixed with handwritten code. Last 8 changes of Modules/_pickle.c are caused by Argument Clinic evolution, and I afraid that many future Argument Clinic changes will change Modules/_pickle.c too.

    The proposed patch extracts generated clinic code in separate file to prevent or decrease code churn in future. It decreases the size of Modules/_pickle.c by 450 lines.

    @larryhastings
    Copy link
    Contributor

    Alexandre: We're still figuring out best practices with Argument Clinic. So, right now, there's no standard policy of "where should we put all the generated code?", and we're leaving it up to the owners of the individual modules. Putting it in a second file and #including it is a popular option, but there are other options too (and Guido says he hates code generators that put stuff in a second file).

    @pitrou
    Copy link
    Member

    pitrou commented Jan 26, 2014

    +1 for a separate file from me.

    @avassalotti
    Copy link
    Member

    +1 from me as well for a separate file.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jan 27, 2014

    New changeset 1aa8ea187560 by Serhiy Storchaka in branch 'default':
    Issue bpo-20395: Extract generated clinic code in Modules/_pickle.c to separate file.
    http://hg.python.org/cpython/rev/1aa8ea187560

    @serhiy-storchaka serhiy-storchaka self-assigned this Jan 27, 2014
    @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
    None yet
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants