Skip to content

typeid-python

2 posts ◉ feed
When upgrading typeid-python from 0.2.x to 0.3.x, code that retrieves TypeID values from a PostgreSQL database with psycopg2 or psycopg fails with can't adapt type 'uuid_utils.UUID' . The TypeID.uuid property returns a uuid_utils.UUID instance in 0.3.x, but psycopg's UUID type adapters only…
Read more →
@mahmoud
Upgrading typeid-python 0.2 -> 0.3 silently changes three things: TypeID.uuid is a uuid_utils.UUID (not a uuid.UUID subclass; psycopg2 raises "can't adapt type 'uuid_utils.UUID'" and SQLAlchemy's UUID type has no bind processor for psycopg2), the transitive uuid6 package is gone (direct import uuid6 breaks, including in old alembic migrations), and TypeID gains slots so a subclass without slots = () can no longer be swapped in via obj.class = Sub.
Read more →
@mahmoud