From b651d24611e0ae279c55743c7e33e94efaf0632f Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Mon, 17 Jul 2017 13:23:48 -0400 Subject: [PATCH] deprecate `showall` --- NEWS.md | 3 +++ base/deprecated.jl | 3 +++ base/docs/helpdb/Base.jl | 7 ------- base/exports.jl | 1 - base/show.jl | 9 --------- base/strings/io.jl | 4 ++-- doc/src/stdlib/io-network.md | 1 - 7 files changed, 8 insertions(+), 20 deletions(-) diff --git a/NEWS.md b/NEWS.md index c00a3e18b0e9b..b9041977cec39 100644 --- a/NEWS.md +++ b/NEWS.md @@ -197,6 +197,9 @@ Deprecated or removed * The method `String(io::IOBuffer)` is deprecated to `String(take!(copy(io)))` ([#21438]). + * The function `showall` is deprecated. Showing entire values is the default, unless an + `IOContext` specifying `:limit=>true` is in use ([#22847]). + Julia v0.6.0 Release Notes ========================== diff --git a/base/deprecated.jl b/base/deprecated.jl index 6f55525d37f51..74297353b7c6d 100644 --- a/base/deprecated.jl +++ b/base/deprecated.jl @@ -1565,6 +1565,9 @@ end @deprecate readstring(cmd::AbstractCmd, stdin::Redirectable) readstring(pipeline(stdin, cmd)) @deprecate eachline(cmd::AbstractCmd, stdin; chomp::Bool=true) eachline(pipeline(stdin, cmd), chomp=chomp) +@deprecate showall(x) show(x) +@deprecate showall(io, x) show(IOContext(io, :limit => false), x) + @deprecate_binding AbstractIOBuffer GenericIOBuffer false @deprecate String(io::GenericIOBuffer) String(take!(copy(io))) diff --git a/base/docs/helpdb/Base.jl b/base/docs/helpdb/Base.jl index 783c959340391..3281b69a005c0 100644 --- a/base/docs/helpdb/Base.jl +++ b/base/docs/helpdb/Base.jl @@ -1866,13 +1866,6 @@ it for new types as appropriate. """ promote_rule -""" - showall(x) - -Similar to [`show`](@ref), except shows all elements of arrays. -""" -showall - """ match(r::Regex, s::AbstractString[, idx::Integer[, addopts]]) diff --git a/base/exports.jl b/base/exports.jl index 6aff2eee46f7b..a91d0d6a0cbe2 100644 --- a/base/exports.jl +++ b/base/exports.jl @@ -809,7 +809,6 @@ export search, searchindex, show, - showall, showcompact, showerror, split, diff --git a/base/show.jl b/base/show.jl index c060839f7040e..e6dc1954c854e 100644 --- a/base/show.jl +++ b/base/show.jl @@ -1758,15 +1758,6 @@ function showarray(io::IO, X::AbstractArray, repr::Bool = true; header = true) end end -showall(x) = showall(STDOUT, x) -function showall(io::IO, x) - if !get(io, :limit, false) - show(io, x) - else - show(IOContext(io, :limit => false), x) - end -end - showcompact(x) = showcompact(STDOUT, x) function showcompact(io::IO, x) if get(io, :compact, false) diff --git a/base/strings/io.jl b/base/strings/io.jl index cb4327215c1f1..93245edafddd4 100644 --- a/base/strings/io.jl +++ b/base/strings/io.jl @@ -139,11 +139,11 @@ end """ repr(x) -Create a string from any value using the [`showall`](@ref) function. +Create a string from any value using the [`show`](@ref) function. """ function repr(x) s = IOBuffer() - showall(s, x) + show(s, x) String(take!(s)) end diff --git a/doc/src/stdlib/io-network.md b/doc/src/stdlib/io-network.md index 7b4fd4ea9fd20..f767bf1caec25 100644 --- a/doc/src/stdlib/io-network.md +++ b/doc/src/stdlib/io-network.md @@ -59,7 +59,6 @@ Base.IOContext(::IO, ::IOContext) ```@docs Base.show(::Any) Base.showcompact -Base.showall Base.summary Base.print Base.println