From d4d63e00562dcd41cbd3a9658341282191a5a574 Mon Sep 17 00:00:00 2001 From: Morten Piibeleht Date: Wed, 1 Aug 2018 23:15:48 +0300 Subject: [PATCH] Fix 0.7 deprecations Closes #751. --- REQUIRE | 2 +- src/DocChecks.jl | 2 +- src/Documenter.jl | 4 ++-- src/Travis.jl | 1 + test/generate.jl | 1 + test/nongit/tests.jl | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/REQUIRE b/REQUIRE index 2aa1c97d2d..2183f546c5 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,3 +1,3 @@ julia 0.6 -Compat 0.62.0 +Compat 0.70.0 # reduce(; init=...) / Compat#590 DocStringExtensions 0.2 diff --git a/src/DocChecks.jl b/src/DocChecks.jl index ba5e5ccbe6..25f43cb6ce 100644 --- a/src/DocChecks.jl +++ b/src/DocChecks.jl @@ -40,7 +40,7 @@ function missingdocs(doc::Documents.Document) end end end - n = reduce(+, 0, map(length, values(bindings))) + n = Compat.reduce(+, map(length, values(bindings)), init=0) if n > 0 b = IOBuffer() println(b, "$n docstring$(n ≡ 1 ? "" : "s") potentially missing:\n") diff --git a/src/Documenter.jl b/src/Documenter.jl index 567e1f2692..d1e3c28ee3 100644 --- a/src/Documenter.jl +++ b/src/Documenter.jl @@ -17,7 +17,7 @@ $(EXPORTS) module Documenter using Compat, DocStringExtensions -import Compat.Base64: base64decode, base64encode +import Compat.Base64: base64decode import Compat: @info import Compat.Pkg @@ -530,7 +530,7 @@ function git_push( version = VersionNumber(tag) # only push to stable if this is the latest stable release versions = filter!(x -> occursin(Base.VERSION_REGEX, x), readdir(dirname)) - maxver = mapreduce(x -> VersionNumber(x), max, v"0.0.0", versions) + maxver = Compat.mapreduce(x -> VersionNumber(x), max, versions; init=v"0.0.0") if version >= maxver && version.prerelease == () # don't deploy to stable for prereleases gitrm_copy(target_dir, stable_dir) Writers.HTMLWriter.generate_siteinfo_file(stable_dir, "stable") diff --git a/src/Travis.jl b/src/Travis.jl index dc824f0f7c..c70bb81db9 100644 --- a/src/Travis.jl +++ b/src/Travis.jl @@ -7,6 +7,7 @@ module Travis using Compat, DocStringExtensions import Compat.Pkg +import Compat.Base64: base64encode export genkeys diff --git a/test/generate.jl b/test/generate.jl index cb76713c33..53c4ab3e31 100644 --- a/test/generate.jl +++ b/test/generate.jl @@ -1,6 +1,7 @@ module GenerateTests using Compat.Test +import Compat.Random: randstring using Documenter @testset "Generate" begin diff --git a/test/nongit/tests.jl b/test/nongit/tests.jl index c897e88ead..c553787078 100644 --- a/test/nongit/tests.jl +++ b/test/nongit/tests.jl @@ -5,5 +5,5 @@ mktempdir() do tmpdir cp(joinpath(@__DIR__, "docs"), joinpath(tmpdir, "docs")) include(joinpath(tmpdir, "docs/make.jl")) # Copy the build/ directory back so that it would be possible to inspect the output. - cp(joinpath(tmpdir, "docs/build"), joinpath(@__DIR__, "build"); remove_destination=true) + Compat.cp(joinpath(tmpdir, "docs/build"), joinpath(@__DIR__, "build"); force=true) end