Re: What is the maximum IBTree key my system can use?

Sean Upton <[email protected]> Tue, 8 Jan 2019 09:15:46 -0700
Newsgroups gmane.comp.web.zope.zodb
Message-ID <[email protected]>
--Apple-Mail=_01C6CE0B-81F5-4FE4-932C-75B8A82D47F3
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"

BTrees.family64.IO.BTree is the same as BTrees.LOBTree =E2=80=94 either spe=
lling ouught to do what you need.

Pick integer values for keys between BTrees.family64.minint and  BTrees.fam=
ily64.maxint.

Why do you need 128-bit support?  If you want to use UUIDs as keys, use an =
OOBTree, or possibly a composition of pair of LOBTrees (one for UUID string=
 to long index, one for long to object).

Sean

> On Jan 8, 2019, at 8:12 AM, =C3=89loi Rivard <[email protected]> wrote:
>=20
> Hi.
> IOBTree()[(2**32)-1] =3D True is raising a TypeError on my computer, and =
in fact it seems the maximum key I can use is 2**31-1
> Is there a constant somewhere indicating the maximum key I can use in a I=
OBTree? I found that IBTreeFamily implements a maxint parameter, but how ca=
n I know which family I am using? <https://pythonhosted.org/BTrees/_modules=
/BTrees/Interfaces.html#IBTreeFamily>
> Is the maximum value the same for everyone? If no, how could I increase t=
his value?
> Also, what are your thoughts on 128-bit support <https://github.com/zopef=
oundation/BTrees/issues/100>?
>=20
> Thank you!
> =C3=89loi Rivard
>=20
>=20
>=20
> --=20
> You received this message because you are subscribed to the Google Groups=
 "zodb" group.
> To unsubscribe from this group and stop receiving emails from it, send an=
 email to [email protected] <mailto:zodb+unsubscribe@google=
groups.com>.
> For more options, visit https://groups.google.com/d/optout <https://group=
s.google.com/d/optout>.

--=20
You received this message because you are subscribed to the Google Groups "=
zodb" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to [email protected].
For more options, visit https://groups.google.com/d/optout.

--Apple-Mail=_01C6CE0B-81F5-4FE4-932C-75B8A82D47F3
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="UTF-8"

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; line-break: after-white-space;" class=3D""><div class=3D"">BTrees.fam=
ily64.IO.BTree is the same as BTrees.LOBTree =E2=80=94 either spelling ouug=
ht to do what you need.</div><div class=3D""><br class=3D""></div><div clas=
s=3D"">Pick integer values for keys between&nbsp;BTrees.family64.minint and=
&nbsp;&nbsp;BTrees.family64.maxint.<br class=3D""><div class=3D""><br class=
=3D""></div><div class=3D"">Why do you need 128-bit support? &nbsp;If you w=
ant to use UUIDs as keys, use an OOBTree, or possibly a composition of pair=
 of LOBTrees (one for UUID string to long index, one for long to object).</=
div><div class=3D""><br class=3D""></div><div class=3D"">Sean<br class=3D""=
><div><br class=3D""><blockquote type=3D"cite" class=3D""><div class=3D"">O=
n Jan 8, 2019, at 8:12 AM, =C3=89loi Rivard &lt;<a href=3D"mailto:azmeuk@gm=
ail.com" class=3D"">[email protected]</a>&gt; wrote:</div><br class=3D"Apple=
-interchange-newline"><div class=3D""><div dir=3D"ltr" class=3D""><div clas=
s=3D"">Hi.</div><div class=3D""><span style=3D"background-color: rgb(204, 2=
04, 204);" class=3D""><i class=3D""><b class=3D"">IOBTree()[(2**32)-1] =3D =
True</b></i></span> is raising a TypeError on my computer, and in fact it s=
eems the maximum key I can use is 2**31-1</div><ul class=3D""><li class=3D"=
">Is there a constant somewhere indicating the maximum key I can use in a I=
OBTree? I found that IBTreeFamily implements a maxint parameter, but how ca=
n I know which family I am using?<a class=3D"internal reference" href=3D"ht=
tps://pythonhosted.org/BTrees/_modules/BTrees/Interfaces.html#IBTreeFamily"=
><span class=3D"viewcode-link"></span></a><br class=3D""></li><li class=3D"=
">Is the maximum value the same for everyone? If no, how could I increase t=
his value?</li><li class=3D"">Also, what are your thoughts on <a href=3D"ht=
tps://github.com/zopefoundation/BTrees/issues/100" class=3D"">128-bit suppo=
rt</a>?</li></ul><div class=3D""><br class=3D""></div><div class=3D"">Thank=
 you!<br class=3D""></div><div class=3D"">=C3=89loi Rivard<br class=3D""></=
div><div class=3D""><br class=3D""></div><div class=3D""><br class=3D""></d=
iv></div><div class=3D""><br class=3D"webkit-block-placeholder"></div>

-- <br class=3D"">
You received this message because you are subscribed to the Google Groups "=
zodb" group.<br class=3D"">
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]" class=3D"">zod=
[email protected]</a>.<br class=3D"">
For more options, visit <a href=3D"https://groups.google.com/d/optout" clas=
s=3D"">https://groups.google.com/d/optout</a>.<br class=3D"">
</div></blockquote></div><br class=3D""></div></div></body></html>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;zodb&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">zodb+unsubscri=
[email protected]</a>.<br />
For more options, visit <a href=3D"https://groups.google.com/d/optout">http=
s://groups.google.com/d/optout</a>.<br />

--Apple-Mail=_01C6CE0B-81F5-4FE4-932C-75B8A82D47F3--