From 0212b765b81c9fe7ee102be9383e16f4cd453e8b Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 16 Nov 2020 21:50:24 -0500 Subject: [PATCH] remove deprecations and depwarns Probably been long enough. --- src/codecovio.jl | 20 +++----------------- src/coveralls.jl | 27 ++++++--------------------- 2 files changed, 9 insertions(+), 38 deletions(-) diff --git a/src/codecovio.jl b/src/codecovio.jl index 4b18986..7959874 100644 --- a/src/codecovio.jl +++ b/src/codecovio.jl @@ -13,7 +13,7 @@ module Codecov using JSON using LibGit2 - export submit, submit_token, submit_local, submit_generic + export submit, submit_local, submit_generic #= JSON structure for Codecov.io @@ -192,16 +192,9 @@ module Codecov end end - if haskey(ENV, "REPO_TOKEN") - @warn "the environment variable REPO_TOKEN is deprecated, use CODECOV_TOKEN instead" - kwargs = set_defaults(kwargs, token = ENV["REPO_TOKEN"]) - end - return kwargs end - @deprecate submit_token submit_local - """ submit_generic(fcs::Vector{FileCoverage}) @@ -220,18 +213,11 @@ module Codecov function submit_generic(fcs::Vector{FileCoverage}, kwargs::Dict) @assert length(kwargs) > 0 dry_run = get(kwargs, :dry_run, false) - if haskey(kwargs, :verbose) - Base.depwarn("The verbose keyword argument is deprecated, set the environment variable " * - "JULIA_DEBUG=Coverage for verbose output", :submit_generic) - verbose = kwargs[:verbose] - else - verbose = false - end uri_str = construct_uri_string(kwargs) - verbose && @info "Submitting data to Codecov..." - verbose && @debug "Codecov.io API URL:\n" * mask_token(uri_str) + @info "Submitting data to Codecov..." + @debug "Codecov.io API URL:\n" * mask_token(uri_str) if !dry_run heads = Dict("Content-Type" => "application/json") diff --git a/src/coveralls.jl b/src/coveralls.jl index 5150769..3831777 100644 --- a/src/coveralls.jl +++ b/src/coveralls.jl @@ -14,7 +14,7 @@ module Coveralls using LibGit2 using MbedTLS - export submit, submit_token, submit_local + export submit, submit_local #= JSON structure for Coveralls @@ -62,15 +62,8 @@ module Coveralls on TravisCI, AppVeyor or Jenkins. If running locally, use `submit_local`. """ function submit(fcs::Vector{FileCoverage}; kwargs...) - if haskey(kwargs, :verbose) - Base.depwarn("The verbose keyword argument is deprecated, set the environment variable " * - "JULIA_DEBUG=Coverage for verbose output", :submit_generic) - verbose = kwargs[:verbose] - else - verbose = false - end data = prepare_request(fcs, false) - post_request(data, verbose) + post_request(data) end function prepare_request(fcs::Vector{FileCoverage}, local_env::Bool, git_info=query_git_info) @@ -204,23 +197,16 @@ module Coveralls git_info can be either a `Dict` or a function that returns a `Dict`. """ function submit_local(fcs::Vector{FileCoverage}, git_info=query_git_info; kwargs...) - if haskey(kwargs, :verbose) - Base.depwarn("The verbose keyword argument is deprecated, set the environment variable " * - "JULIA_DEBUG=Coverage for verbose output", :submit_generic) - verbose = kwargs[:verbose] - else - verbose = false - end data = prepare_request(fcs, true, git_info) - post_request(data, verbose) + post_request(data) end # posts the actual request given the data - function post_request(data, verbose) - verbose && @info "Submitting data to Coveralls..." + function post_request(data) + @info "Submitting data to Coveralls..." coveralls_url = get(ENV, "COVERALLS_URL", "https://coveralls.io/api/v1/jobs") req = HTTP.post(coveralls_url, HTTP.Form(makebody(data))) - verbose && @debug "Result of submission:\n" * String(req.body) + @debug "Result of submission:\n" * String(req) nothing end @@ -240,6 +226,5 @@ module Coveralls end return data end - @deprecate submit_token submit_local end # module Coveralls