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: [meta issue] PEP 3121, 384 Refactoring
Type: enhancement Stage:
Components: Extension Modules Versions: Python 3.11
process
Status: open Resolution:
Dependencies: 14732 14935 14936 15140 15389 15390 15650 15651 15652 15653 15666 15667 15668 15669 15670 15671 15672 15673 15674 15675 15680 15681 15682 15684 15685 15686 15687 15688 15689 15690 15691 15697 15698 15700 15703 15704 15705 15706 15707 15708 15709 15711 15712 15713 15714 15721 15722 15733 15734 15735 15848 15849 15884 Superseder:
Assigned To: Nosy List: Robin.Schreiber, belopolsky, loewis, ncoghlan, pitrou, vstinner
Priority: normal Keywords:

Created on 2012-08-27 03:36 by belopolsky, last changed 2022-04-11 14:57 by admin.

Messages (8)
msg169177 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2012-08-27 03:36
This is a meta-issue to keep track of a global PEP 3121 refactoring effort.  Per-module issues will be added as dependencies. Let's move the discussion that is not specific to any particular module here.
msg169179 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2012-08-27 03:56
Robin,

Perhaps we should start with the "xx" modules: Modules/xxmodule.c and Modules/xxsubtype.c.  These modules server as a demonstration of best practices and it is natural to use them to iron out any refactoring issues without any risk to deployed code.
msg194600 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2013-08-07 09:21
"""
Regarding the suggestion of separating PEP3121 and PEP384. It might be true that datetime and other modules do not benefit directly from PEP 384, however it is still a fact that the stdlib modules should be seen as a set of reference modules, that are all implemented in a way that complies with the implementation fo the xxmodules.
I have talked with Martin von Löwis about this, and as far as I understood him correctly he also sees the PEP384 refactoring applied to the whole stdlib as a necessary "signal" to other developers to refactor their modules accordingly.
""" (Robin Schreiber, #15390, msg177274)

MvL have recently confirmed this on python-dev: "Choice of supporting PEP 384 was deliberate. It will change all types into heap types, which is useful for multiple-interpreter support and GC."

Accordingly, I've changed the title of this issue and added a few PEP 384 only dependencies.
msg194602 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2013-08-07 09:34
With respect to PEP 384 refactoring, I would like to see Tools/scripts/abitype.py used for most of the conversions.  The PEP itself can probably be amended to advertise this tool more prominently.
msg194889 - (view) Author: Robin Schreiber (Robin.Schreiber) * (Python triager) Date: 2013-08-11 11:11
I have in fact used abitype.py to produce all of my PEP 384 patches, however it failed to work correctly in like 50% of all cases, and I had to complete the rest of the patch by hand.I thought about correcting the abitype.py throughout the GSOC, but I happened to find it easier to simply do the missing steps by hand. (I don't know If the script has been fixed up to this point though).
In any case, it might also be interesting for external extension module developers to make use of a fully working version of this script, so they can make their modules PEP 384 compliant without investing too much time.
One has to keep in mind however that almost any script will fail to work by itself, once we run into problems like refcounting or concurrency when applying the patch to a module.

I will have some free time throughout next week and will start to correct the patches for the xx modules (as Alex proposed), and continue from there to all the other patches I have submitted a year ago.

I am deeply sorry that I have not continued my work on this project earlier, however I dramatically underestimated the amount if work related to university, etc... I still feel obliged to complete all these patches.
msg195098 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2013-08-13 21:18
I strongly believe that it is worthwhile to invest in fixing abitype.py.  It is much easier to review a patch to one python script than to review 50+ patches to C files.  There is no excuse for this tool not to work on all stdlib modules.  If there are any specific issues with the way individual modules are written that prevent automatic conversion, I would prefer to make a coding style change first and then include all modules in one automated PEP 384 conversion.
msg381428 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-11-19 14:11
The work is now tracked at bpo-1635741.
msg398434 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2021-07-28 22:21
> The work is now tracked at bpo-1635741.

Which work? bpo-1635741 does not appear to be a meta-issue and in msg381432 it loops back here.
History
Date User Action Args
2022-04-11 14:57:35adminsetgithub: 59991
2021-07-28 22:21:25belopolskysetmessages: + msg398434
versions: + Python 3.11, - Python 3.4
2020-11-19 14:11:49vstinnersetnosy: + vstinner

messages: + msg381428
title: PEP 3121, 384 Refactoring -> [meta issue] PEP 3121, 384 Refactoring
2019-03-15 22:26:06BreamoreBoysetnosy: - BreamoreBoy
2016-08-16 13:09:07r.david.murraylinkissue27734 superseder
2015-03-18 14:54:23ncoghlansetnosy: + ncoghlan
2014-10-14 15:46:28skrahsetnosy: - skrah
2014-07-11 00:30:19belopolskysetnosy: + BreamoreBoy
2013-08-13 21:18:18belopolskysetmessages: + msg195098
2013-08-11 11:11:50Robin.Schreibersetmessages: + msg194889
2013-08-07 09:34:13belopolskysetmessages: + msg194602
2013-08-07 09:23:36belopolskysetnosy: + pitrou
2013-08-07 09:21:46belopolskysetmessages: + msg194600
2013-08-07 09:13:37belopolskysetdependencies: + PEP 384 inconsistent with implementation
2013-08-07 09:10:29belopolskysetdependencies: + PEP 384 Refactoring applied to _csv module
title: PEP 3121 Refactoring -> PEP 3121, 384 Refactoring
2013-08-07 09:07:47belopolskysetdependencies: + PEP 3121, 384 refactoring applied to curses_panel module
2013-08-07 09:05:59belopolskysetdependencies: + PEP 3121 Refactoring applied to _csv module
2012-09-08 18:01:10belopolskysetdependencies: + PEP 3121, 384 Refactoring applied to ctypes module
2012-09-02 22:47:49belopolskysetdependencies: + PEP 3121, 384 Refactoring applied to xxsubtype module, PEP 3121, 384 Refactoring applied to xx module
2012-08-27 09:44:55skrahsetnosy: + skrah
2012-08-27 03:57:31belopolskysetnosy: + loewis
2012-08-27 03:56:27belopolskysetmessages: + msg169179
2012-08-27 03:49:13belopolskysetdependencies: + PEP 3121, 384 Refactoring applied to resource module, PEP 3121, 384 Refactoring applied to select module, PEP 3121, 384 Refactoring applied to sha1 module, PEP 3121, 384 Refactoring applied to sha256 module, PEP 3121, 384 Refactoring applied to sha512 module, PEP 3121, 384 Refactoring applied to signal module, PEP 3121, 384 Refactoring applied to socket module, PEP 3121, 384 Refactoring applied to termios module, PEP 3121, 384 Refactoring applied to time module, PEP 3121, 384 Refactoring applied to unicodedata module, PEP 3121, 384 Refactoring applied to zipimport module, PEP 3121, 384 Refactoring applied to grp module, PEP 3121, 384 Refactoring applied to tkinter module, PEP 3121, 384 Refactoring applied to decimal module, PEP 3121, 384 Refactoring applied to winapi module, PEP 3121, 384 Refactoring applied to spwd module, PEP 3121, 384 Refactoring applied to ossaudio module
2012-08-27 03:46:18belopolskysetdependencies: - Add VS CRT redist to the MSI installer
2012-08-27 03:46:04belopolskysetdependencies: + Add VS CRT redist to the MSI installer, PEP 3121 refactoring applied to fpetest module, PEP 3121, 384 Refactoring applied to itertools module, PEP 3121, 384 Refactoring applied to md5 module, PEP 3121, 384 Refactoring applied to mmap module, PEP 3121 Refactoring applied to nis module, PEP 3121, 384 Refactoring applied to operator module, PEP 3121, 384 Refactoring applied to parser module, PEP 3121, 384 Refactoring applied to posix module, PEP 3121 refactoring applied to pwd module, PEP 3121, 384 Refactoring applied to pyexpat module
2012-08-27 03:42:36belopolskysetdependencies: + PEP 3121, 384 refactoring applied to pickle module, PEP 3121, 384 Refactoring applied to random module, PEP 3121, 384 Refactoring applied to sre module, PEP 3121, 384 Refactoring applied to ssl module, PEP 3121, 384 Refactoring applied to struct module, PEP 3121, 384 Refactoring applied to testbuffer module, PEP 3121, 384 Refactoring applied to testcapi module, PEP 3121, 384 Refactoring applied to _thread module, PEP 3121, 384 Refactoring applied to array module, PEP 3121 refactoring applied to audioop module, PEP 3121 refactoring applied to binascii module, PEP 3121 refactoring applied to fpectl module
2012-08-27 03:41:57belopolskysetdependencies: + PEP 3121, 384 refactoring applied to elementtree module, PEP 3121, 384 refactoring applied to gdbm module, PEP 3121, 384 refactoring applied to hashopenssl module, PEP 3121, 384 refactoring applied to lzma module
2012-08-27 03:40:58belopolskysetdependencies: + PEP 3121, 384 refactoring applied to curses module, PEP 3121, 384 refactoring applied to _datetime module, PEP 3121, 384 refactoring applied to dbm module
2012-08-27 03:36:04belopolskycreate