diff --git a/README.md b/README.md index e42ba368a..b3ea19937 100644 --- a/README.md +++ b/README.md @@ -52,10 +52,6 @@ Currently, the `@compat` macro supports the following syntaxes: ## Module Aliases -* `using Compat.Test`, `using Compat.SharedArrays`, `using Compat.Mmap`, and `using - Compat.DelimitedFiles` are provided on versions older than 0.7, where these are not yet - part of the standard library. ([#23931]) - * `using Compat.Base64` is provided on versions older than 0.7, where this library is not yet a part of the standard library. ([#24361]) diff --git a/src/Compat.jl b/src/Compat.jl index 31b17f626..7c21796b9 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -19,27 +19,11 @@ module Sys BINDIR = Base.Sys.BINDIR end import Base.MathConstants +import Test, SharedArrays, Mmap, DelimitedFiles include("compatmacro.jl") -# 0.7.0-DEV.2005 -if VERSION < v"0.7.0-DEV.2005" - const Mmap = Base.Mmap - const Test = Base.Test - @eval module SharedArrays - if isdefined(Base, :Distributed) - using Base.Distributed.procs - else - using Base.procs - end - export SharedArray, SharedMatrix, SharedVector, indexpids, localindexes, sdata, - procs - end - const DelimitedFiles = Base.DataFmt -else - import Test, SharedArrays, Mmap, DelimitedFiles -end if VERSION < v"0.7.0-DEV.2575" const Dates = Base.Dates diff --git a/test/old.jl b/test/old.jl index f0c7d17b4..826db73a5 100644 --- a/test/old.jl +++ b/test/old.jl @@ -71,6 +71,21 @@ using Compat end @test isdefined(TestMathConstants2, :ℯ) && !Base.isdeprecated(TestMathConstants, :ℯ) +# 0.7 +module Test23876 + using Compat + using Compat.Test + import Compat.DelimitedFiles + using Compat.Mmap, Compat.SharedArrays + using Compat.Distributed + @test isdefined(@__MODULE__, :DelimitedFiles) + @test isdefined(SharedArrays, :SharedArray) + @test isdefined(@__MODULE__, :SharedArray) + @test isdefined(@__MODULE__, :procs) + @test isdefined(@__MODULE__, :remote_do) + @test isdefined(Mmap, :mmap) +end + # tests of removed functionality (i.e. justs tests Base) diff --git a/test/runtests.jl b/test/runtests.jl index dc502fe85..0baa9f62a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -72,21 +72,6 @@ if VERSION < v"0.7.0-DEV.880" end end -# 0.7 -module Test23876 - using Compat - using Compat.Test - import Compat.DelimitedFiles - using Compat.Mmap, Compat.SharedArrays - using Compat.Distributed - @test isdefined(@__MODULE__, :DelimitedFiles) - @test isdefined(SharedArrays, :SharedArray) - @test isdefined(@__MODULE__, :SharedArray) - @test isdefined(@__MODULE__, :procs) - @test isdefined(@__MODULE__, :remote_do) - @test isdefined(Mmap, :mmap) -end - # 0.7 module Test24459 using Compat