Skip to content

Commit b779539

Browse files
authored
Add compat note re File/Stream (#309)
Suggested in JuliaStats/RDatasets.jl#119 (comment)
1 parent 8778bea commit b779539

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Diff for: Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "FileIO"
22
uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
3-
version = "1.6.1"
3+
version = "1.6.2"
44

55
[deps]
66
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

Diff for: src/types.jl

+8
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ formatname(::Formatted{F}) where F<:DataFormat = formatname(F)
3030
`File{fmt}(filename)` indicates that `filename` is a file of known
3131
[`DataFormat`](@ref) `fmt`. For example, `File{format"PNG"}(filename)` would indicate a PNG
3232
file.
33+
34+
!!! compat
35+
`File{fmt}(filename)` requires FileIO 1.6 or higher. The deprecated syntax `File(fmt, filename)` works
36+
on all FileIO 1.x releases.
3337
"""
3438
struct File{F<:DataFormat, Name} <: Formatted{F}
3539
filename::Name
@@ -60,6 +64,10 @@ written in known format [`DataFormat`](@ref) `fmt`.
6064
For example, `Stream{format"PNG"}(io)` would indicate PNG format.
6165
If known, the optional `filename` argument can
6266
be used to improve error messages, etc.
67+
68+
!!! compat
69+
`Stream{fmt}(io, ...)` requires FileIO 1.6 or higher. The deprecated syntax `Stream(fmt, io, ...)` works
70+
on all FileIO 1.x releases.
6371
"""
6472
struct Stream{F <: DataFormat, IOtype <: IO, Name} <: Formatted{F}
6573
io::IOtype

0 commit comments

Comments
 (0)