Skip to content

Commit 4a6e746

Browse files
authored
Drop support for Julia < 1.6 (#92)
1 parent 8f71f21 commit 4a6e746

File tree

5 files changed

+4
-61
lines changed

5 files changed

+4
-61
lines changed

.github/workflows/CI.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
version:
16-
- '0.7'
17-
- '1.0'
16+
- '1.6'
1817
- '1'
1918
# - 'nightly'
2019
os:

Project.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name = "IntervalSets"
22
uuid = "8197267c-284f-5f27-9208-e0e47529a953"
3-
version = "0.5.4"
3+
version = "0.6.0"
44

55
[deps]
66
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
77
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
88

99
[compat]
10-
julia = "0.7, 1"
10+
julia = "1.6"
1111

1212
[extras]
1313
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"

src/IntervalSets.jl

-50
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ isclosedset(d::AbstractInterval) = isleftclosed(d) && isrightclosed(d)
6262
"Is the interval open?"
6363
isopenset(d::AbstractInterval) = isleftopen(d) && isrightopen(d)
6464

65-
@deprecate isopen(d) isopenset(d) false
66-
@deprecate isclosed(d) isclosedset(d)
67-
6865
eltype(::Type{AbstractInterval{T}}) where {T} = T
6966
@pure eltype(::Type{I}) where {I<:AbstractInterval} = eltype(supertype(I))
7067

@@ -134,50 +131,6 @@ in(::Missing, I::TypedEndpointsInterval{:open,:open}) = !isempty(I) && missing
134131
in(::Missing, I::TypedEndpointsInterval{:closed,:open}) = !isempty(I) && missing
135132
in(::Missing, I::TypedEndpointsInterval{:open,:closed}) = !isempty(I) && missing
136133

137-
# The code below can be defined as
138-
# ```
139-
# function in(a::AbstractInterval, b::AbstractInterval)
140-
# Base.depwarn("`in(a::AbstractInterval, b::AbstractInterval)` (equivalently, `a ∈ b`) is deprecated in favor of `issubset(a, b)` (equivalently, `a ⊆ b`). Note that the behavior for empty intervals is also changing.", :in)
141-
# return in_deprecation(a, b)
142-
# end
143-
# ```
144-
# but that makes ambiguity definition.
145-
function in(a::AbstractInterval, b::TypedEndpointsInterval{:closed,:closed})
146-
Base.depwarn("`in(a::AbstractInterval, b::AbstractInterval)` (equivalently, `a ∈ b`) is deprecated in favor of `issubset(a, b)` (equivalently, `a ⊆ b`). Note that the behavior for empty intervals is also changing.", :in)
147-
return in_deprecation(a, b)
148-
end
149-
function in(a::AbstractInterval, b::TypedEndpointsInterval{:open,:open})
150-
Base.depwarn("`in(a::AbstractInterval, b::AbstractInterval)` (equivalently, `a ∈ b`) is deprecated in favor of `issubset(a, b)` (equivalently, `a ⊆ b`). Note that the behavior for empty intervals is also changing.", :in)
151-
return in_deprecation(a, b)
152-
end
153-
function in(a::AbstractInterval, b::TypedEndpointsInterval{:closed,:open})
154-
Base.depwarn("`in(a::AbstractInterval, b::AbstractInterval)` (equivalently, `a ∈ b`) is deprecated in favor of `issubset(a, b)` (equivalently, `a ⊆ b`). Note that the behavior for empty intervals is also changing.", :in)
155-
return in_deprecation(a, b)
156-
end
157-
function in(a::AbstractInterval, b::TypedEndpointsInterval{:open,:closed})
158-
Base.depwarn("`in(a::AbstractInterval, b::AbstractInterval)` (equivalently, `a ∈ b`) is deprecated in favor of `issubset(a, b)` (equivalently, `a ⊆ b`). Note that the behavior for empty intervals is also changing.", :in)
159-
return in_deprecation(a, b)
160-
end
161-
162-
in_deprecation(a::AbstractInterval, b::TypedEndpointsInterval{:closed,:closed}) =
163-
(leftendpoint(a) leftendpoint(b)) & (rightendpoint(a) rightendpoint(b))
164-
in_deprecation(a::TypedEndpointsInterval{:open,:open}, b::TypedEndpointsInterval{:open,:open} ) =
165-
(leftendpoint(a) leftendpoint(b)) & (rightendpoint(a) rightendpoint(b))
166-
in_deprecation(a::TypedEndpointsInterval{:closed,:open}, b::TypedEndpointsInterval{:open,:open} ) =
167-
(leftendpoint(a) > leftendpoint(b)) & (rightendpoint(a) rightendpoint(b))
168-
in_deprecation(a::TypedEndpointsInterval{:open,:closed}, b::TypedEndpointsInterval{:open,:open} ) =
169-
(leftendpoint(a) leftendpoint(b)) & (rightendpoint(a) < rightendpoint(b))
170-
in_deprecation(a::TypedEndpointsInterval{:closed,:closed}, b::TypedEndpointsInterval{:open,:open} ) =
171-
(leftendpoint(a) > leftendpoint(b)) & (rightendpoint(a) < rightendpoint(b))
172-
in_deprecation(a::TypedEndpointsInterval{:closed}, b::TypedEndpointsInterval{:open,:closed} ) =
173-
(leftendpoint(a) > leftendpoint(b)) & (rightendpoint(a) rightendpoint(b))
174-
in_deprecation(a::TypedEndpointsInterval{:open}, b::TypedEndpointsInterval{:open,:closed} ) =
175-
(leftendpoint(a) leftendpoint(b)) & (rightendpoint(a) rightendpoint(b))
176-
in_deprecation(a::TypedEndpointsInterval{L,:closed}, b::TypedEndpointsInterval{:closed,:open}) where L =
177-
(leftendpoint(a) leftendpoint(b)) & (rightendpoint(a) < rightendpoint(b))
178-
in_deprecation(a::TypedEndpointsInterval{L,:open}, b::TypedEndpointsInterval{:closed,:open}) where L =
179-
(leftendpoint(a) leftendpoint(b)) & (rightendpoint(a) rightendpoint(b))
180-
181134
isempty(A::TypedEndpointsInterval{:closed,:closed}) = leftendpoint(A) > rightendpoint(A)
182135
isempty(A::TypedEndpointsInterval) = leftendpoint(A) rightendpoint(A)
183136

@@ -211,9 +164,6 @@ end
211164
(A::AbstractInterval, B::AbstractInterval) = issubset(B, A)
212165
(A::AbstractInterval, B::AbstractInterval) = (A B) & (A B)
213166
(A::AbstractInterval, B::AbstractInterval) = (A B) & (A B)
214-
if VERSION < v"1.1.0-DEV.123"
215-
issubset(x, B::AbstractInterval) = issubset(convert(AbstractInterval, x), B)
216-
end
217167

218168
const _interval_hash = UInt == UInt64 ? 0x1588c274e0a33ad4 : 0x1e3f7252
219169

src/interval.jl

-4
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,3 @@ ClosedInterval(i::AbstractUnitRange{I}) where {I<:Integer} = ClosedInterval{I}(m
229229

230230

231231
Base.promote_rule(::Type{Interval{L,R,T1}}, ::Type{Interval{L,R,T2}}) where {L,R,T1,T2} = Interval{L,R,promote_type(T1, T2)}
232-
233-
# convert should only work if they represent the same thing.
234-
@deprecate convert(::Type{R}, i::ClosedInterval{I}) where {R<:AbstractUnitRange,I<:Integer} R(i)
235-
@deprecate length(i::ClosedInterval) IntervalSets.duration(i)

test/findall.jl

+1-3
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,11 @@ end
139139
(-2u"m":0.1u"m":1u"m", -1.05u"m"..1u"km"),
140140
(-2u"m":0.1u"m":1u"m", -4u"m"..1u"km"),
141141
(-2u"m":0.1u"m":1u"m", -4.05u"m"..1u"km"),
142-
];
143-
VERSION >= v"1.4" ? [
144142
(Date(2021, 1, 1):Day(1):Date(2021, 3, 1), Date(2020, 1, 11)..Date(2020, 2, 22)),
145143
(Date(2021, 1, 1):Day(1):Date(2021, 3, 1), Date(2021, 1, 11)..Date(2021, 2, 22)),
146144
(DateTime(2021, 1, 1):Millisecond(10000):DateTime(2021, 3, 1), DateTime(2020, 1, 11)..DateTime(2020, 2, 22)),
147145
(DateTime(2021, 1, 1):Millisecond(10000):DateTime(2021, 3, 1), DateTime(2021, 1, 11)..DateTime(2021, 2, 22)),
148-
] : [];
146+
]
149147
]
150148
assert_in_interval(x, interval)
151149
assert_in_interval(reverse(x), interval)

0 commit comments

Comments
 (0)