classification
Title: did 2.6.3 regress for some uses of the __doc__ property?
Type: behavior Stage: committed/rejected
Components: Interpreter Core Versions: Python 2.7, Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: barry, moriyoshi, pitrou, pveloz, r.david.murray, zooko
Priority: high Keywords:

Created on 2009-10-21 23:22 by zooko, last changed 2010-12-14 15:43 by r.david.murray. This issue is now closed.

Messages (12)
msg94329 - (view) Author: Zooko O'Whielacronx (zooko) Date: 2009-10-21 23:22
According to 
https://bugs.edge.launchpad.net/ubuntu/+source/boost1.38/+bug/457688 , 
Python 2.6.3 stopped working for something that Python 2.6.2 worked for, 
involving Boost.

Andrew Mitchell looked at the Python 2.6.3 release notes, saw 
http://bugs.python.org/issue5890 which was fixed by 
http://svn.python.org/view/python/branches/release26-
maint/Objects/descrobject.c?r1=71756&r2=72302&pathrev=72302 .  Could this 
patch be causing this problem?
msg94330 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2009-10-21 23:34
I think this is caused by the fix for bug 5890 and isn't a regression.
msg94333 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2009-10-22 02:02
Apparently this affects more than just Boost.  lifeless (Robert Collins)
tells me that "__doc__ becoming readonly buggered some code of ours in
bzr too, IIRC".

He thinks it was in pure Python (i.e. not extension code).  Does anybody
have a pure Python reproducible example?
msg94342 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2009-10-22 14:40
Robert indicated later that this probably did /not/ affect Bazaar.
msg94343 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-10-22 14:41
I added some tests in test_property in my checkout and the __doc__
property is not, as far as I can tell, set read-only by the issue 5890 fix.

The error message referenced in the report is:

AttributeError: 'Boost.Python.StaticProperty' object attribute '__doc__'
is read-only

If Boost.Python.StaticProperty is a subclass of Property, which seems
likely, then the 5890 fix could well be triggering this error, since if
a property created with a subclass is given a docstring, the fix creates
a __doc__ attribute in the subclass's dict.  If the subclass dict is
read only, the above error would be triggered.

I don't know enough about extension types to know if the property code
should be special casing extension types, but if it should, then IMO
that would qualify 5890 as a regression.  Otherwise I don't think it is,
though we could still consider whether making a change to reduce user
pain is worthwhile.  (To be worthwhile it would have to be likely to
reach the users before the Boost fix does...apparently Boos has a fix in
their SVN for this problem.)

I'm guessing that this is a problem only with extension types, not with
pure Python code.
msg94344 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-10-22 14:43
That should have been 'instance's dict', not the subclass dict.
msg94348 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2009-10-22 15:01
Thanks David, that's what I suspect too (that's its a problem with
extension types).  Unless we get more information, I'm not inclined to
hold up the 2.6.4 release for this.
msg94356 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-10-22 15:50
I'm not sure I understand, how do you create a "read-only instance dict"?
msg94360 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-10-22 15:55
I'm not sure you do.  I have no idea how Boost works, but the fact that
removing a Boost 'read-only' declaration circumvents the problem in at
least some cases argues that Boost is setting _something_ read-only.
msg94367 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2009-10-22 18:36
After discussion on python-dev, this will not block 2.6.4
msg95156 - (view) Author: Moriyoshi Koizumi (moriyoshi) Date: 2009-11-12 05:03
See my comment on issue #5890. I attached a patch to solve the
Boost.Python issue.
msg123956 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-12-14 15:43
Since boost has changed their code and no one else has reported a problem and 2.6 is now in bug fix only mode, I'm going to close this as out of date (sorry I overlooked it for 2.6.5).  

If anyone disagrees, let me know what we should change and why in 2.7.
History
Date User Action Args
2010-12-14 15:43:18r.david.murraysetstatus: open -> closed
resolution: out of date
messages: + msg123956

stage: test needed -> committed/rejected
2010-11-30 05:42:52eric.araujosetversions: + Python 2.7
2009-11-15 14:33:16orsenthilsetnosy: + pveloz
2009-11-12 05:03:39moriyoshisetnosy: + moriyoshi
messages: + msg95156
2009-10-22 18:36:17barrysetpriority: release blocker -> high

messages: + msg94367
2009-10-22 15:55:41r.david.murraysetmessages: + msg94360
2009-10-22 15:50:21pitrousetnosy: + pitrou
messages: + msg94356
2009-10-22 15:01:33barrysetmessages: + msg94348
2009-10-22 14:43:44r.david.murraysetmessages: + msg94344
2009-10-22 14:41:43r.david.murraysetnosy: + r.david.murray
messages: + msg94343

type: behavior
stage: test needed
2009-10-22 14:40:06barrysetmessages: + msg94342
2009-10-22 02:02:06barrysetpriority: release blocker

messages: + msg94333
2009-10-21 23:34:17barrysetnosy: + barry
messages: + msg94330
2009-10-21 23:22:36zookocreate