Re: [ZODB-Dev] Default comparison considered harmful in BTrees.

2010-10-28 Thread Jim Fulton
On Thu, Oct 28, 2010 at 8:27 AM, Hanno Schlichting wrote: > On Wed, Oct 27, 2010 at 8:56 PM, Jim Fulton wrote: ... >> As I said earlier, in 3.11, it will be an error to use an object with >> default comparison as a key, but loading state with such objects will >> only warn. Looking at this a b

Re: [ZODB-Dev] Default comparison considered harmful in BTrees.

2010-10-28 Thread Hanno Schlichting
On Wed, Oct 27, 2010 at 8:56 PM, Jim Fulton wrote: > On Wed, Oct 27, 2010 at 1:59 PM, Hanno Schlichting wrote: > > I suppose that depends on the application.  Was the use of None > intentional, or the result of sloppy coding? I'd have to check the code. I expect it to be sloppy coding. > I'll m

Re: [ZODB-Dev] Default comparison considered harmful in BTrees.

2010-10-27 Thread Jim Fulton
On Mon, Oct 25, 2010 at 5:51 PM, Jim Fulton wrote: > I'm inclined to treat the use of the comparison operator inherited > from object in BTrees to be a bug.  I plan to fix this on the > trunk. > > I'm tempted to fix this in 10.1.  This change would make it impossible > to add keys to BTrees or buc

Re: [ZODB-Dev] Default comparison considered harmful in BTrees.

2010-10-27 Thread Jim Fulton
On Wed, Oct 27, 2010 at 1:59 PM, Hanno Schlichting wrote: > On Wed, Oct 27, 2010 at 6:45 PM, Jim Fulton wrote: >> If not, I wonder if the existing indexes have some bad values in >> them that are triggering this somehow.  The relevant check is being done >> when loading state.  I bet you have som

Re: [ZODB-Dev] Default comparison considered harmful in BTrees.

2010-10-27 Thread Hanno Schlichting
On Wed, Oct 27, 2010 at 6:45 PM, Jim Fulton wrote: > If not, I wonder if the existing indexes have some bad values in > them that are triggering this somehow.  The relevant check is being done > when loading state.  I bet you have some bad keys (e.g. None) in your > data structures. Could you chec

Re: [ZODB-Dev] Default comparison considered harmful in BTrees.

2010-10-27 Thread Jim Fulton
On Wed, Oct 27, 2010 at 9:17 AM, Hanno Schlichting wrote: > On Mon, Oct 25, 2010 at 11:51 PM, Jim Fulton wrote: >> I'm inclined to treat the use of the comparison operator inherited >> from object in BTrees to be a bug.  I plan to fix this on the >> trunk. > > Did you mean to throw warnings for s

Re: [ZODB-Dev] Default comparison considered harmful in BTrees.

2010-10-27 Thread Hanno Schlichting
On Mon, Oct 25, 2010 at 11:51 PM, Jim Fulton wrote: > I'm inclined to treat the use of the comparison operator inherited > from object in BTrees to be a bug.  I plan to fix this on the > trunk. Did you mean to throw warnings for simple built-in types? I'm now getting warnings for simple strings

Re: [ZODB-Dev] Default comparison considered harmful in BTrees.

2010-10-26 Thread Jim Fulton
On Mon, Oct 25, 2010 at 6:34 PM, Marius Gedminas wrote: ... > Or perhaps make it emit DeprecationWarnings, but continue working.  Then > make it a fatal error in the next minor/major release. I like this idea. I think I'm going to use UserWarning because it isn't disabled in Python 2.7 afaik. O

Re: [ZODB-Dev] Default comparison considered harmful in BTrees.

2010-10-26 Thread Chris Withers
On 25/10/2010 23:34, Marius Gedminas wrote: > Or perhaps make it emit DeprecationWarnings, but continue working. Then > make it a fatal error in the next minor/major release. Well, not a DeprecationWarning... Is there a DataLossWarning? Still, +1 on the warning followed by exception in 2 release

Re: [ZODB-Dev] Default comparison considered harmful in BTrees.

2010-10-26 Thread Pedro Ferreira
> Or perhaps make it emit DeprecationWarnings, but continue working. Then > make it a fatal error in the next minor/major release. > +1 Pedro -- José Pedro Ferreira Indico Team IT-UDS-AVC 513-R-0042 CERN, Geneva, Switzerland ___ For more inf

Re: [ZODB-Dev] Default comparison considered harmful in BTrees.

2010-10-25 Thread Marius Gedminas
On Mon, Oct 25, 2010 at 11:14:21PM +0100, David Glick wrote: > On 10/25/10 11:07 PM, Jim Fulton wrote: > > On Mon, Oct 25, 2010 at 5:58 PM, David Glick > > wrote: > >> On 10/25/10 10:51 PM, Jim Fulton wrote: > >>> I'm inclined to treat the use of the comparison operator inherited > >>> from objec

Re: [ZODB-Dev] Default comparison considered harmful in BTrees.

2010-10-25 Thread David Glick
On 10/25/10 11:07 PM, Jim Fulton wrote: > On Mon, Oct 25, 2010 at 5:58 PM, David Glick > wrote: >> On 10/25/10 10:51 PM, Jim Fulton wrote: >>> I'm inclined to treat the use of the comparison operator inherited >>> from object in BTrees to be a bug. I plan to fix this on the >>> trunk. >>> >>> I'

Re: [ZODB-Dev] Default comparison considered harmful in BTrees.

2010-10-25 Thread Jim Fulton
On Mon, Oct 25, 2010 at 5:58 PM, David Glick wrote: > On 10/25/10 10:51 PM, Jim Fulton wrote: >> I'm inclined to treat the use of the comparison operator inherited >> from object in BTrees to be a bug.  I plan to fix this on the >> trunk. >> >> I'm tempted to fix this in 10.1.  This change would m

Re: [ZODB-Dev] Default comparison considered harmful in BTrees.

2010-10-25 Thread David Glick
On 10/25/10 10:51 PM, Jim Fulton wrote: > I'm inclined to treat the use of the comparison operator inherited > from object in BTrees to be a bug. I plan to fix this on the > trunk. > > I'm tempted to fix this in 10.1. This change would make it impossible > to add keys to BTrees or buckets or to a