This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients docs@python, mark.dickinson, terry.reedy
Date 2010-08-21.21:30:59
SpamBayes Score 3.1529779e-12
Marked as misclassified No
Message-id <1282426261.51.0.750718515758.issue9658@psf.upfronthosting.co.za>
In-reply-to
Content
This is definitely not a critical fix for 2.6 ;-)

The weakref.proxy doc says nothing about comparisons:

"weakref.proxy(object[, callback]) 
Return a proxy to object which uses a weak reference. This supports use of the proxy in most contexts instead of requiring the explicit dereferencing used with weak reference objects. The returned object will have a type of either ProxyType or CallableProxyType, depending on whether object is callable. Proxy objects are not hashable regardless of the referent; this avoids a number of problems related to their fundamentally mutable nature, and prevent their use as dictionary keys. callback is the same as the parameter of the same name to the ref() function."

so this is not a behavior bug.

A patch for 2.7 could include a note that the behavior changes in 3.x. The 3.x patch should only say what the 3.x behavior is. This is assuming that the behavior should be defined as in 3.x for all implementations. Since it seems straightforward, it seems reasonable to me to do so.

The comparison behavior of 'basic' types is actually defined in the ref manual section 5.9 Comparisons (3.1). Cross-type behavior is summarized as "Comparison of objects of the differing types depends on whether either of the types provide explicit support for the comparison." I think the detailed info for weakref proxys belongs with the weakref proxy entry as suggested above.
History
Date User Action Args
2010-08-21 21:31:01terry.reedysetrecipients: + terry.reedy, mark.dickinson, docs@python
2010-08-21 21:31:01terry.reedysetmessageid: <1282426261.51.0.750718515758.issue9658@psf.upfronthosting.co.za>
2010-08-21 21:30:59terry.reedylinkissue9658 messages
2010-08-21 21:30:59terry.reedycreate