From 857b739720bea0d7638e4dca88c574edd635902e Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Wed, 20 Jun 2018 15:59:07 +0200 Subject: [PATCH] rm Compat --- REQUIRE | 1 - src/Documenter.jl | 19 ++----------------- src/IJulia.jl | 3 +-- src/Literate.jl | 2 -- test/runtests.jl | 6 ++---- 5 files changed, 5 insertions(+), 26 deletions(-) diff --git a/REQUIRE b/REQUIRE index 9106041..744f9c1 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,3 +1,2 @@ julia 0.7.0-alpha JSON -Compat diff --git a/src/Documenter.jl b/src/Documenter.jl index 8e7887f..d7d3f03 100644 --- a/src/Documenter.jl +++ b/src/Documenter.jl @@ -1,22 +1,7 @@ # this file contains some utilities copied from the Documenter.jl package # (https://github.com/JuliaDocs/Documenter.jl), see LICENSE.md for license module Documenter - -using Compat: stdout, stderr, Cvoid - -@static if VERSION < v"0.7.0-DEV.3951" - link_pipe!(pipe; reader_supports_async = true, writer_supports_async = true) = - Base.link_pipe(pipe, julia_only_read = reader_supports_async, julia_only_write = writer_supports_async) -else - import Base: link_pipe! -end -@static if isdefined(Base, :with_logger) - using Logging -else # make things a no-op since warnings/info already print to stdout - struct ConsoleLogger end - ConsoleLogger(io) = ConsoleLogger() - with_logger(f, logger) = f() -end +using Logging function withoutput(f) # Save the default output streams. @@ -25,7 +10,7 @@ function withoutput(f) # Redirect both the `stdout` and `stderr` streams to a single `Pipe` object. pipe = Pipe() - link_pipe!(pipe; reader_supports_async = true, writer_supports_async = true) + Base.link_pipe!(pipe; reader_supports_async = true, writer_supports_async = true) redirect_stdout(pipe.in) redirect_stderr(pipe.in) # Also redirect logging stream to the same pipe diff --git a/src/IJulia.jl b/src/IJulia.jl index 71b7ec2..b2aa7a1 100644 --- a/src/IJulia.jl +++ b/src/IJulia.jl @@ -1,8 +1,7 @@ # this file contains some utilities copied from the IJulia.jl package # (https://github.com/JuliaLang/IJulia.jl), see LICENSE.md for license module IJulia -using Compat.Base64 -import Compat: showable +using Base64 const text_plain = MIME("text/plain") const image_svg = MIME("image/svg+xml") diff --git a/src/Literate.jl b/src/Literate.jl index 3c51d01..0f24711 100644 --- a/src/Literate.jl +++ b/src/Literate.jl @@ -1,8 +1,6 @@ __precompile__() module Literate -import Compat: replace, popfirst!, @error, @info, occursin - import JSON include("IJulia.jl") diff --git a/test/runtests.jl b/test/runtests.jl index 8380135..6c17a3d 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,7 +1,5 @@ import Literate import Literate: Chunk, MDChunk, CodeChunk -import Compat -import Compat: occursin using Test # compare content of two parsed chunk vectors @@ -539,7 +537,7 @@ end lastidx = 1 for cell in expected_cells - idx = Compat.findnext(cell, notebook, lastidx) + idx = findnext(cell, notebook, lastidx) @test idx !== nothing lastidx = nextind(notebook, last(idx)) end @@ -619,7 +617,7 @@ end lastidx = 1 for out in expected_outputs - idx = Compat.findnext(out, notebook, lastidx) + idx = findnext(out, notebook, lastidx) @test idx !== nothing lastidx = nextind(notebook, last(idx)) end