Browse Source

uuid generation: replace use of ossp.org's uuid tool with python's built-in uuid module

Fabian Peter Hammerle 1 year ago
parent
commit
42bb5cef15
1 changed files with 2 additions and 4 deletions
  1. 2 4
      symuid/_uuid.py

+ 2 - 4
symuid/_uuid.py

@@ -1,4 +1,4 @@
-import subprocess
+import uuid
 
 
 def uuid_str_to_int(uuid_str: str) -> int:
@@ -65,6 +65,4 @@ def uuid_bytes_to_str(uuid_bytes: bytes) -> str:
 
 
 def generate_uuid4_bytes() -> bytes:
-    return subprocess.run(
-        ["uuid", "-v", "4", "-F", "BIN"], stdout=subprocess.PIPE, check=True
-    ).stdout.strip()
+    return uuid.uuid4().bytes