From 140b047b2648971df1e92caf98a116eccd98dcc3 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Fri, 10 Apr 2020 18:16:18 -0700 Subject: [PATCH] Add compat entry for @deprecated (#35427) * Add compat entry for at-deprecated * Mention that Pkg.test still prints deprecation warnings --- NEWS.md | 3 ++- base/deprecated.jl | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 8d16ff4da0f4c..371417e35c74c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -74,7 +74,8 @@ Command-line option changes --------------------------- * Deprecation warnings are no longer shown by default. i.e. if the `--depwarn=...` flag is - not passed it defaults to `--depwarn=no`. ([#35362]). + not passed it defaults to `--depwarn=no`. The warnings are printed from tests run by + `Pkg.test()`. ([#35362]). * Color now defaults to on when stdout and stderr are TTYs ([#34347]) diff --git a/base/deprecated.jl b/base/deprecated.jl index 70c6ad58b55e5..c29e3626905f9 100644 --- a/base/deprecated.jl +++ b/base/deprecated.jl @@ -21,6 +21,11 @@ The first argument `old` is the signature of the deprecated method, the second o `new` is the call which replaces it. `@deprecate` exports `old` unless the optional third argument is `false`. +!!! compat "Julia 1.5" + As of Julia 1.5, functions defined by `@deprecate` do not print warning inside normal + `julia` program as the defualt value of `--depwarn` option is `no`. The warnings + are printed from tests run by `Pkg.test()`. + # Examples ```jldoctest julia> @deprecate old(x) new(x)