You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the spec, the typeid 00000000000000000000000000 should become an all-zero uuid:
Implementations SHOULD allow encoding/decoding of other UUID variants when the bits are provided by end users. This makes it possible for applications to encode other UUID variants like UUIDv1 or UUIDv4 at their discretion.
However, this implementation seems to be converting it to a uuid7 00000000-0000-7000-8000-000000000000
In [1]: from typeid import TypeID
In [2]: TypeID(suffix="00000000000000000000000000")
Out[2]: TypeID('00000000000000000000000000')
In [3]: TypeID(suffix="00000000000000000000000000").uuid
Out[3]: UUID('00000000-0000-7000-8000-000000000000')
Which means it is not roundtrip-safe when converting back to a typeid:
In [4]: TypeID.from_uuid(TypeID(suffix="00000000000000000000000000").uuid)
Out[4]: TypeID('0000000000e008000000000000')
The text was updated successfully, but these errors were encountered:
According to the spec, the typeid
00000000000000000000000000
should become an all-zero uuid:https://github.com/jetify-com/typeid/blob/3c625fbca835217be361e6ff16d3d4ec255470e6/spec/valid.yml#L28-L31
However, this implementation seems to be converting it to a uuid7
00000000-0000-7000-8000-000000000000
Which means it is not roundtrip-safe when converting back to a typeid:
The text was updated successfully, but these errors were encountered: