Title: Extract generated clinic code in Modules/_pickle.c to separate file
Type: Stage: resolved
Components: Versions: Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: alexandre.vassalotti, larry, pitrou, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2014-01-26 11:05 by serhiy.storchaka, last changed 2014-01-27 09:52 by serhiy.storchaka. This issue is now closed.

File name Uploaded Description Edit
pickle_clinic.patch serhiy.storchaka, 2014-01-26 11:05 review
Messages (5)
msg209293 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-01-26 11:05
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.
msg209295 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-01-26 11:30
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).
msg209348 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-01-26 19:55
+1 for a separate file from me.
msg209369 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2014-01-26 23:54
+1 from me as well for a separate file.
msg209423 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-01-27 09:33
New changeset 1aa8ea187560 by Serhiy Storchaka in branch 'default':
Issue #20395: Extract generated clinic code in Modules/_pickle.c to separate file.
Date User Action Args
2014-01-27 09:52:31serhiy.storchakasetstatus: open -> closed
assignee: serhiy.storchaka
resolution: fixed
stage: patch review -> resolved
2014-01-27 09:33:38python-devsetnosy: + python-dev
messages: + msg209423
2014-01-26 23:54:36alexandre.vassalottisetmessages: + msg209369
2014-01-26 19:55:20pitrousetmessages: + msg209348
2014-01-26 11:30:07larrysetmessages: + msg209295
2014-01-26 11:05:39serhiy.storchakacreate