From 556c76714bce78f98ac2c6f12cc3798550d01cf4 Mon Sep 17 00:00:00 2001 From: Martin Holters Date: Tue, 8 Oct 2019 17:05:11 +0200 Subject: [PATCH] Mark `Compat.Pkg` from #485 for deprecation --- README.md | 5 ----- src/Compat.jl | 7 +------ test/old.jl | 8 ++++++++ test/runtests.jl | 8 -------- 4 files changed, 9 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 20e7a2fa9..4f26c26d9 100644 --- a/README.md +++ b/README.md @@ -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]). diff --git a/src/Compat.jl b/src/Compat.jl index 276436ffb..53e7460bf 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -47,6 +47,7 @@ const IteratorSize = Base.IteratorSize const IteratorEltype = Base.IteratorEltype enable_debug(x::Bool) = x import Distributed +import Pkg include("compatmacro.jl") @@ -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, diff --git a/test/old.jl b/test/old.jl index ec74626dc..f25df33a3 100644 --- a/test/old.jl +++ b/test/old.jl @@ -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) diff --git a/test/runtests.jl b/test/runtests.jl index f0fdf3ea9..64e94ce90 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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