diff --git a/README.md b/README.md index 316863687..df7258ad7 100644 --- a/README.md +++ b/README.md @@ -106,9 +106,6 @@ Currently, the `@compat` macro supports the following syntaxes: * `using Compat.Markdown` is provided on versions older than 0.7, where this library is not yet part of the standard library ([#25738]). -* `using Compat.Sockets` is provided on versions older than 0.7, where this library is - not yet part of the standard library ([#25935]) - * `using Compat.Statistics` is provided on versions older than 0.7, where this library is not yet part of the standard library ([#27834]). diff --git a/src/Compat.jl b/src/Compat.jl index f0d99c7f9..b17076f85 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -2,22 +2,8 @@ VERSION < v"0.7.0-beta2.199" && __precompile__() module Compat -# https://github.com/JuliaLang/julia/pull/25935 -if VERSION < v"0.7.0-DEV.4442" - @eval module Sockets - import Base: - @ip_str, IPAddr, IPv4, IPv6, UDPSocket, TCPSocket, DNSError, - accept, connect, getaddrinfo, getipaddr, getsockname, listen, - listenany, recv, recvfrom, send, bind - - export - @ip_str, IPAddr, IPv4, IPv6, UDPSocket, TCPSocket, - accept, connect, getaddrinfo, getipaddr, getsockname, listen, - listenany, recv, recvfrom, send, bind - end -else - import Sockets -end +# to be deprecated +import Sockets include("compatmacro.jl") diff --git a/test/old.jl b/test/old.jl new file mode 100644 index 000000000..648991db0 --- /dev/null +++ b/test/old.jl @@ -0,0 +1,15 @@ +# tests of functionality to be deprecated + +# 0.7.0-DEV.3666 +module TestSockets + using Compat + using Compat.Sockets + using Compat.Test + + @test isdefined(@__MODULE__, :UDPSocket) + @test isdefined(@__MODULE__, :connect) + @test isdefined(@__MODULE__, :listen) + @test isdefined(@__MODULE__, :recv) + + @test ip"127.0.0.1".host == UInt32(2130706433) +end diff --git a/test/runtests.jl b/test/runtests.jl index 0765091e1..def808796 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -913,20 +913,6 @@ import Compat.Markdown @test stderr === STDERR end -# 0.7.0-DEV.3666 -module TestSockets - using Compat - using Compat.Sockets - using Compat.Test - - @test isdefined(@__MODULE__, :UDPSocket) - @test isdefined(@__MODULE__, :connect) - @test isdefined(@__MODULE__, :listen) - @test isdefined(@__MODULE__, :recv) - - @test ip"127.0.0.1".host == UInt32(2130706433) -end - # 0.7.0-DEV.3526 module TestNames export foo @@ -1554,4 +1540,6 @@ if VERSION >= v"0.7" end end +include("old.jl") + nothing