Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: deprecate showall #22847

Merged
merged 1 commit into from
Jul 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
==========================
Expand Down
3 changes: 3 additions & 0 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
7 changes: 0 additions & 7 deletions base/docs/helpdb/Base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]])

Expand Down
1 change: 0 additions & 1 deletion base/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,6 @@ export
search,
searchindex,
show,
showall,
showcompact,
showerror,
split,
Expand Down
9 changes: 0 additions & 9 deletions base/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions base/strings/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion doc/src/stdlib/io-network.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ Base.IOContext(::IO, ::IOContext)
```@docs
Base.show(::Any)
Base.showcompact
Base.showall
Base.summary
Base.print
Base.println
Expand Down