Skip to content

Commit

Permalink
Mark Compat.Pkg from #485 for deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Oct 8, 2019
1 parent 915052a commit 556c767
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 19 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ Currently, the `@compat` macro supports the following syntaxes:

## Module Aliases

* `using Compat.Pkg` is provided on versions older than 0.7, where this library is
not yet part of the standard library ([#25705]). Note that `Compat.Pkg` will point to
the new package manager on 0.7 which does not have a fully compatible API with the old
package manager.

* `using Compat.InteractiveUtils` is provided on versions older than 0.7, where this library is
not yet part of the standard library ([#25780]).

Expand Down
7 changes: 1 addition & 6 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const IteratorSize = Base.IteratorSize
const IteratorEltype = Base.IteratorEltype
enable_debug(x::Bool) = x
import Distributed
import Pkg


include("compatmacro.jl")
Expand All @@ -72,12 +73,6 @@ end
end
end

@static if VERSION < v"0.7.0-DEV.3656"
const Pkg = Base.Pkg
else
import Pkg
end

@static if VERSION < v"0.7.0-DEV.3630"
@eval module InteractiveUtils
using Base: @code_llvm, @code_lowered, @code_native, @code_typed,
Expand Down
8 changes: 8 additions & 0 deletions test/old.jl
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,14 @@ let v = [1, 2, 3]
@test Compat.IteratorEltype(v) == Base.HasEltype()
end

module TestPkg
using Compat
using Compat.Pkg
using Compat.Test
@test isdefined(@__MODULE__, :Pkg)
@test isdefined(Compat.Pkg, :add)
end


# tests of removed functionality (i.e. justs tests Base)

Expand Down
8 changes: 0 additions & 8 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@ end

@test codeunit("foo") == codeunit(SubString("fooαβγ",1,3)) == UInt8

module TestPkg
using Compat
using Compat.Pkg
using Compat.Test
@test isdefined(@__MODULE__, :Pkg)
@test isdefined(Compat.Pkg, :add)
end

module TestInteractiveUtils
using Compat
using Compat.InteractiveUtils
Expand Down

0 comments on commit 556c767

Please sign in to comment.