Skip to content

Commit ff6f907

Browse files
committed
Mark AbstractDateTime from #443 for deprecation
1 parent 5316061 commit ff6f907

File tree

4 files changed

+6
-12
lines changed

4 files changed

+6
-12
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,6 @@ Currently, the `@compat` macro supports the following syntaxes:
312312

313313
## New types
314314

315-
* `Compat.AbstractDateTime` is an alias for `Compat.Dates.AbstractDateTime` as of ([#25227]) and `Compat.Dates.TimeType` prior to that.
316-
317315
## Developer tips
318316

319317
One of the most important rules for `Compat.jl` is to avoid breaking user code

src/Compat.jl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,11 @@ import Base.MathConstants
2222
import Test, SharedArrays, Mmap, DelimitedFiles
2323
import Dates
2424
import Libdl
25+
const AbstractDateTime = Compat.Dates.AbstractDateTime
2526

2627

2728
include("compatmacro.jl")
2829

29-
if VERSION < v"0.7.0-DEV.3216"
30-
const AbstractDateTime = Compat.Dates.TimeType
31-
else
32-
const AbstractDateTime = Compat.Dates.AbstractDateTime
33-
end
34-
3530
if VERSION < v"0.7.0-DEV.3052"
3631
const Printf = Base.Printf
3732
else

test/old.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ module TestLibdl
102102
@test isdefined(@__MODULE__, :Libdl)
103103
end
104104

105+
# 0.7.0-DEV.3216
106+
@test Compat.AbstractDateTime === (isdefined(Compat.Dates, :AbstractDateTime) ? Compat.Dates.AbstractDateTime : Compat.Dates.TimeType)
107+
@test Compat.AbstractDateTime <: Compat.Dates.TimeType
108+
@test Compat.Dates.DateTime <: Compat.AbstractDateTime
109+
105110

106111
# tests of removed functionality (i.e. justs tests Base)
107112

test/runtests.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,6 @@ end
270270
# 0.7.0-DEV.3172
271271
@test replace("abcb", "b"=>"c") == "accc"
272272
@test replace("abcb", "b"=>"c", count=1) == "accb"
273-
# 0.7.0-DEV.3216
274-
@test Compat.AbstractDateTime === (isdefined(Compat.Dates, :AbstractDateTime) ? Compat.Dates.AbstractDateTime : Compat.Dates.TimeType)
275-
@test Compat.AbstractDateTime <: Compat.Dates.TimeType
276-
@test Compat.Dates.DateTime <: Compat.AbstractDateTime
277273

278274
# 0.7.0-DEV.3025
279275
let c = CartesianIndices((1:3, 1:2)), l = LinearIndices((1:3, 1:2))

0 commit comments

Comments
 (0)