Skip to content

Commit

Permalink
Add compat entry for @deprecated (#35427)
Browse files Browse the repository at this point in the history
* Add compat entry for at-deprecated
* Mention that Pkg.test still prints deprecation warnings
  • Loading branch information
tkf authored and staticfloat committed Apr 21, 2020
1 parent 6115549 commit 140b047
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down
5 changes: 5 additions & 0 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 140b047

Please sign in to comment.