[issue20158] Argument Clinic: add --clean option
Georg Brandl added the comment: Another use case here is if you want to check the remaining call sites of (say) PyArg_ParseTuple that aren't generated by clinic. Call it '--remove' if you want, but the functionality should be useful. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20158 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20158] Argument Clinic: add --clean option
Larry Hastings added the comment: You can accomplish that workflow by using the Clinic buffer prototype and moving all your output to the side. Or by using the buffer approach, and stopping when you hit the generated code. One of these might actually happen in Clinic, too, so hang on to your hats. https://bitbucket.org/larry/python-clinic-buffer -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20158 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20158] Argument Clinic: add --clean option
New submission from Serhiy Storchaka: It will be helpful to add the --clean option for the clinic tool, which removes all Argument Clinic generated code. -- messages: 207515 nosy: larry, serhiy.storchaka priority: normal severity: normal status: open title: Argument Clinic: add --clean option type: enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20158 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20158] Argument Clinic: add --clean option
Larry Hastings added the comment: When would you want this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20158 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20158] Argument Clinic: add --clean option
Serhiy Storchaka added the comment: As fast as it is possible. This shouldn't be hard task, Argument Clinic already clean old generated code before inserting new code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20158 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20158] Argument Clinic: add --clean option
Larry Hastings added the comment: I meant, under what circumstances would you want to use this? I don't know why you would ever want --clean. Removing the output from the Argument Clinic blocks would break any file using it. And Argument Clinic is sufficiently fast, if you were worried about the output being wrong you could just run it again. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20158 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20158] Argument Clinic: add --clean option
Serhiy Storchaka added the comment: This would just make sources more readable and editable. While I read, write or edit code, I don't want generated code distract me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20158 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20158] Argument Clinic: add --clean option
Larry Hastings added the comment: I don't think Argument Clinic should do this. It would leave the file in a broken state. But if it's an option on clinic.py it might tempt somebody into using it, then they'd be confused. If you want this functionality, please hack it up yourself locally. I wouldn't accept this as a patch. Personally I just got used to the Clinic generated code. -- resolution: - rejected stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20158 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20158] Argument Clinic: add --clean option
Larry Hastings added the comment: Consider: if you ran clinic.py --clean on a C file, then tried to use make clinic, the makefile would first try to build the C file. But since the C file is now broken, the make would fail. And you can't use make clinic to regenerate the Clinic output. Obviously this is fixable, but for someone unfamiliar with Argument Clinic this could be very confusing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20158 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20158] Argument Clinic: add --clean option
Serhiy Storchaka added the comment: How it differs from the case when you just edit clinic declaration and *_impl function? Until you run clinic on this source file, it is broken. I see that peoples already confused by Argument Clinic and manually edit generated code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20158 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20158] Argument Clinic: add --clean option
Larry Hastings added the comment: If you edit the Clinic input and don't run clinic.py on it, it's out-of-date but not broken. If you edit the Clinic output and make a mistake, it's *your* fault. If you ran clinic.py --clean, now you've broken your file *and* the normal Clinic build system and you were using the tool correctly. It's the *tool's* fault. I will admit to having very little interest in adding a command-line option called --clean that breaks everything. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20158 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20158] Argument Clinic: add --clean option
Serhiy Storchaka added the comment: If you ran clinic.py --clean and then not ran clinic.py without --clean, it's *your* fault. And you will noticed this when run make. I have named this option --clean because it is similar to 'make clean' and 'make distclean'. If you want make automatically call clinic.py, lets 'make clinic' create the .clinic file, 'clinic.py --clean' remove it, and 'make' check if this file exists and run 'make clinic' otherwise. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20158 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20158] Argument Clinic: add --clean option
Larry Hastings added the comment: I must admit I am losing patience with this conversation. Argument Clinic is not going to provide an attractively-named option that breaks your build and requires fixing by hand. The bug is closed, the feature is not happening, it's my hope that we can now move on. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20158 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com