//! Per-type, per-interpreter Python-class cache.
//!
//! The derive gives each enum type a dedicated `static CACHE: PyOnceLock<Py<PyType>>`.
//! This module owns the accessor that initialises the cell on first use via
//! [`crate::construct::build_py_enum`] and returns a borrowed `Bound<'py, PyType>`
//! on every subsequent call.
use *;
use PyOnceLock;
use PyType;
use cratebuild_py_enum;
use cratePyEnumSpec;
/// Returns the Python class for `spec`, constructing it on first call under
/// the GIL and caching the result in `cell`.
///
/// Concurrent first-call attempts from multiple Python threads holding the
/// GIL are serialised by [`PyOnceLock`], so exactly one construction runs
/// per interpreter per derived type.