Skip to content

Commit

Permalink
Deprecate Random.uuid1, uuid4, uuid_version to UUIDs.*
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Jan 29, 2019
1 parent fbe888f commit dc73ae6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 8 additions & 6 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,6 @@ else
if VERSION < v"0.7.0-DEV.3406"
$((:(using Base.Random: $f) for f in random_fields)...)
const seed! = Base.Random.srand
# these should be deprecated in favor of Compat.UUIDs.*
using Base.Random: uuid1, uuid4, uuid_version
else
$((:(using Random: $f) for f in random_fields)...)
import Random
Expand All @@ -595,10 +593,14 @@ else
else
using Random: seed!
end
if VERSION < v"0.7.0-DEV.3666"
# these should be deprecated in favor of Compat.UUIDs.*
using Random: uuid1, uuid4, uuid_version
end
end
if VERSION < v"0.7.0-DEV.3666"
import ..Compat
Base.@deprecate uuid1() Compat.UUIDs.uuid1() false
Base.@deprecate uuid1(rng) Compat.UUIDs.uuid1(rng) false
Base.@deprecate uuid4() Compat.UUIDs.uuid4() false
Base.@deprecate uuid4(rng) Compat.UUIDs.uuid4(rng) false
Base.@deprecate uuid_version(u) Compat.UUIDs.uuid_version(u) false
end

gentype(args...) = eltype(args...)
Expand Down
4 changes: 1 addition & 3 deletions src/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,4 @@ macro dotcompat(x)
end
export @dotcompat

# to be deprecated:

# * Compat.Random.uuid1, uuid4, uuid_version (in favour of Compat.UUIDs.*)
# Compat.Random.uuid1, uuid4, uuid_version are deprecated in Compat.jl

0 comments on commit dc73ae6

Please sign in to comment.