From 94beed602d32fa1f9af6b5f8720219c5757f3729 Mon Sep 17 00:00:00 2001 From: Lilith Orion Hafner Date: Sun, 10 Sep 2023 11:40:45 -0500 Subject: [PATCH 1/3] Guard usage of Base internals (permute!!) --- src/PooledArrays.jl | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/PooledArrays.jl b/src/PooledArrays.jl index 1058f13..830feb6 100644 --- a/src/PooledArrays.jl +++ b/src/PooledArrays.jl @@ -307,14 +307,18 @@ function Base.invpermute!(x::PooledArray, p::AbstractVector{T}) where T<:Integer return x end -function Base.permute!!(x::PooledArray, p::AbstractVector{T}) where T<:Integer - Base.permute!!(x.refs, p) - return x +if isdefined(Base, :permute!!) + function Base.permute!!(x::PooledArray, p::AbstractVector{T}) where T<:Integer + Base.permute!!(x.refs, p) + return x + end end -function Base.invpermute!!(x::PooledArray, p::AbstractVector{T}) where T<:Integer - Base.invpermute!!(x.refs, p) - return x +if isdefined(Base, :invpermute!!) + function Base.invpermute!!(x::PooledArray, p::AbstractVector{T}) where T<:Integer + Base.invpermute!!(x.refs, p) + return x + end end Base.similar(pa::PooledArray{T,R}, S::Type, dims::Dims) where {T,R} = From b520d0de862ced38bdfa329cf17b30bd9eb6031d Mon Sep 17 00:00:00 2001 From: Lilith Orion Hafner Date: Mon, 11 Sep 2023 12:06:06 -0500 Subject: [PATCH 2/3] just delete them --- src/PooledArrays.jl | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/PooledArrays.jl b/src/PooledArrays.jl index 830feb6..ce58ff8 100644 --- a/src/PooledArrays.jl +++ b/src/PooledArrays.jl @@ -307,20 +307,6 @@ function Base.invpermute!(x::PooledArray, p::AbstractVector{T}) where T<:Integer return x end -if isdefined(Base, :permute!!) - function Base.permute!!(x::PooledArray, p::AbstractVector{T}) where T<:Integer - Base.permute!!(x.refs, p) - return x - end -end - -if isdefined(Base, :invpermute!!) - function Base.invpermute!!(x::PooledArray, p::AbstractVector{T}) where T<:Integer - Base.invpermute!!(x.refs, p) - return x - end -end - Base.similar(pa::PooledArray{T,R}, S::Type, dims::Dims) where {T,R} = PooledArray(RefArray(zeros(R, dims)), Dict{S,R}()) From 762875c0955365b11303eff4e5b654b517db4409 Mon Sep 17 00:00:00 2001 From: Lilith Orion Hafner Date: Sun, 17 Sep 2023 14:30:06 -0500 Subject: [PATCH 3/3] Bump version to 1.4.3 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 2eea368..2f11b82 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "PooledArrays" uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" -version = "1.4.2" +version = "1.4.3" [deps] DataAPI = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"