Skip to content

Add uuid7 function #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2024
Merged

Add uuid7 function #9

merged 1 commit into from
Jun 19, 2024

Conversation

jaap3
Copy link

@jaap3 jaap3 commented Jun 19, 2024

UUIDv7 is now final (https://datatracker.ietf.org/doc/html/rfc9562, published May 2024), since it's been finalised very recently it's not yet available in Python (python/cpython#89083).

I've looked PyPI and found https://github.com/oittaa/uuid6-python to be the most trustworthy implementation that could be used as a dependency. However, I decided to "vendor" the implementation that is proposed to be included in CPython (python/cpython#120650).

This PR is very recent (2024-06-17T15:42:35Z) and has been updated even more recently (2024-06-19T07:39:18Z).

I've only taken the code that generates UUID v7 and slightly modified it so it works in our Python version, and doesn't violate our lint checks.

I've verified that the UUID generated is valid using https://uuid7.com/.

@jaap3 jaap3 requested review from dbunskoek and bheesink June 19, 2024 11:29
Copy link

linear bot commented Jun 19, 2024

HIDP-8 Investigate uuid7 library for python

Nice to have, see https://uuid7.com/ for the benefits.

@jaap3 jaap3 merged commit a0c0729 into main Jun 19, 2024
2 checks passed
@jaap3 jaap3 deleted the HIDP-8-uuidv7 branch June 19, 2024 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants