ZODB.utils grows a new function positive_id(), which returns the id() of
an object as a non-negative integer. Code trying to pass addresses to an %x format uses positive_id(), and this avoids a Python FutureWarning about applying %x to negative ints. The primary difference between this and the last stab is that positive_id() should work OK on 64-bit boxes too. What we really want here is C's %p format code, but in Python we can't even reliably know the width of native addresses.
Showing
Please register or sign in to comment