Skip to content

Commit 34190dd

Browse files
authored
drop 0.6 support in master (JuliaLang#726)
1 parent b583c94 commit 34190dd

File tree

10 files changed

+66
-146
lines changed

10 files changed

+66
-146
lines changed

.travis.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ os:
33
- linux
44
- osx
55
julia:
6-
- 0.6
6+
- 0.7
7+
- 1.0
78
- nightly
89
notifications:
910
email: false
10-
after_success:
11-
- julia --color=yes -e 'cd(Pkg.dir("IJulia")); Pkg.add("Coverage"); using Coverage;
12-
Coveralls.submit(Coveralls.process_folder())'
11+
#after_success:
12+
# - julia --color=yes -e 'cd(Pkg.dir("IJulia")); Pkg.add("Coverage"); using Coverage;
13+
# Coveralls.submit(Coveralls.process_folder())'

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ the [NBInclude](https://github.com/stevengj/NBInclude.jl) package.)
1818

1919
## Installation
2020

21-
First, [download Julia](http://julialang.org/downloads/) *version 0.6
21+
First, [download Julia](http://julialang.org/downloads/) *version 0.7
2222
or later* and run the installer. Then run the Julia application
2323
(double-click on it); a window with a `julia>` prompt will appear. At
2424
the prompt, type:
@@ -74,7 +74,7 @@ session instead of opening a new one.
7474

7575
```julia
7676
julia> using IJulia; notebook(detached=true)
77-
Process(`'C:\Users\JuliaUser\.julia\v0.6\Conda\deps\usr\Scripts\jupyter' notebook`, ProcessRunning)
77+
Process(`'C:\Users\JuliaUser\.julia\v0.7\Conda\deps\usr\Scripts\jupyter' notebook`, ProcessRunning)
7878

7979
julia>
8080
```
@@ -143,7 +143,7 @@ disabled, you can do:
143143
using IJulia
144144
IJulia.installkernel("Julia nodeps", "--depwarn=no")
145145
```
146-
and a kernel called `Julia nodeps 0.6` (if you are using Julia 0.6)
146+
and a kernel called `Julia nodeps 0.7` (if you are using Julia 0.7)
147147
will be installed (will show up in your main Jupyter kernel menu) that
148148
lets you open notebooks with this flag.
149149

@@ -281,9 +281,9 @@ On Mac and Windows systems, it is currently easiest to use the
281281
you will need to install [PyQt4](http://www.riverbankcomputing.com/software/pyqt/download) or
282282
[PySide](http://qt-project.org/wiki/Category:LanguageBindings::PySide).
283283

284-
* You need Julia version 0.6 or later.
284+
* You need Julia version 0.7 or later.
285285

286-
Once IPython 3.0+ and Julia 0.6+ are installed, you can install IJulia from a Julia console by typing:
286+
Once IPython 3.0+ and Julia 0.7+ are installed, you can install IJulia from a Julia console by typing:
287287
```julia
288288
Pkg.add("IJulia")
289289
```
@@ -299,8 +299,8 @@ Most people will use the notebook (browser-based) interface, but you
299299
can also use the IPython
300300
[qtconsole](http://ipython.org/ipython-doc/dev/interactive/qtconsole.html)
301301
or IPython terminal interfaces by running `ipython qtconsole --kernel
302-
julia-0.6` or `ipython console --kernel julia-0.6`, respectively.
303-
(Replace `0.6` with whatever major Julia version you are using.)
302+
julia-0.7` or `ipython console --kernel julia-0.7`, respectively.
303+
(Replace `0.7` with whatever major Julia version you are using.)
304304

305305
## Debugging IJulia problems
306306

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
julia 0.6
1+
julia 0.7
22
MbedTLS 0.4.3
33
JSON 0.17
44
ZMQ 0.6.0

appveyor.yml

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
environment:
22
matrix:
3-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
4-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
5-
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
6-
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
3+
- julia_version: 0.7
4+
- julia_version: 1
5+
- julia_version: nightly
6+
7+
platform:
8+
- x86 # 32-bit
9+
- x64 # 64-bit
10+
11+
# # Uncomment the following lines to allow failures on nightly julia
12+
# # (tests will run but not make your overall status red)
13+
# matrix:
14+
# allow_failures:
15+
# - julia_version: nightly
716

817
branches:
918
only:
@@ -17,36 +26,12 @@ notifications:
1726
on_build_status_changed: false
1827

1928
install:
20-
- ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12"
21-
# if there's a newer build queued for the same PR, cancel this one
22-
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
23-
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
24-
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
25-
throw "There are newer queued builds for this pull request, failing early." }
26-
# Download most recent Julia Windows binary
27-
- ps: (new-object net.webclient).DownloadFile(
28-
$env:JULIA_URL,
29-
"C:\projects\julia-binary.exe")
30-
# Run installer silently, output to C:\projects\julia
31-
- C:\projects\julia-binary.exe /S /D=C:\projects\julia
29+
- ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))
3230

3331
build_script:
34-
- C:\projects\julia\bin\julia -e "
35-
if VERSION >= v\"0.7.0-DEV.3630\";
36-
using InteractiveUtils;
37-
versioninfo(verbose=true);
38-
else
39-
versioninfo(true);
40-
end;
41-
VERSION >= v\"0.7.0-DEV.5183\" && using Pkg;
42-
Pkg.clone(pwd(), \"IJulia\");
43-
Pkg.add(\"Conda\"); using Conda;
44-
try Conda.add(\"qt\"); catch end;
45-
postlink = normpath(Pkg.dir(\"Conda\"), \"deps/usr/pkgs/qt-4.8.7-vc9_9/Scripts/.qt-post-link.bat\");
46-
isfile(postlink) && rm(postlink);
47-
Pkg.build(\"IJulia\")"
32+
- echo "%JL_BUILD_SCRIPT%"
33+
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"
4834

4935
test_script:
50-
- C:\projects\julia\bin\julia -e "
51-
VERSION >= v\"0.7.0-DEV.5183\" && using Pkg;
52-
Pkg.test(\"IJulia\")"
36+
- echo "%JL_TEST_SCRIPT%"
37+
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"

src/IJulia.jl

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,11 @@ module IJulia
3636
export notebook, installkernel
3737

3838
using ZMQ, JSON, Compat, SoftGlobalScope
39-
import Compat.invokelatest
40-
using Compat.Unicode: uppercase, lowercase
41-
import Compat.Dates
42-
using Compat.Dates: now
43-
import Compat.Random
44-
using Compat.Base64: Base64EncodePipe
45-
using Compat.REPL
39+
import Base.invokelatest
40+
using Dates: now
41+
import Random
42+
using Base64: Base64EncodePipe
43+
import REPL
4644

4745
const depfile = joinpath(dirname(@__FILE__), "..", "deps", "deps.jl")
4846
isfile(depfile) || error("IJulia not properly installed. Please run Pkg.build(\"IJulia\")")

src/execute_request.jl

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
# returning results.
44

55
import Base.Libc: flush_cstdio
6-
if VERSION v"0.7"
7-
import Pkg
8-
end
6+
import Pkg
97

108
const text_plain = MIME("text/plain")
119
const image_svg = MIME("image/svg+xml")
@@ -62,20 +60,16 @@ const displayqueue = Any[]
6260

6361
# remove x from the display queue
6462
function undisplay(x)
65-
i = Compat.findfirst(isequal(x), displayqueue)
63+
i = findfirst(isequal(x), displayqueue)
6664
i !== nothing && splice!(displayqueue, i)
6765
return x
6866
end
6967

70-
if VERSION < v"0.7.0-DEV.3498" # julia #25544
71-
import Base.REPL: ip_matches_func
72-
else
73-
import Base: ip_matches_func
74-
end
68+
import Base: ip_matches_func
7569

7670
function show_bt(io::IO, top_func::Symbol, t, set)
7771
# follow PR #17570 code in removing top_func from backtrace
78-
eval_ind = Compat.findlast(addr->ip_matches_func(addr, top_func), t)
72+
eval_ind = findlast(addr->ip_matches_func(addr, top_func), t)
7973
eval_ind !== nothing && (t = t[1:eval_ind-1])
8074
Base.show_backtrace(io, t)
8175
end
@@ -84,19 +78,6 @@ end
8478
# doesn't support keyword arguments.
8579
showerror_nobt(io, e, bt) = showerror(io, e, bt, backtrace=false)
8680

87-
@static if VERSION < v"0.7.0-DEV.4724"
88-
# https://github.com/JuliaLang/Compat.jl/pull/572
89-
# thanks to https://github.com/jipolanco/WriteVTK.jl/commit/ea046493c7787ae651b5f629455aaf7bdaa000b1
90-
rsplit(s::AbstractString; limit::Integer=0, keepempty::Bool=false) =
91-
Base.rsplit(s)
92-
rsplit(s::AbstractString, splitter; limit::Integer=0, keepempty::Bool=false) =
93-
Base.rsplit(s, splitter; limit=limit, keep=keepempty)
94-
split(s::AbstractString; limit::Integer=0, keepempty::Bool=false) =
95-
Base.split(s)
96-
split(s::AbstractString, splitter; limit::Integer=0, keepempty::Bool=false) =
97-
Base.split(s, splitter; limit=limit, keep=keepempty)
98-
end
99-
10081
# return the content of a pyerr message for exception e
10182
function error_content(e, bt=catch_backtrace();
10283
backtrace_top::Symbol=SOFTSCOPE[] ? :softscope_include_string : :include_string,
@@ -130,11 +111,7 @@ execute_msg = Msg(["julia"], Dict("username"=>"jlkernel", "session"=>uuid4()), D
130111
# request
131112
const stdio_bytes = Ref(0)
132113

133-
if VERSION < v"0.7.0-DEV.3589" # julia #25738
134-
import Base.Docs: helpmode # added in 0.6, see julia #19858
135-
else
136-
import REPL: helpmode
137-
end
114+
import REPL: helpmode
138115

139116
# use a global array to accumulate "payloads" for the execute_reply message
140117
const execute_payloads = Dict[]
@@ -169,12 +146,11 @@ function execute_request(socket, msg)
169146
m -> string(replace(m, r"^\s*;" => "Base.repl_cmd(`"),
170147
"`, ", stdout_name, ")"))
171148

172-
if VERSION v"0.7"
173-
# "] ..." cells are interpreted as pkg shell commands
174-
if occursin(r"^\].*$", code)
175-
code = "IJulia.Pkg.REPLMode.do_cmd(IJulia.minirepl[], \"" *
176-
escape_string(code[2:end]) * "\"; do_rethrow=true)"
177-
end
149+
150+
# "] ..." cells are interpreted as pkg shell commands
151+
if occursin(r"^\].*$", code)
152+
code = "IJulia.Pkg.REPLMode.do_cmd(IJulia.minirepl[], \"" *
153+
escape_string(code[2:end]) * "\"; do_rethrow=true)"
178154
end
179155

180156
# a cell beginning with "? ..." is interpreted as a help request

src/handlers.jl

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -51,31 +51,16 @@ ind2chr(m::Msg, str::String, i::Integer) = i == 0 ? 0 :
5151
VersionNumber(m.header["version"]) v"5.2" ? length(str, 1, i) : ind_to_utf16(str, i)
5252
#Compact display of types for Jupyterlab completion
5353

54-
if VERSION v"0.7.0-DEV.3500" #25544
55-
import REPL: REPLCompletions
56-
import REPL.REPLCompletions: sorted_keywords, emoji_symbols, latex_symbols
57-
elseif isdefined(Main, :REPLCompletions)
58-
import REPLCompletions
59-
import REPLCompletions: sorted_keywords, emoji_symbols, latex_symbols
60-
else
61-
const sorted_keywords = [
62-
"abstract type", "baremodule", "begin", "break", "catch", "ccall",
63-
"const", "continue", "do", "else", "elseif", "end", "export", "false",
64-
"finally", "for", "function", "global", "if", "import",
65-
"let", "local", "macro", "module", "mutable struct",
66-
"primitive type", "quote", "return", "struct",
67-
"true", "try", "using", "while"]
68-
import Base: REPLCompletions
69-
import Base.REPL.REPLCompletions: emoji_symbols, latex_symbols
70-
end
54+
import REPL: REPLCompletions
55+
import REPL.REPLCompletions: sorted_keywords, emoji_symbols, latex_symbols
7156

7257
complete_type(::Type{<:Function}) = "function"
7358
complete_type(::Type{<:Type}) = "type"
7459
complete_type(::Type{<:Tuple}) = "tuple"
7560

7661
function complete_type(T::DataType)
7762
s = string(T)
78-
(Compat.textwidth(s) 20 || isempty(T.parameters)) && return s
63+
(textwidth(s) 20 || isempty(T.parameters)) && return s
7964
buf = IOBuffer()
8065
print(buf, T.name)
8166
position(buf) > 19 && return String(take!(buf))

src/init.jl

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,12 @@
11
include(joinpath("..","deps","kspec.jl"))
22

3-
if VERSION < v"0.7.0-beta2.171" # julia#28295
4-
seed!(s) = Random.srand(s)
5-
else
6-
import Random: seed!
7-
end
3+
import Random: seed!
84

95
# use our own random seed for msg_id so that we
106
# don't alter the user-visible random state (issue #336)
117
const IJulia_RNG = seed!(Random.MersenneTwister(0))
12-
@static if VERSION < v"0.7.0-DEV.3666" # julia#25819
13-
uuid4() = repr(Random.uuid4(IJulia_RNG))
14-
else
15-
import UUIDs
16-
uuid4() = repr(UUIDs.uuid4(IJulia_RNG))
17-
end
18-
19-
if VERSION < v"0.7.0-DEV.4445" # julia#26130
20-
run(args...; wait=nothing) = wait === false ?
21-
Base.spawn(args...) : Base.run(args...)
22-
end
8+
import UUIDs
9+
uuid4() = repr(UUIDs.uuid4(IJulia_RNG))
2310

2411
const orig_stdin = Ref{IO}()
2512
const orig_stdout = Ref{IO}()
@@ -57,14 +44,12 @@ end
5744
# for use with Pkg.do_cmd. We have to roll our own to
5845
# make sure it uses the redirected stdout, and because
5946
# we don't have terminal support.
60-
if VERSION v"0.7"
61-
import REPL
62-
struct MiniREPL <: REPL.AbstractREPL
63-
display::TextDisplay
64-
end
65-
REPL.REPLDisplay(repl::MiniREPL) = repl.display
66-
const minirepl = Ref{MiniREPL}()
47+
import REPL
48+
struct MiniREPL <: REPL.AbstractREPL
49+
display::TextDisplay
6750
end
51+
REPL.REPLDisplay(repl::MiniREPL) = repl.display
52+
const minirepl = Ref{MiniREPL}()
6853

6954

7055
function init(args)
@@ -134,9 +119,7 @@ function init(args)
134119
redirect_stderr(IJuliaStdio(stderr,"stderr"))
135120
end
136121
redirect_stdin(IJuliaStdio(stdin,"stdin"))
137-
if VERSION v"0.7"
138-
minirepl[] = MiniREPL(TextDisplay(stdout))
139-
end
122+
minirepl[] = MiniREPL(TextDisplay(stdout))
140123

141124
if isdefined(Base, :CoreLogging)
142125
logger = Base.CoreLogging.SimpleLogger(Base.stderr)

src/kernel.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import IJulia
2-
using IJulia.Compat.InteractiveUtils
2+
using InteractiveUtils
33

44
# workaround #60:
55
if IJulia.Compat.Sys.isapple()

0 commit comments

Comments
 (0)