diff --git a/sphinx_panels/tabs.py b/sphinx_panels/tabs.py index ac2a546..725a5f4 100644 --- a/sphinx_panels/tabs.py +++ b/sphinx_panels/tabs.py @@ -1,4 +1,8 @@ -from uuid import uuid4 +import os +import random +import time +import uuid + from typing import Optional from docutils import nodes @@ -10,6 +14,9 @@ LOGGER = getLogger(__name__) +rnd = random.Random() +rnd.seed(os.environ.get("SOURCE_DATE_EPOCH", time.time())) + def setup_tabs(app): app.add_directive("tabbed", TabbedDirective) @@ -122,7 +129,7 @@ class TabbedHtmlTransform(SphinxPostTransform): formats = ("html",) def get_unique_key(self): - return str(uuid4()) + return uuid.UUID(int=rnd.getrandbits(128), version=4).hex def run(self): matcher = NodeMatcher(nodes.container, type="tabbed")