In Objects/bytes.c, the strip methods need a "self converter" so that they get a PyBytesObject* instead of PyObject*. However, having set this in bytes.strip and "cloning" that clinic definition for bytes.lstrip and bytes.rstrip, it appears that the self converter wasn't set on lstrip and rstrip. Removing the cloning and copying the argument definitions resolved the issue. Is this a bug?
You didn't give me a test case, and I can't reproduce this. Either it was accidentally fixed already, or there's something else going on in your test case. I'm closing this for now as unreproducable. If you see the problem again, please reopen this issue.
You're right, this issue does indeed seem to have been resolved since I created this issue. I just checked this on Objects/bytesobject.c with the latest version and get the desired output. So you've done right to close this issue. I'd like to note that I most certainly did supply a way to reproduce this issue! I described it precisely and concisely. Consider, also, that I was only asking if this is a bug since I wasn't sure. If someone had replied "this sounds like a bug, please supply code for which reproduces this" then I would have supplied such code. Just to be sure, I just checked this again with clinic.py from revision 88635:fbc31e0b0c77 (Tue Jan 21, the day I reported this issue) and I get precisely the behavior I described. So the issue did exist at the time when I reported it and the test case I supplied is sound.
You didn't supply a test case, nor is there any code checked in that reproduced the issue. I had to make a test case by hand.
History
Date
User
Action
Args
2022-04-11 14:57:57
admin
set
github: 64524
2014-01-25 16:05:51
larry
set
messages: +
2014-01-25 16:03:20
taleinat
set
messages: +
2014-01-25 15:07:55
larry
set
status: open -> closedresolution: works for memessages: +
2014-01-21 10:28:48
vajrasky
set
title: Argument Clinic: self converters are not preserved when clonig functions -> Argument Clinic: self converters are not preserved when cloning functions