Skip to content

Commit

Permalink
Remove julia 0.3 deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
Keno committed Apr 28, 2015
1 parent 0c56dd2 commit e419a56
Showing 1 changed file with 0 additions and 102 deletions.
102 changes: 0 additions & 102 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,108 +63,6 @@ function firstcaller(bt::Array{Ptr{Void},1}, funcsym::Symbol)
return C_NULL
end

# 0.3 deprecations

function nfilled(X)
depwarn("nfilled has been renamed to nnz", :nfilled)
nnz(X)
end
export nfilled

@deprecate nonzeros(A::StridedArray) A[find(A)]
@deprecate nonzeros(B::BitArray) trues(countnz(B))
@deprecate nnz(A::StridedArray) countnz(A)

@deprecate dense full

export Stat
const Stat = StatStruct

export CharString
const CharString = UTF32String
@deprecate UTF32String(c::Integer...) utf32(c...)
@deprecate UTF32String(s::AbstractString) utf32(s)

export Ranges
const Ranges = Range

export Range1
const Range1 = UnitRange

@deprecate clear_malloc_data() Profile.clear_malloc_data()

@deprecate set_rounding(r::RoundingMode) set_rounding(Float64,r)
@deprecate get_rounding() get_rounding(Float64)
@deprecate with_rounding(f::Function, r::RoundingMode) with_rounding(f::Function, Float64, r)

@deprecate set_bigfloat_rounding(r::RoundingMode) set_rounding(BigFloat,r)
@deprecate get_bigfloat_rounding() get_rounding(BigFloat)
@deprecate with_bigfloat_rounding(f::Function, r::RoundingMode) with_rounding(f::Function, BigFloat, r)

@deprecate degrees2radians deg2rad
@deprecate radians2degrees rad2deg

@deprecate spzeros(m::Integer) spzeros(m, m)
@deprecate spzeros(Tv::Type, m::Integer) spzeros(Tv, m, m)

@deprecate myindexes localindexes

@deprecate setfield setfield!
@deprecate put put!
@deprecate take take!

@deprecate Set(a, b...) Set(Any[a, b...])
# for a bit of backwards compatibility
IntSet(xs::Integer...) = (s=IntSet(); for a in xs; push!(s,a); end; s)
Set{T<:Number}(xs::T...) = Set{T}(xs)

@deprecate normfro(A) vecnorm(A)

@deprecate convert{T}(p::Type{Ptr{T}}, a::Array) convert(p, pointer(a))

@deprecate read(from::IOBuffer, a::Array) read!(from, a)
@deprecate read(from::IOBuffer, p::Ptr, nb::Integer) read!(from, p, nb)
@deprecate read(s::IOStream, a::Array) read!(s, a)
@deprecate read(this::AsyncStream, a::Array) read!(this, a)
@deprecate read(f::File, a::Array, nel) read!(f, a, nel)
@deprecate read(f::File, a::Array) read!(f, a)
@deprecate read(s::IO, a::Array) read!(s, a)
@deprecate read(s::IO, B::BitArray) read!(s, B)

@deprecate nans{T}(::Type{T}, dims...) fill(convert(T,NaN), dims)
@deprecate nans(dims...) fill(NaN, dims)
@deprecate nans{T}(x::AbstractArray{T}) fill(convert(T,NaN), size(x))
@deprecate infs{T}(::Type{T}, dims...) fill(convert(T,Inf), dims)
@deprecate infs(dims...) fill(Inf, dims)
@deprecate infs{T}(x::AbstractArray{T}) fill(convert(T,Inf), size(x))

@deprecate bitmix(x, y::UInt) hash(x, y)
@deprecate bitmix(x, y::Int) hash(x, uint(y))
@deprecate bitmix(x, y::Union(UInt32, Int32)) convert(UInt32, hash(x, uint(y)))
@deprecate bitmix(x, y::Union(UInt64, Int64)) convert(UInt64, hash(x, hash(y)))

@deprecate readsfrom(cmd, args...) open(cmd, "r", args...)
@deprecate writesto(cmd, args...) open(cmd, "w", args...)

function tty_rows()
depwarn("tty_rows() is deprecated, use tty_size() instead", :tty_rows)
tty_size()[1]
end
function tty_cols()
depwarn("tty_cols() is deprecated, use tty_size() instead", :tty_cols)
tty_size()[2]
end

@deprecate pointer{T}(::Type{T}, x::UInt) convert(Ptr{T}, x)
@deprecate pointer{T}(::Type{T}, x::Ptr) convert(Ptr{T}, x)

# 0.3 discontinued functions

scale!{T<:Base.LinAlg.BlasReal}(X::Array{T}, s::Complex) = error("scale!: Cannot scale a real array by a complex value in-place. Use scale(X::Array{Real}, s::Complex) instead.")

@deprecate which(f, args...) @which f(args...)
@deprecate rmdir rm

# 0.4 deprecations

@deprecate split(x,y,l::Integer,k::Bool) split(x,y;limit=l,keep=k)
Expand Down

0 comments on commit e419a56

Please sign in to comment.