Skip to content

Commit

Permalink
Mark Compat.Test, Compat.SharedArrays, Compat.Mmap, and `Compat…
Browse files Browse the repository at this point in the history
….DelimitedFiles` from #404 for deprecation
  • Loading branch information
martinholters committed Oct 1, 2019
1 parent cb976e9 commit cc0b678
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 36 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down
18 changes: 1 addition & 17 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions test/old.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
15 changes: 0 additions & 15 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc0b678

Please sign in to comment.