Skip to content

Commit 734c8ac

Browse files
committed
Mark Compat.IteratorSize and -Eltype from #451 for deprecation
1 parent f93afea commit 734c8ac

File tree

4 files changed

+8
-18
lines changed

4 files changed

+8
-18
lines changed

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,6 @@ Currently, the `@compat` macro supports the following syntaxes:
152152

153153
* `reprmime(mime, x)` is now `repr(mime, x)` ([#25990]) and `mimewritable` is now `showable` ([#26089]).
154154

155-
* `Base.IteratorSize` and `Base.IteratorEltype` are available as
156-
`Compat.IteratorSize` and `Compat.IteratorEltype` ([#25402]).
157-
158155
* `copy!` and `unsafe_copy!` are now `copyto!` and `unsafe_copyto!` ([#24808]).
159156

160157
* `ipermute!` is now `invpermute!` ([#25168]).

src/Compat.jl

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ module Unicode
4343
import Unicode: isassigned, normalize # not exported from Unicode module due to conflicts
4444
end
4545
import Base: notnothing
46+
const IteratorSize = Base.IteratorSize
47+
const IteratorEltype = Base.IteratorEltype
4648

4749

4850
include("compatmacro.jl")
@@ -68,15 +70,6 @@ end
6870
end
6971
end
7072

71-
# 0.7.0-DEV.3309
72-
@static if VERSION < v"0.7.0-DEV.3309"
73-
const IteratorSize = Base.iteratorsize
74-
const IteratorEltype = Base.iteratoreltype
75-
else
76-
const IteratorSize = Base.IteratorSize
77-
const IteratorEltype = Base.IteratorEltype
78-
end
79-
8073
# 0.7.0-DEV.3173
8174
@static if !isdefined(Base, :invpermute!)
8275
const invpermute! = ipermute!

test/old.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ end
187187
@test Compat.notnothing(1) == 1
188188
@test_throws ArgumentError Compat.notnothing(nothing)
189189

190+
# 0.7.0-DEV.3309
191+
let v = [1, 2, 3]
192+
@test Compat.IteratorSize(v) isa Base.HasShape
193+
@test Compat.IteratorEltype(v) == Base.HasEltype()
194+
end
195+
190196

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

test/runtests.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,6 @@ let A = [1]
8080
@test x == 1
8181
end
8282

83-
# 0.7.0-DEV.3309
84-
let v = [1, 2, 3]
85-
@test Compat.IteratorSize(v) isa Base.HasShape
86-
@test Compat.IteratorEltype(v) == Base.HasEltype()
87-
end
88-
8983
# 0.7.0-DEV.3057
9084
let A = [0, 0, 0], B = [1, 2, 3]
9185
@test copyto!(A, B) === A == B

0 commit comments

Comments
 (0)