JuliaCollections / JuliaCollections/DataStructures.jl
Deprecation warning for `_unsetindex!` for Julia 1.14 nightly
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 745
- Forks
- 261
- PR merge metrics
- No merged PRs in 30d
Description
On the nightly Julia builds, I'm seeing:
┌ Warning: `_unsetindex!(A, i)` is deprecated, use `Base.unsetindex!(A, i)` instead.
│ caller = popfirst!(d::DataStructures.Deque{Tuple{Float64, Vector{Int64}}}) at deque.jl:326
└ @ DataStructures ~/.julia/packages/DataStructures/IwRP2/src/deque.jl:326
Looks like Base.unsetindex! will be introduced in 1.14, specifically with DataStructures support in mind (https://github.com/JuliaLang/julia/issues/58943).
AI thinks this guard would support both forms and quiet the warning:
@static if isdefined(Base, :unsetindex!)
unsetindex!(A, i) = Base.unsetindex!(A, i)
else
unsetindex!(A, i) = Base._unsetindex!(A, i)
end
See related discussion here: https://github.com/JuliaCollections/OrderedCollections.jl/issues/172.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at deque.jl:326, where popfirst! calls the deprecated _unsetindex! on DataStructures.Deque. Check the related OrderedCollections.jl discussion and Julia issue for compatibility expectations, then verify the warning is gone on Julia 1.14 nightly while older Julia versions remain supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 78/100