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

Make the xxlimited module an example of best extension module practices #86277

Closed
encukou opened this issue Oct 21, 2020 · 5 comments
Closed
Assignees
Labels
3.10 only security fixes topic-C-API

Comments

@encukou
Copy link
Member

encukou commented Oct 21, 2020

BPO 42111
Nosy @terryjreedy, @encukou, @corona10, @miss-islington, @shihai1991
PRs
  • bpo-42111: Make the xxlimited module an example of best extension module practices #23226
  • 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/encukou'
    closed_at = <Date 2020-12-15.14:51:28.499>
    created_at = <Date 2020-10-21.19:58:56.884>
    labels = ['expert-C-API', '3.10']
    title = 'Make the xxlimited module an example of best extension module practices'
    updated_at = <Date 2020-12-15.14:51:28.499>
    user = 'https://github.com/encukou'

    bugs.python.org fields:

    activity = <Date 2020-12-15.14:51:28.499>
    actor = 'petr.viktorin'
    assignee = 'petr.viktorin'
    closed = True
    closed_date = <Date 2020-12-15.14:51:28.499>
    closer = 'petr.viktorin'
    components = ['C API']
    creation = <Date 2020-10-21.19:58:56.884>
    creator = 'petr.viktorin'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 42111
    keywords = ['patch']
    message_count = 5.0
    messages = ['379241', '379298', '379502', '379753', '382749']
    nosy_count = 5.0
    nosy_names = ['terry.reedy', 'petr.viktorin', 'corona10', 'miss-islington', 'shihai1991']
    pr_nums = ['23226']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue42111'
    versions = ['Python 3.10']

    @encukou
    Copy link
    Member Author

    encukou commented Oct 21, 2020

    The "xxlimited" module (Modules/xxlimited.c) was added as part of PEP-384 (Defining a Stable ABI), and is undocumented. As far as I can tell,
    it was added partly to test the stable ABI, and partly as an example of
    how to write a module (like "xx" from xxmodule.c).
    In the last few years the module has not seen much maintenance, and I
    believe it's no longer a good example to follow: it works, but there are
    now better ways to do things.

    I would like to take over maintenance of the module and make it into an
    example of how to write a low-level C extension with isolated module
    state, as described in PEP-630 (Isolating Extension Modules) -- an
    informational PEP that I plan to convert to a HOWTO doc when everything
    is ready.

    The old module will be kept around to test the 3.5 stable ABI.

    Past discussion: https://mail.python.org/archives/list/python-dev@python.org/thread/FO3YPG3YLG2XF5FKHICJHNINSPY4OHEL/#YITRQXGUOIEHK22QP5K4C5E45QA356U3

    @encukou encukou added 3.10 only security fixes topic-C-API labels Oct 21, 2020
    @corona10
    Copy link
    Member

    I am +1 on this idea.

    @terryjreedy
    Copy link
    Member

    I would interpret the limited pydev response (1 person, whose concern you incorporated into your post) to indicate absence of opposition. Given that 384 was written by someone inactive for years, I say go ahead and submit a PR for review by any interested active maintainers.

    @encukou
    Copy link
    Member Author

    encukou commented Oct 27, 2020

    Thanks! That's my plan, but when I added tests I realized I need to pt in some general improvements to the stable ABI first.

    @miss-islington
    Copy link
    Contributor

    New changeset c168b50 by Petr Viktorin in branch 'master':
    bpo-42111: Make the xxlimited module an example of best extension module practices (GH-23226)
    c168b50

    @encukou encukou closed this as completed Dec 15, 2020
    @encukou encukou closed this as completed Dec 15, 2020
    @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.10 only security fixes topic-C-API
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants