classification
Title: Make the xxlimited module an example of best extension module practices
Type: Stage: patch review
Components: C API Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: petr.viktorin Nosy List: corona10, petr.viktorin, shihai1991, terry.reedy
Priority: normal Keywords: patch

Created on 2020-10-21 19:58 by petr.viktorin, last changed 2020-11-10 15:47 by petr.viktorin.

Pull Requests
URL Status Linked Edit
PR 23226 open petr.viktorin, 2020-11-10 15:47
Messages (4)
msg379241 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2020-10-21 19:58
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
msg379298 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2020-10-22 15:15
I am +1 on this idea.
msg379502 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-10-24 00:21
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.
msg379753 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2020-10-27 10:52
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.
History
Date User Action Args
2020-11-10 15:47:14petr.viktorinsetkeywords: + patch
stage: patch review
pull_requests: + pull_request22123
2020-10-29 15:33:50shihai1991setnosy: + shihai1991
2020-10-27 14:32:39petr.viktorinsetassignee: petr.viktorin
2020-10-27 10:52:56petr.viktorinsetmessages: + msg379753
2020-10-24 00:21:18terry.reedysetnosy: + terry.reedy
messages: + msg379502
2020-10-22 15:15:23corona10setmessages: + msg379298
2020-10-22 15:14:28corona10setnosy: + corona10
2020-10-21 19:58:56petr.viktorincreate