From dc73ae6a70dd1e51048521bde1bac9732255cf0e Mon Sep 17 00:00:00 2001 From: Martin Holters Date: Tue, 29 Jan 2019 11:41:41 +0100 Subject: [PATCH] Deprecate `Random.uuid1`, `uuid4`, `uuid_version` to `UUIDs.*` --- src/Compat.jl | 14 ++++++++------ src/deprecated.jl | 4 +--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Compat.jl b/src/Compat.jl index a00fe4b34..0bf492d4c 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -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 @@ -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...) diff --git a/src/deprecated.jl b/src/deprecated.jl index e0d875dc4..5d95b88be 100644 --- a/src/deprecated.jl +++ b/src/deprecated.jl @@ -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