Skip to content

Commit

Permalink
Mark Compat.Serialization from #473 for deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Oct 4, 2019
1 parent 0e88da2 commit 6638586
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 28 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ Currently, the `@compat` macro supports the following syntaxes:
* `using Compat.Unicode` is provided on versions older than 0.7, where this library is not
yet a part of the standard library. ([#25021])

* `using Compat.Serialization` is provided on versions older than 0.7, where this library is
not yet part of the standard library ([#25628]).

* `using Compat.Distributed` is provided on versions older than 0.7, where this library is
not yet part of the standard library ([#24443]).

Expand Down
13 changes: 1 addition & 12 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,11 @@ import SparseArrays
import Random
import Markdown
import REPL
import Serialization


include("compatmacro.jl")

if VERSION < v"0.7.0-DEV.3476"
@eval module Serialization
import Base.Serializer: serialize, deserialize, SerializationState, serialize_type
export serialize, deserialize
@static if VERSION < v"1.0.0-DEV.44"
export SerializationState
end
end
else
import Serialization
end

if VERSION < v"0.7.0-beta.85"
@eval module Statistics
if VERSION < v"0.7.0-DEV.4064"
Expand Down
13 changes: 13 additions & 0 deletions test/old.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,19 @@ module TestREPL
@test isdefined(@__MODULE__, :REPL)
end

# 0.7.0-DEV.3476
module TestSerialization
using Compat
using Compat.Serialization
using Compat.Test
@test isdefined(@__MODULE__, :Serialization)
@test isdefined(@__MODULE__, :serialize)
@test isdefined(@__MODULE__, :deserialize)
if VERSION < v"1.0.0-DEV.44"
@test isdefined(@__MODULE__, :SerializationState)
end
end


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

Expand Down
13 changes: 0 additions & 13 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -329,19 +329,6 @@ end
# 0.7.0-DEV.3415
@test findall(x -> x==1, [1, 2, 3, 2, 1]) == [1, 5]

# 0.7.0-DEV.3476
module TestSerialization
using Compat
using Compat.Serialization
using Compat.Test
@test isdefined(@__MODULE__, :Serialization)
@test isdefined(@__MODULE__, :serialize)
@test isdefined(@__MODULE__, :deserialize)
if VERSION < v"1.0.0-DEV.44"
@test isdefined(@__MODULE__, :SerializationState)
end
end

module TestPkg
using Compat
using Compat.Pkg
Expand Down

0 comments on commit 6638586

Please sign in to comment.