From 46389bf45d57d63b93f874995c13c30aafa1b019 Mon Sep 17 00:00:00 2001 From: Martin Holters Date: Fri, 4 Oct 2019 21:47:19 +0200 Subject: [PATCH] Drop compat for `axes` #435 and #442 --- README.md | 3 --- src/Compat.jl | 7 ------- test/old.jl | 5 +++++ test/runtests.jl | 5 ----- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 9300af228..d9428dca3 100644 --- a/README.md +++ b/README.md @@ -152,9 +152,6 @@ Currently, the `@compat` macro supports the following syntaxes: * `reprmime(mime, x)` is now `repr(mime, x)` ([#25990]) and `mimewritable` is now `showable` ([#26089]). -* `indices` is now `axes` ([#25057]). This function is not exported from Compat to avoid - conflicts with AxisArrays and other such packages. - * `Void` is now `Nothing` with an alias `Cvoid` for C interop ([#25162]). * `Base.IteratorSize` and `Base.IteratorEltype` are available as diff --git a/src/Compat.jl b/src/Compat.jl index 972d4a9f0..8bc83c521 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -47,13 +47,6 @@ end include("compatmacro.jl") -# 0.7.0-DEV.2978 -@static if !isdefined(Base, :axes) - const axes = Base.indices - # NOTE: Intentionally not exported to avoid conflicts with AxisArrays - #export axes -end - # 0.7.0-DEV.3137 @static if !isdefined(Base, :Nothing) const Nothing = Void diff --git a/test/old.jl b/test/old.jl index 903546531..479abccd9 100644 --- a/test/old.jl +++ b/test/old.jl @@ -572,3 +572,8 @@ end # 0.7.0-DEV.2951 @test AbstractDict === (isdefined(Base, :AbstractDict) ? Base.AbstractDict : Base.Associative) + +# 0.7.0-DEV.2978 +@test Compat.axes === (isdefined(Base, :axes) ? Base.axes : Base.indices) +@test Compat.axes(1) == () +@test Compat.axes(1,1) == 1:1 diff --git a/test/runtests.jl b/test/runtests.jl index 6dd2f4beb..534447692 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -80,11 +80,6 @@ let A = [1] @test x == 1 end -# 0.7.0-DEV.2978 -@test Compat.axes === (isdefined(Base, :axes) ? Base.axes : Base.indices) -@test Compat.axes(1) == () -@test Compat.axes(1,1) == 1:1 - # 0.7.0-DEV.3137 @test Nothing === (isdefined(Base, :Nothing) ? Base.Nothing : Base.Void) @test Nothing === Cvoid