mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-06 07:47:53 +10:00
18 lines
332 B
Python
Executable File
18 lines
332 B
Python
Executable File
"""UUID7 compatibility layer."""
|
|
|
|
import sys
|
|
import uuid
|
|
from importlib import import_module
|
|
|
|
if sys.version_info >= (3, 14):
|
|
_UUID7_GENERATOR = getattr(uuid, "uuid7")
|
|
else:
|
|
_UUID7_GENERATOR = getattr(import_module("uuid_extensions"), "uuid7")
|
|
|
|
|
|
def uuid7() -> uuid.UUID:
|
|
return _UUID7_GENERATOR()
|
|
|
|
|
|
__all__ = ["uuid7"]
|