Skip to content

Deprecation warning for _unsetindex! for Julia 1.14 nightly #986

Description

@kbarros

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 (JuliaLang/julia#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: JuliaCollections/OrderedCollections.jl#172.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions