File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class UUIDv6PrimaryKey(SentinelMixin):
4141
4242 def __init_subclass__ (cls , ** kwargs : Any ) -> None :
4343 super ().__init_subclass__ (** kwargs )
44- if not UUID_UTILS_INSTALLED and not cls .__module__ .startswith ("advanced_alchemy" ): # pragma: no cover
44+ if not _PYTHON_SUPPORTS_UUID6_7 and not UUID_UTILS_INSTALLED and not cls .__module__ .startswith ("advanced_alchemy" ): # pragma: no cover
4545 logger .warning ("`uuid-utils` not installed, falling back to `uuid4` for UUID v6 generation." )
4646
4747 id : Mapped [UUID ] = mapped_column (default = uuid6 , primary_key = True , sort_order = - 100 )
@@ -54,7 +54,7 @@ class UUIDv7PrimaryKey(SentinelMixin):
5454
5555 def __init_subclass__ (cls , ** kwargs : Any ) -> None :
5656 super ().__init_subclass__ (** kwargs )
57- if not UUID_UTILS_INSTALLED and not cls .__module__ .startswith ("advanced_alchemy" ): # pragma: no cover
57+ if not _PYTHON_SUPPORTS_UUID6_7 and not UUID_UTILS_INSTALLED and not cls .__module__ .startswith ("advanced_alchemy" ): # pragma: no cover
5858 logger .warning ("`uuid-utils` not installed, falling back to `uuid4` for UUID v7 generation." )
5959
6060 id : Mapped [UUID ] = mapped_column (default = uuid7 , primary_key = True , sort_order = - 100 )
You can’t perform that action at this time.
0 commit comments