From 07a619e5ae68e3e2fe34c2900ca3bbffbe78eaaa Mon Sep 17 00:00:00 2001 From: t-bltg Date: Thu, 26 Aug 2021 00:12:33 +0200 Subject: [PATCH] Replace deprecated Base.download with Downloads.download (#3766) Co-authored-by: t-bltg --- Project.toml | 1 + src/Plots.jl | 1 + src/examples.jl | 3 ++- src/init.jl | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index a5d70c8f..37fe7cde 100644 --- a/Project.toml +++ b/Project.toml @@ -31,6 +31,7 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" [compat] Contour = "0.5" diff --git a/src/Plots.jl b/src/Plots.jl index bb0ea855..cea12a03 100644 --- a/src/Plots.jl +++ b/src/Plots.jl @@ -31,6 +31,7 @@ using Base.Meta @reexport using PlotThemes import Showoff import StatsBase +import Downloads import JSON using Requires diff --git a/src/examples.jl b/src/examples.jl index 6cd1e9b3..0f740b32 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -125,7 +125,8 @@ const _examples = PlotExample[ :( begin import FileIO - path = download( + import Downloads + path = Downloads.download( "http://juliaplots.org/PlotReferenceImages.jl/Plots/pyplot/0.7.0/ref1.png", ) img = FileIO.load(path) diff --git a/src/init.jl b/src/init.jl index 8f8303a6..b1da67f2 100644 --- a/src/init.jl +++ b/src/init.jl @@ -98,7 +98,7 @@ function __init__() global plotly_local_file_path[] = joinpath(@get_scratch!("plotly"), _plotly_min_js_filename) if !isfile(plotly_local_file_path[]) - download( + Downloads.download( "https://cdn.plot.ly/$(_plotly_min_js_filename)", plotly_local_file_path[], )