This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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

Created on 2020-10-21 19:58 by petr.viktorin, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 23226 merged petr.viktorin, 2020-11-10 15:47
Messages (5)
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.
msg382749 - (view) Author: miss-islington (miss-islington) Date: 2020-12-08 16:37
New changeset c168b5078f88874b9acd993ac886f82269c780dd by Petr Viktorin in branch 'master':
bpo-42111: Make the xxlimited module an example of best extension module practices (GH-23226)
https://github.com/python/cpython/commit/c168b5078f88874b9acd993ac886f82269c780dd
History
Date User Action Args
2022-04-11 14:59:37adminsetgithub: 86277
2020-12-15 14:51:28petr.viktorinsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-12-08 16:37:01miss-islingtonsetnosy: + miss-islington
messages: + msg382749
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