From e04d208426edad20ead49fc17ecc6ea7fcad3894 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Mon, 17 Jul 2017 13:23:48 -0400 Subject: [PATCH] deprecate `showall` --- 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 - 6 files changed, 5 insertions(+), 20 deletions(-) diff --git a/base/deprecated.jl b/base/deprecated.jl index 6f55525d37f514..74297353b7c6db 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 783c959340391e..3281b69a005c09 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 6aff2eee46f7b3..a91d0d6a0cbe25 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 c060839f7040ee..e6dc1954c854ec 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 cb4327215c1f1b..93245edafddd47 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 7b4fd4ea9fd208..f767bf1caec25a 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