From 45952124083d0c25a0b16810c54bb591c0f70f76 Mon Sep 17 00:00:00 2001 From: odow Date: Mon, 25 Aug 2025 15:22:38 +1200 Subject: [PATCH] Fix deprecation of DisjointSets(xs...) to avoid warning on package load --- src/deprecations.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/deprecations.jl b/src/deprecations.jl index 78eac122c..84b014435 100644 --- a/src/deprecations.jl +++ b/src/deprecations.jl @@ -6,7 +6,11 @@ # Deprecations from #700 Base.@deprecate_binding DisjointSets DisjointSet Base.@deprecate_binding IntDisjointSets IntDisjointSet -@deprecate DisjointSets(xs...) DisjointSet(xs) +# We won't want to make this `@deprecate DisjointSets(xs...) DisjointSet(xs)` +# because then loading this package will trigger a deprecation warning when we +# evaluate the deprecated DisjointSets binding. This breaks any package that +# tries to load DataStructures with --depwarn=error +@deprecate DisjointSet(xs...) DisjointSet(xs) # Enqueue and dequeue deprecations @deprecate enqueue!(q::Queue, x) Base.push!(q, x) @deprecate enqueue!(q::PriorityQueue, x) Base.push!(q, x)