feat(halachot): Phase 6 — deprecate equivalent_halachot writes post-V41
- halacha_batch_reconcile.py --link now exits with error (V41 freezes equivalent_halachot; equivalences live in canonical_id instead) - link_equivalent_halachot emits DeprecationWarning (callers ≥ Python 3.2) - SCRIPTS.md already marks --link as deprecated; no further doc change needed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5936,11 +5936,21 @@ def _equiv_order(a: UUID, b: UUID) -> tuple[UUID, UUID]:
|
||||
async def link_equivalent_halachot(
|
||||
a: UUID, b: UUID, *, cosine: float = 0.0, note: str = "", created_by: str = "",
|
||||
) -> bool:
|
||||
"""Record that two halachot (different precedents) state the same principle.
|
||||
"""[DEPRECATED since V41] Record a parallel-authority link in equivalent_halachot.
|
||||
|
||||
The canonical_halachot model (V41) supersedes this table — cross-precedent
|
||||
equivalence is now expressed via halachot.canonical_id. This function is kept
|
||||
for historical callers only; no new code should call it. Use
|
||||
``create_canonical_halacha`` + ``nearest_canonical_halacha`` instead.
|
||||
|
||||
Idempotent (symmetric UNIQUE). Returns False and does nothing if a == b or
|
||||
the two belong to the SAME precedent (parallel authority is cross-precedent
|
||||
by definition; within-precedent sameness is the dedup/cluster concern)."""
|
||||
the two belong to the SAME precedent."""
|
||||
import warnings
|
||||
warnings.warn(
|
||||
"link_equivalent_halachot is deprecated since V41 (canonical_halachot). "
|
||||
"Use create_canonical_halacha / nearest_canonical_halacha instead.",
|
||||
DeprecationWarning, stacklevel=2,
|
||||
)
|
||||
if a == b:
|
||||
return False
|
||||
pool = await get_pool()
|
||||
|
||||
Reference in New Issue
Block a user