Skip to content

Commit 4de1255

Browse files
authored
Set IJulia.stdio_bytes in a forward-compatible way (#353)
The property will change to a field of a struct in an upcoming release.
1 parent f6a0d87 commit 4de1255

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
77
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
88

99
[compat]
10-
julia = "1.6"
10+
julia = "1.10"
1111

1212
[extras]
1313
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"

src/ProgressMeter.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,12 @@ function printover(io::IO, s::AbstractString, color::Symbol = :color_normal)
617617
print(io, "\r")
618618
printstyled(io, s; color=color)
619619
if isdefined(Main, :IJulia)
620-
Main.IJulia.stdio_bytes[] = 0 # issue #76: circumvent IJulia I/O throttling
620+
# issue #76: circumvent IJulia I/O throttling
621+
if pkgversion(Main.IJulia) < v"1.30"
622+
Main.IJulia.stdio_bytes[] = 0
623+
else
624+
Main.IJulia.reset_stdio_count()
625+
end
621626
elseif isdefined(Main, :ESS) || isdefined(Main, :Atom)
622627
else
623628
print(io, "\u1b[K") # clear the rest of the line

0 commit comments

Comments
 (0)