From cd90626f1dbf278989e6284a651fa1d6378c01fc Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 30 Nov 2024 12:26:56 -0600 Subject: [PATCH 1/2] feat: make v7 UUID values instead of v1 this is thanks to the presentation at https://www.youtube.com/watch?v=n9Cxs0sTqEY the basic rationale is that: - v1 UUID is "less private" in that MAC address can be deduced - v7 UUID has "better index performance" per sortable prefix we also need to store these as true UUID data type in postgres, but that will be a separate effort.. --- pyproject.toml | 1 + src/wuttjamaican/util.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7415569..3f68a36 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,6 +32,7 @@ dependencies = [ "progress", "python-configuration", "typer", + "uuid7", ] diff --git a/src/wuttjamaican/util.py b/src/wuttjamaican/util.py index 342868e..48c321d 100644 --- a/src/wuttjamaican/util.py +++ b/src/wuttjamaican/util.py @@ -28,7 +28,8 @@ import importlib import logging import os import shlex -from uuid import uuid1 + +from uuid_extensions import uuid7 log = logging.getLogger(__name__) @@ -176,7 +177,7 @@ def make_uuid(): :returns: A 32-character hex string. """ - return uuid1().hex + return uuid7().hex def parse_bool(value): From d44fe152154b232c8c917288421d6a3691216c19 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 30 Nov 2024 12:31:11 -0600 Subject: [PATCH 2/2] =?UTF-8?q?bump:=20version=200.15.0=20=E2=86=92=200.16?= =?UTF-8?q?.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a68bad1..ee32008 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to WuttJamaican will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## v0.16.0 (2024-11-30) + +### Feat + +- make v7 UUID values instead of v1 + ## v0.15.0 (2024-11-24) ### Feat diff --git a/pyproject.toml b/pyproject.toml index 3f68a36..96ce552 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" [project] name = "WuttJamaican" -version = "0.15.0" +version = "0.16.0" description = "Base package for Wutta Framework" readme = "README.md" authors = [{name = "Lance Edgar", email = "lance@edbob.org"}]