classification
Title: Argument Clinic: self converters are not preserved when cloning functions
Type: behavior Stage:
Components: Build, Demos and Tools Versions: Python 3.4
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: larry, taleinat
Priority: normal Keywords:

Created on 2014-01-21 10:01 by taleinat, last changed 2014-01-25 16:05 by larry. This issue is now closed.

Messages (4)
msg208633 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2014-01-21 10:01
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?
msg209202 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-01-25 15:07
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.
msg209212 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2014-01-25 16:03
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.
msg209214 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-01-25 16:05
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
2014-01-25 16:05:51larrysetmessages: + msg209214
2014-01-25 16:03:20taleinatsetmessages: + msg209212
2014-01-25 15:07:55larrysetstatus: open -> closed
resolution: works for me
messages: + msg209202
2014-01-21 10:28:48vajraskysettitle: Argument Clinic: self converters are not preserved when clonig functions -> Argument Clinic: self converters are not preserved when cloning functions
2014-01-21 10:01:26taleinatcreate