Skip to content

Commit

Permalink
Mark AbstractDateTime from #443 for deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Oct 8, 2019
1 parent 5316061 commit ff6f907
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,6 @@ Currently, the `@compat` macro supports the following syntaxes:

## New types

* `Compat.AbstractDateTime` is an alias for `Compat.Dates.AbstractDateTime` as of ([#25227]) and `Compat.Dates.TimeType` prior to that.

## Developer tips

One of the most important rules for `Compat.jl` is to avoid breaking user code
Expand Down
7 changes: 1 addition & 6 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,11 @@ import Base.MathConstants
import Test, SharedArrays, Mmap, DelimitedFiles
import Dates
import Libdl
const AbstractDateTime = Compat.Dates.AbstractDateTime


include("compatmacro.jl")

if VERSION < v"0.7.0-DEV.3216"
const AbstractDateTime = Compat.Dates.TimeType
else
const AbstractDateTime = Compat.Dates.AbstractDateTime
end

if VERSION < v"0.7.0-DEV.3052"
const Printf = Base.Printf
else
Expand Down
5 changes: 5 additions & 0 deletions test/old.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ module TestLibdl
@test isdefined(@__MODULE__, :Libdl)
end

# 0.7.0-DEV.3216
@test Compat.AbstractDateTime === (isdefined(Compat.Dates, :AbstractDateTime) ? Compat.Dates.AbstractDateTime : Compat.Dates.TimeType)
@test Compat.AbstractDateTime <: Compat.Dates.TimeType
@test Compat.Dates.DateTime <: Compat.AbstractDateTime


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

Expand Down
4 changes: 0 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,6 @@ end
# 0.7.0-DEV.3172
@test replace("abcb", "b"=>"c") == "accc"
@test replace("abcb", "b"=>"c", count=1) == "accb"
# 0.7.0-DEV.3216
@test Compat.AbstractDateTime === (isdefined(Compat.Dates, :AbstractDateTime) ? Compat.Dates.AbstractDateTime : Compat.Dates.TimeType)
@test Compat.AbstractDateTime <: Compat.Dates.TimeType
@test Compat.Dates.DateTime <: Compat.AbstractDateTime

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

0 comments on commit ff6f907

Please sign in to comment.